Folks,
I am using RadControls for ASP.NET AJAX Q3 2010 SP2 with VS2010. I am using Form Template for editing rows. Below is my code.
In my form I have a RadioButton list (RadioButtonListApprovalType) with 3 list items. (Approved, Denied and Pending). I would like to see if the user's selects 'Denied', prior to updating the form, show an alert (i.e. 'Are your sure to Deny the Process?'). If user's chooses 'Yes', Update the row. If user's chooses 'No', Cancel the update. Basically I would like to see the same sort of alert prior to Deleting Radgrid rows.
Thanks
GC_0620
______________
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowFilteringByColumn
=
"True"
AllowPaging
=
"True"
AllowSorting
=
"True"
DataSourceID
=
"SqlDataSource3"
GridLines
=
"None"
AutoGenerateColumns
=
"False"
PageSize
=
"8"
Skin
=
"Office2007"
AllowAutomaticDeletes
=
"True"
AllowAutomaticUpdates
=
"True"
EnableLinqExpressions
=
"False"
OnColumnCreated
=
"RadGrid1_ColumnCreated"
OnUpdateCommand
=
"RadGrid1_UpdateCommand"
OnItemCommand
=
"RadGrid1_ItemCommand"
OnPreRender
=
"RadGrid1_PreRender"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
>
'''''
''''
<
EditFormSettings
EditFormType
=
"Template"
>
<
FormTemplate
>
<
table
id
=
"Table2"
class
=
"form-controls"
cellspacing
=
"2"
cellpadding
=
"1"
width
=
"100%"
border
=
"0"
rules
=
"none"
style
=
"border-collapse: collapse; background: #DCDCDC;"
>
<
tr
>
<
td
style
=
"font-size: 11px"
>
Approval status:
</
td
>
<
td
>
<
asp:RadioButtonList
ID
=
"RadioButtonListApprovalType"
DataTextField
=
"ProcessStatus"
TabIndex
=
"11"
DataValueField
=
"ProcessStatus"
RepeatDirection
=
"Horizontal"
runat
=
"server"
SelectedValue='<%# Bind("ProcessStatus") %>'>
<
asp:ListItem
Text
=
""
/>
<
asp:ListItem
Text
=
"Approved"
/>
<
asp:ListItem
Text
=
"Denied"
/>
<
asp:ListItem
Text
=
"Pending"
/>
</
asp:RadioButtonList
>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
colspan
=
"2"
>
<
asp:Button
ID
=
"btnUpdate"
runat
=
"server"
CssClass
=
"form-button"
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
<
asp:Button
ID
=
"btnCancel"
runat
=
"server"
CausesValidation
=
"False"
CssClass
=
"form-button"
CommandName
=
"Cancel"
Text
=
"Cancel"
/>
</
td
>
</
tr
>
</
table
>
</
FormTemplate
>
</
EditFormSettings
>
'''''
'''''
</
telerik:RadGrid
>