开发者

How to get the cell value of listview

开发者 https://www.devze.com 2023-01-03 06:52 出处:网络
I can开发者_运维百科 not get the cell value of myTelerik asp.net listview control.I want to know how to get the cell value of any listview control .Each cell of my listview control contain Image and o

I can开发者_运维百科 not get the cell value of my Telerik asp.net listview control.I want to know how to get the cell value of any listview control .Each cell of my listview control contain Image and one check box .I want the cell value by clicking the on back end i mean in C# code.


I'm not sure exactly what you want here, but to get a checkbox control inside a GridItem would look something like this.

GridItem Item = listview.Items[i];
bool isChecked = ((CheckBox)Item.Controls[0]).Checked;

See the Telerik Doco for more information.


If you wired the OnCheckedChanged event of the textbox, the NamingContainer inside its handler should point to the listview item which hosts it. Then if you call the FindControl method for the listview item that has label with text inside it, you should be able to fetch the text from the label.

Dick

0

精彩评论

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