Skip to content

Replies

0
chandra
chandra answered on Sep 26, 2012 3:00 PM

Hi Mike, If I clear the previous selected rows before adding new data rows then it is working fine.

Grid.Selected.Rows.Clear();

Grid.Selected.Rows.AddRange((UltraGridRow[])rows.All);

 

Thanks,

Kudumula.

0
chandra
chandra answered on Sep 25, 2012 10:28 PM

Hi Mike,

           I have similar issue to select all rows under GroupByRow in an UltraWinGrid. My UltraWinGrid contains bunch of GroupByRows. If I select any GroupByRow, 

it should select all the respective datarows. Here is my sample code:

     foreach(UltraGridRow row in this.Grid.Selected.Rows)

     {

       if (row is UltraGridGroupByRow)

        {

           UltraGridGroupByRow groupByRow = row as UltraGridGroupByRow;

     RowsCollection rows = groupByRow.Rows; 

     Grid.Selected.Rows.AddRange((UltraGridRow[])rows.All); //Throwing NullReferenceException

    }

 }

Could please help me to resolve this and let me know if you need more information. Thank you.