
My RadGrid uses a user control for its editing, and because that user control is also used outside of a RadGrid (in a FormView), I'm running into a problem. I could resolve it if I could locate (using FindControl?) the user control inside the RadGrid.
If I was using only the RadGrid, I'd add code to the ItemCommand event, determine that it was the update event firing (because the CommandName of the LinkButton would be "Update"), find my user control by calling e.Item.FindControl(GridEditFormItem.EditFormUserControlID), and I'd be on my way.
If I was only using the FormView, I'd change the CommandName of the LinkButton to something OTHER THAN Update (so I could avoid the object data source from trying to do the update), respond to the command in the FormView's ItemCommand event, and find my user control by calling myFormView.FindControl(<the user control's ID>).
Here's the problem:
To keep the object data source from trying to do the update, I have to set the CommandName of the LinkButton to something other than "Update". If I set the CommandName of the LinkButton to something other than "Update", I don't get a GridEditFormItem in the RadGrid's ItemCommand event, I get a GridDataItem - and no way to get to the user control.
How do I locate the user control used by a RadGrid?
Thanks,
Ben
(please respond to ben.furino@bolderimage.com)
<div style="width: 250px; bottom: 0px; top: 0px; left: 0px; float: left; position: absolute;">
<telerik:RadPanelBar ID="pnlN" runat="server" Width="100%" Style="position: absolute;
bottom: 0px; top: 0px; left: 0px;" ExpandMode="FullExpandedItem" CollapseAnimation-Type="None"
ExpandAnimation-Type="None" AllowCollapseAllItems="false">
<Items>
<telerik:RadPanelItem Text="A" Value="A" Expanded="True" Selected="True">
<Items>
<telerik:RadPanelItem runat="server" Height="99%">
<ItemTemplate>
<iframe id="frmA" name="frmA" runat="server" frameborder="0" style="height: 100%; width: 100%;"
scrolling="yes"></iframe>
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelItem>
<telerik:RadPanelItem Text="B" Value="B">
<Items>
<telerik:RadPanelItem runat="server">
<ItemTemplate>
<iframe id="frmB" name="frmB" runat="server" frameborder="0" style="height: 100%; width: 100%;"
scrolling="yes"></iframe>
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>
</div>