We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can i validate a cell with time format in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

102080 Dec 21,2011 07:44 AM UTC Dec 27,2011 11:35 AM UTC Windows Forms 1
loading
Tags: GridControl
shiva
Asked On December 21, 2011 07:44 AM UTC

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


Kalaiarasan B [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;