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

GridDataItem ItemIndex property in radgrid with grouping

1 Answer 239 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jan
Top achievements
Rank 1
jan asked on 15 Aug 2008, 06:07 PM
Hello,

I am implementing my client side functions for selecting rows (which needs to handle other tasks), so I am using the javascript code similar to following:

var

masterTable = window["<%= My_RadGrid.ClientID %>"].MasterTableView;
masterTable.SelectRow(masterTable.Rows[rowIndex].Control,

false);

The problem is, how to get a correct rowIndex. When I use GridDataItem ItemIndex property it returns a index which does not count GridGroupHeaderItems - so I can not use it in client side SelectRow function.

So Can I somehow find an index of GridDataItem row in ItemCreated event handler so that this index count GridGroupHeaderItems?

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 19 Aug 2008, 10:27 AM
Hello Jan,

You should use e.Item.RowIndex instead of e.Item.ItemIndex.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
jan
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or