Hello
I'd like to set input mask of MaskEditorProvider for short time input. Currently I'm setting InputMask as ##:##, but this doesn't validate short time, ie from 00:00 to 23:59. That allows all numbers keyboard entries, ie from 00:00 to 99:99, and that isn't correct.
How do I can resolve this issue? Please, Can you help me? I'll hope your reply...
Thanks!
Geovanny Domínguez.
Please, Does anyone here could help me?
Thank you so much!
Geovanny Domínguez
Hello Geovanny,
I would suggest you to use igDateTimeEditor for this purpose. It should look like this:
Hope this helps.
Hello Nikolay
Thank you so much for your reply. I am having an error.
----
Server Error in '/WSddlist_gridview' Application.Editor with ID: WebDataGrid3_DateTimeEditorProvider1 cannot edit column with Key:valueOrig. The editor does not support the column type.
My example code is:
<ig:WebDataGrid ID="WebDataGrid3" runat="server" Height="350px" Width="400px"
AutoGenerateColumns="False" DataSourceID="SqlDataSource5">
<Columns>
<ig:BoundDataField DataFieldName="Time_mRID" Key="Time_mRID">
<Header Text="Time_mRID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="valueOrig" Key="valueOrig"
DataType="System.TimeSpan">
<Header Text="valueOrig" />
</Columns>
<EditorProviders>
<ig:DateTimeEditorProvider ID="WebDataGrid3_DateTimeEditorProvider1">
<EditorControl runat="server" ClientIDMode="Predictable"
DisplayModeFormat="HH:mm" EditModeFormat="HH:mm">
</EditorControl>
</ig:DateTimeEditorProvider>
</EditorProviders>
<Behaviors>
<ig:Activation>
</ig:Activation>
<ig:EditingCore>
<ig:CellEditing>
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="valueOrig"
EditorID="WebDataGrid3_DateTimeEditorProvider1" />
</ColumnSettings>
<EditModeActions MouseClick="Single" />
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
</ig:WebDataGrid>
My data are the following:
Time_mRID valueOrig1 00:001 00:101 00:101 00:301 00:201 10:10
Please. Help me!.
Thanks.
Hello,
The DateTimeEditorProvider should be used with DateTime columns, and I see that you have a column of type TimeSpan. Try changing this to DataType="System.DateTime" and see if the issue still occurs.
Let me know if you have any other questions.
I understand the error, but I don't need to use a DateTime Column. All what I need to store is a hour data type (hh:mm), in this format. For this reason my type column is System.TimeSpan.
I wanted to use the MaskEditorProvider, because in the Database the type of column is String. Now, How I can solve this issue? Some suggestion?
Please, help me!
There is no such built-in functionality in the mask editor provider. A possible workaround would be to handle the KeyDown or TextChanged client-side events of the grid and perform your custom validation in the handler.
Hi Geovanny,
I'm just checking if you managed to resolve your issue.