How can i validate a cell with time format in GridGroupingControl

hi
i use vb.net with sql server database.
i have a feild with type time(0) un sqlserver and i use it in GridGroupingControl.my problem is :
when i write a time like this in a cell with type time(0) --> 11:
an error raised wth this text.( 11: is not a valid value for TimeSpan)
how can i control he time that i entered in cell.

Regards


1 Reply

KB Kalaiarasan B Syncfusion Team December 27, 2011 11:35 AM UTC

Hi Shiva,

Thank you for your interest in Syncfusion products.

You can achieve your desired behavior in entering timevalue in a cell by using the following code

this.gridGroupingControl1.TableDescriptor.Columns[ColIndex/ColName].Appearance.AnyRecordFieldCell.CellValueType = typeof(DateTime);
this.gridGroupingControl1.TableDescriptor.Columns[ColIndex/ColName].Appearance.AnyRecordFieldCell.Format = "hh:mm";

Sample for your reference:

http://www.syncfusion.com/downloads/Support/DirectTrac/85957/DateTime-1592518982.zip

Please let us know if you have any other concerns

Regards,
Kalai


Loader.
Up arrow icon