I have a grid template column as such
I am then editing the checkboxes in the code behind to dynamically set them to checked or not
What I need to do is add the oncheckchanged event. Essentially, when a user either checks a box, or unchecks a box, I need to update a database and then show a tool tip telling them it was successful. I tried doing this programmatically, and adding it in the aspx but I can't get anything to work. Can you help me out?
<
telerik:GridTemplateColumn
HeaderText
=
"Don't Export"
HeaderStyle-Width
=
"40px"
DataField
=
"exportCheck"
SortExpression
=
"exportCheck"
UniqueName
=
"exportCheck"
>
<
ItemStyle
Width
=
"40px"
/>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"printCheck"
runat
=
"server"
AutoPostBack
=
"false"
OnCheckedChanged
=
"printCheckChanged"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
I am then editing the checkboxes in the code behind to dynamically set them to checked or not
Protected
Sub
RadGrid1_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
RadGrid1.ItemDataBound
If
TypeOf
e.Item
Is
GridDataItem
Then
'get the row item
Dim
item
As
GridDataItem =
DirectCast
(e.Item, GridDataItem)
'check to see if we need to check the box
Dim
export =
DirectCast
(item(
"export"
).Text,
String
)
'get the checkbox
Dim
check
As
CheckBox =
DirectCast
(item(
"exportCheck"
).Controls(1), CheckBox)
'if we need to check the box then we will get it and check it
If
(export =
"no"
)
Then
check.Checked =
True
End
If
'if export
End
If
'if e.item
End
Sub
'itemDataBound
What I need to do is add the oncheckchanged event. Essentially, when a user either checks a box, or unchecks a box, I need to update a database and then show a tool tip telling them it was successful. I tried doing this programmatically, and adding it in the aspx but I can't get anything to work. Can you help me out?