Hi,
I need to update values using ultra grid but when i drag a column to header then i am not able to pick column name and value of that column to update.
For Example: I need to update the contact number of a client and when i group by contact number in a grid then the Column name and its values cannot be read directly . So is there any way to find the column name and its value after adding a group by header in ultra grid infragistics.
Hello Shakir,
Thank you for posting to our forum .
I tried to follow the steps you provided but unfortunately I do not have clear understanding of your requirement. Can you please provide the steps with a small working sample application describing what you are trying to achieve.
Although if you are trying to hide the grouped column then you can use column.HiddenWhenGroupBy property.
You can set the GroupByColumnsHidden off the Override to change this behavior so group-by columns aren't hidden. You can also set HiddenWhenGroupBy property off the UltraGridColumn to individually select columns that will be visible or hidden when grouped by.
this.ultraGrid1.DisplayLayout.Bands[0].Override.GroupByColumnsHidden = DefaultableBoolean.True;
// Forthermore, you can override above settings by setting HiddenWhenGroupBy property
// on an individual column.
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].HiddenWhenGroupBy = DefaultableBoolean.True;
Please let me know if you need further assistance.
Hello Divya,
For Example we have 3 columns
1) Database name
2) Country
3) Contact
When i group the values of country to the header then we get values grouped by country and the values for it. Let us assume the ultragrid is grouped by country column with value India.
So i want to fetch India and the name of the column it returns.
Becoz for updating values in db we require those two values the name of column and the values it has..
Thank you for the update.
When we perform groping by using option “Drag a column header here….” then ultraGrid1_InitializeGroupByRow events calls and with the help of EventArgs e you can get all the information about grouped column like its value and column key .
For that your code would be like this :
var value =e.Row.Value; var key = e.Row.Column.Key;
You can also go through this online document providing information about how to create groups in the UltraGrid and get its value.
https://es.infragistics.com/help/winforms/infragistics.win.ultrawingrid~infragistics.win.ultrawingrid.ultragridband~groups
Please let me now if you need further assistance.