I've been scouring the threads for an example like mine and I've found
bits and pieces, but haven't been able to put everything together to get
what I want to work. What I have is a grid with a checkbox in the first column that I want to perform an action on check changed. I also have a button in the last column that puts the grid into edit mode. Around everything I have an UpdatePanel.
My problem is setting my triggers for only the checkbox on checkchanged. I can set children as triggers, but that will cause the other button to trigger which I don't want. I tried trying to programaitcally add the trigger in the ItemCreated event, but to no avail.
Relevant code as followed.
Again, I want to only asynchronously postback when that checkbox is checked. Thanks for any help in advance.
My problem is setting my triggers for only the checkbox on checkchanged. I can set children as triggers, but that will cause the other button to trigger which I don't want. I tried trying to programaitcally add the trigger in the ItemCreated event, but to no avail.
Relevant code as followed.
<
asp:UpdatePanel
ID
=
"UpdatePanel1"
runat
=
"server"
>
<
ContentTemplate
>
<
rad:RadGrid
ID
=
"rg"
OnUpdateCommand
=
"Update"
OnNeedDataSource
=
"BindItems"
OnItemDataBound
=
"rg_ItemDataBound"
OnPreRender
=
"rg_PreRender"
runat
=
"server"
>
<
PagerStyle
Position
=
"Top"
/>
<
MasterTableView
DataKeyNames
=
"ID"
CommandItemDisplay
=
"None"
>
<
CommandItemTemplate
>
<
asp:ImageButton
ID
=
"ImageButton1"
ImageUrl
=
"/admin/images/add-record.jpg"
CommandName
=
"InitInsert"
runat
=
"server"
/> Add New
</
CommandItemTemplate
>
<
Columns
>
<
rad:GridTemplateColumn
HeaderStyle-Width
=
"40px"
HeaderText
=
"Email"
>
<
ItemTemplate
>
<
asp:CheckBox
id
=
"cbEmail"
AutoPostBack
=
"true"
OnCheckedChanged
=
"AddToEmailList"
runat
=
"server"
/>
</
ItemTemplate
>
</
rad:GridTemplateColumn
>
// a handful of other columns
<
rad:GridEditCommandColumn
EditText
=
"More"
HeaderStyle-Width
=
"30"
/>
</
Columns
>
</
MasterTableView
>
</
rad:RadGrid
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
Again, I want to only asynchronously postback when that checkbox is checked. Thanks for any help in advance.