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

Client-side ItemType property

5 Answers 159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ali
Top achievements
Rank 1
Ali asked on 04 Apr 2008, 09:51 AM
Hi,
How can I access ItemType property at client-side?

Old Version
window[grid.id].MasterTableView.Rows[index].ItemType working fine

Prometheus
$find(grid.id).get_masterTableView().get_dataItems()[index].ItemType not working

Ali

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 04 Apr 2008, 10:35 AM
Hello Ali,

In RadGrid "Prometheus" all grid items are from the same type - data item.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
nick
Top achievements
Rank 1
answered on 14 May 2008, 11:42 PM
So, if the ItemType property has been removed from the Client API, what's the best method to determine if a row is in Edit mode or not, etc?
0
Rosen
Telerik team
answered on 17 May 2008, 01:33 PM
Hello nick,

Can you please elaborate more on the scenario you are trying to accomplish? Based on that we will be able to suggest the best approach in your case.

Regards,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
nick
Top achievements
Rank 1
answered on 17 May 2008, 08:28 PM
We have an editable grid on the page, and the user can run actions on the lines being edited.  Before, we would loop through the rows in the grid, and check the ItemType.  If it was being edited we'd take action on the row, otherwise continue looping through the rows to the end...
0
Rosen
Telerik team
answered on 20 May 2008, 11:28 AM
Hello nick,

In such scenario I suggest you to use a client object such as array in which to hold the edited items indexes. This array can be populated on RadGrid PreRender server-side event for example. Then when needed you can traverse grid's items and check if current item is edited. I have attached a very simple implementation of such approach.

Sincerely yours,
Rosen
the Telerik team

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