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.

How to check the entered value in current cell is either character value or integer value in gridgrouping control of syncfusion

Thread ID:

Created:

Updated:

Platform:

Replies:

118299 Feb 23,2015 02:37 AM Feb 24,2015 01:21 PM Windows Forms 1
loading
Tags: GridGroupingControl
Supriya Varne
Asked On February 23, 2015 02:37 AM

Hi,
I am using Gridgrouping control.
I have Parent-Child Relationship in the control.
I want to change values in Quantity column


when i enter the characters in the cell of quantity column i want to give message please enter only integer value.
How to check the entered value in current cell is either character value or integer value


Thank you and Regards,
Supriya

Muthukumar Kalyanasundaram [Syncfusion]
Replied On February 24, 2015 01:21 PM

Hi Supriya,

 

Thank you for your interest in Syncfusion products.

 

If you want to check the entered value in currentcell is either character or integer value for particular column in a grid, you can use “TableControlCurrentCellEditingComplete” event. Please refer the below code,

 

Code:

this.gridGroupingControl1.TableControlCurrentCellEditingComplete += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlEventHandler(gridGroupingControl1_TableControlCurrentCellEditingComplete);

 

void gridGroupingControl1_TableControlCurrentCellEditingComplete(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlEventArgs e)

{

GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;

if (cc.ColIndex == 5) // check for particular column

{

string str = this.gridGroupingControl1.TableModel[cc.RowIndex, cc.ColIndex].Text;

int Num;

bool isNum = int.TryParse(str, out Num);

if (isNum) // integer value

MessageBox.Show("Integer Value as :" + Num.ToString());

else // character value

MessageBox.Show(" Enter integer value");

}

}

 

Please let us know if you have any concerns.

 

Regards,

Muthukumar K


Attachment: Check__Char_or_Number_value_d92fb609.zip

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.

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.

;