All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
<
telerik:RadListView
ID
=
"RadListView1"
Width
"97%"
AllowPaging
"True"
runat
"server"
AllowSorting
"true"
DataSourceID
"SqlDataSource1"
ItemPlaceholderID
"ProductsHolder"
DataKeyNames
"ProductID"
ClientDataKeyNames
OnItemDataBound
"RadListView1_ItemDataBound"
>
LayoutTemplate
fieldset
style
"max-width: 920px;"
id
"FieldSet1"
legend
>Products</
asp:Panel
/>
</
ItemTemplate
telerik:RadButton
"RadButton1"
Text
"Demo"
OnClientClicked
"OnClientClicked1"
protected
void
RadListView1_ItemDataBound(
object
sender, Telerik.Web.UI.RadListViewItemEventArgs e)
{
if
(e.Item
is
RadListViewDataItem)
RadListViewDataItem item = e.Item
as
RadListViewDataItem;
RadButton btn = item.FindControl(
)
RadButton;
btn.Attributes.Add(
"rowindex"
, item.DataItemIndex.ToString());
}
<script type=
"text/javascript"
function
OnClientClicked1(sender, args) {
var
listview = $find(
"<%=RadListView1.ClientID %>"
);
index = sender._element.getAttribute(
alert(listview._clientKeyValues[index].ProductID);
</script>