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.

Allow Number Only characters in ComboBox cell of virtual grid.

Thread ID:





76715 Sep 19,2008 11:51 AM Sep 22,2008 10:35 AM Windows Forms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On September 19, 2008 11:51 AM

Is there property of GridStyleInfo or something similar to achieve the subject?
What would you recommend?
Thank you,
Alex Feldman.

Sri Rajan [Syncfusion]
Replied On September 19, 2008 11:59 PM

Hi Alex,

Thank you for your interest in Syncfusion products.

Please try this code to solve this issue and let me know if this helps.

void gridControl1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
GridCurrentCell cc = this.gridControl1.CurrentCell;
if (this.gridControl1[cc.RowIndex, cc.ColIndex].CellType == "ComboBox")
int key = (int)e.KeyChar;
if (key >= 47 && key <= 58) { }
e.Handled = true;

Best Regards,

Administrator [Syncfusion]
Replied On September 22, 2008 10:35 AM

Thank you, Srirajan.
The path you suggested works well with some minor specific adjustments for our application (like CellType and additional condition for ignoring not numbers).


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.