I am having ultragrid just like properties window. ie, each row has different controls on it like
1st row -> UltraCheckEditor
2nd row -> combo box
3rd row -> default text editor (which is supported by UltraGrid in edit mode)
I would like to make the 3rd row default text editor control to accept only signed integers. How can i achieve this functionality ? ONLY for CELL... not for Column...
Hi,
This is pretty complex, so I'm not sure what part of this is giving you trouble. But the basic approach to take would be to create a column (either in your DataSource or an unbound column in the grid) whose DataType is object. That way the column can handle any other data type.
Then what you would do is handle the InitializeRow event in order to change the UI for the cells in that column to whatever you want. There are a number of ways to do this. One way would be to simply set the Style property on the cell. This will work for all of the basic styles like CheckBox and Edit (text). If you want to do something more complex, then you might need to set the ValueList on the column in addition to the style. For even more complex cases where there is no Style that does what you want, you would have to use an Editor or EditorComponent.
Hi Mike,
Thank you for the reply. But how can i achieve
"3rd row default text editor control to accept only integers". Text editor control which accepts only integer values.
private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.Index == 2) e.Row.Cells["My Column"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Integer; }
Through columstyle , in my datagrid i am displaying integer but if i want integer like ranges for example: 12-15, 30-38.
What i need to do.
Please Help me and thanks in advance