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
255
WinGrid : How to select all rows of a grid?
posted

Hi All,

I have a grid which displays thousands of rows.I want to select all rows on a button click.I used the following approach. But it takes lot of time .

for (int i = 0; i < grdEmpMessage.Rows.Count; i++)

{

grdEmpMessage.RowsIdea.Selected =
true;

}

Can anybody suggest me an alternative which is faster?. 

Thanks

Abja

 

Parents
No Data
Reply
  • 370
    Verified Answer
    posted

     Hi Abja,

     

    The fastest way to select all rows is to add the entire row collection to the ultragrid's selected.Rows collection:

    ultragrid1.Selected.Rows.AddRange(ultragrid1.Rows.All)
     

     

    Regrads,

    Rico 

Children