Hello all,
I am newbie on using infragistics 2011 and I am having some dificulties in setting up a DateTiemEditorProvider to edit a time field which is in a SQL 2008R2 database.
I get an error which says that the Editor cannot be used with the field data type. I have tried to change the datatype on the WebDataGrid to Char and use a InputMask editor but I get the same error.
can someone point me to the right direction on how to accomplish this?
regards,
adasilva
hello adasilva,
If your data is not in datetime format then cast it as datetime and bind it to grid
eg. output should be like 2011-06-30 01:00:00
For DateTimeEditorProvider
set following properties to display and edit data in format 01:00
DisplayModeFormat="HH:mm" EditModeFormat="HH:mm"
If you want to display data in format 01.00 then set following porperties
DisplayModeFormat="HH.mm" EditModeFormat="HH.mm"
If u r having problem please ask again
Thanks
sandip jadhav
HI,
I am using V12.1.20121.2072 asp.net and am is using the Date Time Editor Provider.
I want my WEbDataGrid to cell to display Time in HH:mm, thus i follow your suggesting above:
<Behaviors> <igGrid:Activation Enabled="true" /> <igGrid:EditingCore BatchUpdating="true"> <Behaviors> <igGrid:CellEditing Enabled="true" EditModeActions-EnableOnKeyPress="true"> <ColumnSettings> <igGrid:EditingColumnSetting ColumnKey="EmployeeId" ReadOnly="true" /> <igGrid:EditingColumnSetting ColumnKey="Employee" ReadOnly="true" /> <igGrid:EditingColumnSetting ColumnKey="EmployeeType" ReadOnly="true" /> <igGrid:EditingColumnSetting ColumnKey="Designation" ReadOnly="true" /> <igGrid:EditingColumnSetting ColumnKey="WorkHour" ReadOnly="true" /> <igGrid:EditingColumnSetting ColumnKey="Time1" EditorID="WebDataGrid1_DateTimeEditorProvider1" /> <igGrid:EditingColumnSetting ColumnKey="Time11" EditorID="WebDataGrid1_DateTimeEditorProvider1" /> </ColumnSettings>
<EditModeActions EnableOnKeyPress="True"></EditModeActions> </igGrid:CellEditing> </Behaviors> </igGrid:EditingCore> </Behaviors> <EditorProviders> <igGrid:DateTimeEditorProvider id="WebDataGrid1_DateTimeEditorProvider1"> <EditorControl DisplayModeFormat="HH:mm" EditModeFormat="HH:mm"> </EditorControl> </igGrid:DateTimeEditorProvider> </EditorProviders>
But my Grid Cell still display the full datetime. I had try to change the DisplayModeFormat="t", as it display datetime as well.
Can you please enlighten me?
Regards,
Say Chao