<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="input.aspx.vb" Inherits="TestaTredjepartWeb.input" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="s" runat="server"> </asp:ScriptManager> <div> <telerik:RadNumericTextBox ID="aa" runat="server" Value="10000000"> </telerik:RadNumericTextBox><br /><br /> <asp:Button ID="btnSetFocus" runat="server" Text="Set Focus" OnClientClick="$find('aa').focus(); return false;" /> </div> </form></body></html>
Everything I've described so far works perfectly. So here's where the trouble begins.
When it comes time to persist data back to the DB, in my ItemCommand for the RadGrid which receives the "Save" (from e.CommandName), I have a call to GridEditableItem.ExtractValues. This call to ExtractValues finds and pulls data for every other column (which is in edit mode at any rate), except for my GridTemplateColumn! As described above, this is the column where I am dynamically instantiating and adding a control.
If I perform the instantiation and addition earlier as a test (e.g. Page_Init), then of course the control is found - but my condition which is based on data is not yet available. In other words, even though I would love to build the grid programmatically in Page_Init, I can't do so because I don't know what kind of control I need to instantiate that early!
Ideas please? Regards,
Allen
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="menu.aspx.vb" Inherits="TestaTredjepartWeb.menu" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="s" runat="server"> </asp:ScriptManager> <div> <table> <tr> <td> <telerik:RadMenu ID="menu" runat="server" RenderMode="Lightweight" ClickToOpen="true" ExpandDelay="1000"> <Items> <telerik:RadMenuItem Text="Test1" Value="item1"> <Items> <telerik:RadMenuItem Text="1"></telerik:RadMenuItem> <telerik:RadMenuItem Text="2"> <Items> <telerik:RadMenuItem Text="22"></telerik:RadMenuItem> <telerik:RadMenuItem Text="23"></telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem Text="3"></telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem Text="Test2" Value="item2"> <Items> <telerik:RadMenuItem Text="1"></telerik:RadMenuItem> <telerik:RadMenuItem Text="2"></telerik:RadMenuItem> <telerik:RadMenuItem Text="3"></telerik:RadMenuItem> </Items> </telerik:RadMenuItem> </Items> </telerik:RadMenu> </td> </tr> </table> </div> </form></body></html>You might think that this doesn't happen often, but for some users it actually does.
One other thing is that I think the second click should open it directly without waiting for the expandelay...
Regards
Andreas
<asp:LinkButton ID="lnkAddProduct"CausesValidation="true" ValidationGroup="ValidationGroup2"ToolTip="Add To Cart"runat="server" CommandArgument='<%# Eval ( "PriceListID").ToString() %>'CommandName="addproduct"><img style="border:0px" alt="" width="22px" height="22px" src="../Images/icons/shopcartapply3.ico"/> </asp:LinkButton>