开发者

Retrieive ids from the checked checbox itens in a GridView Row

开发者 https://www.devze.com 2023-01-05 03:20 出处:网络
I need present a grid-view in the web page, and based on the checkbox that each grid row has I want to retrieve and submit a value of the ID of each grid column. I\'m using asp.net mvc and the mvc con

I need present a grid-view in the web page, and based on the checkbox that each grid row has I want to retrieve and submit a value of the ID of each grid column. I'm using asp.net mvc and the mvc contrib grid, but accept suggestions on 开发者_Go百科how to do via JQuery or Javascript too. Thanks.


You'd need to bind them to a list, take a look at this article from Phil Haack which will tell you how and give you a few ideas for other scenarios: http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx


Done, I've put the checks with the same ID of the "id" field and retrieveid the cheched with a foreach Jquery function...Worked very well.

0

精彩评论

暂无评论...
验证码 换一张
取 消