Hi, we are working in a WebDataGrid and need a column to be DateTime format. So we setup a DatePickerProvider in that column with no result. When the grid is rendered it appears a "calendar icon" in that cell (we are using Adding Behavior) but when I click in that icon nothing happens.
My markup have the declaration of the Editor Provider, and in code behind I associated to column:RowAddingColumnSetting config = new RowAddingColumnSetting();config.ColumnKey = "Date";config.EditorID = "dppDate";config.ReadOnly = false;wdg.Behaviors.EditingCore.Behaviors.RowAdding.ColumnSettings.Add(config);
I dont know if I'm missing some attributes or something related? Can you help me?
Hello,
Thank you for contacting us.
Below you can find a sample that is showing how to use DatePickerProvider when you try to update or add a new row.
Code snippet:
<Behaviors> <ig:CellEditing Enabled="True" EnableInheritance="True"> <ig:EditModeActions EnableOnActive="True" /> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="OrderDate" EditorID="DateInputProvider" /> </ColumnSettings> </ig:CellEditing> <ig:RowAdding Enabled="True" Alignment="Top" EditModeActions-EnableOnActive="True"
EditModeActions-MouseClick="Single"> <ColumnSettings> <ig:RowAddingColumnSetting ColumnKey="OrderDate" EditorID="DateInputProvider" /> </ColumnSettings> <EditModeActions MouseClick="Single" EnableOnActive="True"></EditModeActions> </ig:RowAdding> </Behaviors>
Online sample:
http://es.infragistics.com/samples/aspnet/date-picker/webdatepicker-as-editor-provider
Let me know if I may be of further assistance.
Hi, thanks for your reply.
I didnt notice any difference between your attached example and my code. So, I did some extra research and I discovered a major problem!
First of all, We are using IG v. 14.2.20142.1028.
If I include a dummy text from code behind in a server tag, calendar editor stop working:
Markup Code:...<body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <h1><%=GenerateString() %></h1> <ig:WebDataGrid ID="WebDataGrid1" runat="server" Width="800px" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyFields="OrderID">......
Code Behind: public string GenerateString() { // Just generating a dummy text. return "Welcome back!"; }
We need you to validate this behavior and provide Us with a solution please. This seems to have no sense for Us.
I am attaching .aspx and aspx.cs files, you can use your example and just replace that 2 files.
Thanks.
Thank you for reporting this.
I can suggest you a quick and easy workaround for this. You can just add WebMonthCalendar control into your page and associate it to the EditorControl of the DatePickerProvider.
.....
......
This workaround is working for me
I am glad that I've managed to help you.