This is a migrated thread and some comments may be shown as answers.

[Solved] Select multiple rows on clientside

3 Answers 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anand
Top achievements
Rank 1
Anand asked on 07 May 2008, 11:17 AM
I have a grid that allows the user to select rows clientside.
When my page loads,  I want to some of the rows to be selected. I want this by using javascript , so i wrote this

for (var i = 0; i < grid.MasterTableView.Rows.length; i++)
                   {

                          var curRowId = grid.MasterTableView.GetCellByColumnUniqueName(grid.MasterTableView.Rows[i], "column6");
          
                           var curRowSelect = grid.MasterTableView.GetCellByColumnUniqueName(grid.MasterTableView.Rows[i], "column12");
                          
                           var id =  window.opener.document.getElementById("InvoicesControl1_HdnCCinfo");
                            
                           var temp = new Array();
                           temp = id.value.split(',');
                                                  
                           if(FNArrayGetSearchLinearRowI(curRowId.innerHTML,temp))
                           {
                             grid.MasterTableView.SelectRow(grid.MasterTableView.Rows[i].Control,true);
                           }
                    }

this code selects only last row , pls suggest me how to select multiple row.

Thank's in advance


3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 May 2008, 11:29 AM
Hello Anand,

Please use grid.MasterTableView.SelectRow(grid.MasterTableView.Rows[i].Control, false); instead.

Regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Anand
Top achievements
Rank 1
answered on 07 May 2008, 11:40 AM
Vlad,
It worked, Thank's


0
Yavor
Telerik team
answered on 07 May 2008, 11:41 AM
Hello Anand,

To see more information on how to handle this functionality with the new client side API for the control, please refer to the following article.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Anand
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Anand
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or