Home Forums WinForms controls Xceed Grid for WinForms GROUPMANAGERROW QUESTION

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14205 |

    This is my gridcontrol with groupings…. They are grouped according to Food. How can I
    get the group name if the user’s current or selected row is the group name itself? How can I get “Fruits” if the user selected the grouprow?

    Food: Fruits – 3 items
    Apple
    Banana
    Orange

    Food: Vegetables – 1 item
    Cabbage

    Imported from legacy forums. Posted by peyton (had 2036 views)

    User (Old forums)
    Member
    Post count: 23064

    <code>GroupManagerRow gmRow = grid.CurrentRow as GroupManagerRow;
    if (gmRow != null) {
    Group group = gmRow.ParentGroup as Group;
    if (group != null) {
    string food = group.Key as string;
    if (food != null) {
    // the string variable <i>food</i> contains the food of the GroupManagerRow
    }
    }
    }</code>

    Imported from legacy forums. Posted by Tommy (had 2892 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.