Home Forums WinForms controls Xceed Grid for WinForms Simple Grouping Question

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

    Hi, I have the following data:

    Food: Fruits – 3 items
    Apple
    Banana
    Orange

    Food: Vegetables – 1 item
    Cabbage

    I want to get the texts Fruits and Vegetables. How?

    I also want to get the number of rows per Fruits and the number of rows in Vegetables. How?

    Thanks guys

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

    User (Old forums)
    Member
    Post count: 23064

    Use <a href=”http://doc.xceedsoft.com/products/gridNet/ref/xceed.grid.groupmanagerrow.titleformat.html”>GroupManagerRow.TitleFormat</a&gt; to customize the titles of the groups.

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

    User (Old forums)
    Member
    Post count: 23064

    No, What I mean was I want to get o retrieve the Fruits and Vegetables through a method.. How?

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

    User (Old forums)
    Member
    Post count: 23064

    I’m afraid I don’t understand the question. Can you give some details? How is the data stored (DataSet, DataTable, how does it look)? How is it bound to the grid?

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

    User (Old forums)
    Member
    Post count: 23064

    THIS IS THE GRIDCONTROL With Groupings:

    Food: Fruits – 3 items
    Apple
    Banana
    Orange

    Food: Vegetables – 1 item
    Cabbage

    In my code, I want to retrieve the number of rows per group. Due to this, I have to get
    the group titles such as Fruits and Vegetables.. How??

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

    User (Old forums)
    Member
    Post count: 23064

    <pre>foreach(Group group in grid.Groups) {
    object key = group.Key; // the value of the key of the group (‘Fruits’, ‘Vegetables’, …)
    int rowCount = group.GetSortedDataRowCount(true); // the number of rows in the group
    }</pre>

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

    User (Old forums)
    Member
    Post count: 23064

    Thank you so much! God bless you!

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

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