I have a RadGrid which uses InPlace editing, and this grid contains a RadComboBox and a RadTextBox. When the user changes the text choice of the RadTextBox, the value behind the choice is used to retrieve data using AutoPostBack, and the returned data needs to update the text value of the RadTextBox.
Here's what the .aspx code looks like:
My issue is that inside the SelectedIndexChanged event, I don't know how to access the InsertItem(s) defined in the .aspx from within this event. I have tried to use the NamingContainer, EditItems collection, the GetInsertItems() function, using a Try/DirectCast to FindControl to no avail.
Is this even possible?
Thanks.
Jim
Here's what the .aspx code looks like:
<
telerik:RadGrid
ID
=
"rgvMsgElementToMsgTemplate"
runat
=
"server"
GridLines
=
"None"
AutoGenerateColumns
=
"false"
MasterTableView-NoMasterRecordsText
=
"No Records To Display"
>
<
MasterTableView
CommandItemDisplay
=
"Top"
NoDetailRecordsText
=
"No Records To Display"
EditMode
=
"InPlace"
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
HeaderStyle
Width
=
"50px"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridTemplateColumn
DataField
=
"TMPLT_NM"
HeaderText
=
"Template"
UniqueName
=
"TMPLT_NM"
>
<
HeaderStyle
Width
=
"200px"
/>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"lblMessageTemplate"
CommandName
=
"EDIT"
runat
=
"server"
Text='<%#Container.DataItem("TMPLT_NM")%>' />
</
ItemTemplate
>
<
InsertItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"rcbTemplate"
DataTextField
=
"TMPLT_NM"
DataValueField
=
"AMCAT_ID"
Width
=
"190px"
DropDownAutoWidth
=
"Enabled"
OnSelectedIndexChanged
=
"rcbTemplate_SelectedIndexChanged"
AutoPostBack
=
"true"
></
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"rcbTemplateValidator"
CssClass
=
"redreq"
ControlToValidate
=
"rcbTemplate"
InitialValue
=
"-- Select an Item --"
runat
=
"server"
ErrorMessage
=
"*"
></
asp:RequiredFieldValidator
>
</
InsertItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Version Id"
UniqueName
=
"TMPLT_VRS_ID"
DataField
=
"TMPLT_VRS_ID"
>
<
HeaderStyle
Width
=
"50px"
/>
<
ItemTemplate
>
<%# Eval("TMPLT_VRS_ID")%>
</
ItemTemplate
>
<
InsertItemTemplate
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"rtbVersion"
DataField
=
"TMPLT_VRS_ID"
readonly
=
"true"
Width
=
"50px"
></
telerik:RadTextBox
>
</
InsertItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
My issue is that inside the SelectedIndexChanged event, I don't know how to access the InsertItem(s) defined in the .aspx from within this event. I have tried to use the NamingContainer, EditItems collection, the GetInsertItems() function, using a Try/DirectCast to FindControl to no avail.
Public
Sub
rcbTemplate_SelectedIndexChanged(sender
As
Object
, e
As
Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
' Somewhere in here I need to get to the each item inside the InPlace edit section of the grid...
End
Sub
Is this even possible?
Thanks.
Jim