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

Kendo MVC Grid - rowindex on row selection (not in script)

0 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saravanan
Top achievements
Rank 1
Saravanan asked on 23 Aug 2012, 11:01 AM
Hi,

I have a column in Kendo grid as a hyper link to Edit that row in another page. I have defined the link to get the "Id" of that row data as

columns.Template(@<text>

                           @Html.ActionLink(@item.Id.ToString(), "Edit", "CompanyDtails", new { companyId = @item.Id, currentIndex = 0 }) 

                         </text>)

                              .ClientTemplate("<a href='/CompanyDetails/CompanyDetail?companyId=#=Id#&currentIndex=#=0#'>Edit</a>")

                              .Title("Edit").Width("4%");

My requirement is, on Edit click, I need to pass the rowindex in the grid to the controller. I don't know how to define that. In the above code I have mentioned the currentIndex as 0, which should be the actual rowindex. Please let me know how to defind the rowindex in the template.

Thank you.
.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Saravanan
Top achievements
Rank 1
Share this question
or