Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1210
getting the value of a cell in a group
posted

Using 12.1 of IG and WebDataGrid

I have a grid with Grouped cells. The ungrouped columns values can be retrieved with:

string theIndividual = (string)this.WebDataGrid1.Behaviors.Activation.ActiveCell.Row.GetValue(this.WebDataGrid1.Columns["Individual_DeptAux_Department"]);

but any column inside a group such as "GroupField_2" does not return it's value. What am I doing wrong to get the value:

string theIndividual = (string)this.WebDataGrid1.Behaviors.Activation.ActiveCell.Row.GetValue(this.WebDataGrid1.Columns["Individual_LastName"]);

which is in a grouped column GroupField_2

Parents
No Data
Reply
  • 33839
    Suggested Answer
    posted

    Hi rookertrusted,

    Your code is slightly off to accomplish this.  Individual_LastName column is not in the grid Columns collection, but the Columns collection of GroupField_2.  Try using WebDataGrid1.FindColumn("Individual_LastName").  Or get the group field from the columns collection, cast it as a GroupField, and then search in its Columns collection.

    regards,

    David Young

Children