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
1800
Adding news row after grouping
posted

I have a grid that is grouped by a column. I also have allowed data to be pasted from another source. Now, if the data is pasted in one of the groupby rows, then AddNewRow() always adds rows to the last. Is there a way to intuitively paste data in the same group ?

Any help is appreciated!

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi, 

    I'm a little unclear on exactly what you are doing or how you are adding the rows. The grid itself doesn't have any way to allow you to add a row under a particular GroupByRow directly. You add rows to the Band, not to the rows collection.

    But assuming that the new rows data meets the criteria for a particular group, you could add the row and then refresh the grouping to put that row into it's correct place.

    You can re-sort (and re-group) a single row by calling:

    row.RefreshSortPosition();

    Or, you can refresh the entire band like so:

    this.ultraGrid1.DisplayLayout.Bands[0].SortedColumns.RefreshSort(true);

Reply Children
No Data