Xmlhttppanel problem

2 posts, 0 answers
  1. Dayana Maliyakal
    Dayana Maliyakal avatar
    27 posts
    Member since:
    Jan 2010

    Posted 23 Sep 2011 Link to this post

    Hi Telerik team,

        In radgrid rowselected event is not working if it in xmlhttppanel. How can I solve the issue?

    My source code is below:

    <

     

    div>

     

     

    <script type="text/javascript" language="javascript">

     

     

    function OnClientClick() {

     

     

    var panel = $find("<%=RadXmlHttpPanel1.ClientID%>");

     

     

    var item = document.getElementById("<%=TextBox1.ClientID%>").value;

     

    panel.set_value(item);

    }

     

    function OnRowSelectedHandler(sender, args) {

     

    alert();

     

    var item = args.getDataKeyValue("CustomerID");

     

     

    var panel = $find("<%=RadXmlHttpPanel2.ClientID%>");

     

    panel.set_value(item);

    }

     

    </script>

     

     

    <asp:ScriptManager ID="ScriptManager1" runat="server">

     

     

    </asp:ScriptManager>

     

     

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">

     

     

    </telerik:RadAjaxLoadingPanel>

     

     

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

     

     

    <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="OnClientClick();return false;" />

     

     

    <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"

     

     

    OnServiceRequest="RadXmlHttpPanel1_ServiceRequest">

     

     

    <uc6:ucXmlgrid ID="ucXmlgrid1" runat="server" />    //This is radgrid

     

     

    </telerik:RadXmlHttpPanel>

     

     

    <div style="padding-top: 10px">

     

     

    <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"

     

     

    OnServiceRequest="RadXmlHttpPanel2_ServiceRequest">

     

     

    <uc5:ucXmlDetail ID="ucXmlDetail1" runat="server" />

     

     

    </telerik:RadXmlHttpPanel>

     

     

    </div>

     

     

    </div>

    Source code in ucXmlgrid1 is as below:

     

     

    <telerik:RadGrid ID="rgCustomer" runat="server" AutoGenerateColumns="False" CellSpacing="0"

     

     

    AllowMultiRowSelection="false" GridLines="None">

     

     

    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">

     

     

    </HeaderContextMenu>

     

     

    <MasterTableView DataKeyNames="CustomerID" ClientDataKeyNames="CustomerID">

     

     

    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

     

     

    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">

     

     

    <HeaderStyle Width="20px"></HeaderStyle>

     

     

    </RowIndicatorColumn>

     

     

    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">

     

     

    <HeaderStyle Width="20px"></HeaderStyle>

     

     

    </ExpandCollapseColumn>

     

     

    <Columns>

     

     

    <telerik:GridBoundColumn FilterControlAltText="Filter column column" UniqueName="column"

     

     

    DataField="ContactName" HeaderText="Contact Name">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn FilterControlAltText="Filter column1 column" UniqueName="column1"

     

     

    DataField="CompanyName" HeaderText="Company Name">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn FilterControlAltText="Filter column2 column" UniqueName="column2"

     

     

    DataField="ContactTitle" HeaderText="Contact Title">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn FilterControlAltText="Filter column3 column" UniqueName="column3"

     

     

    DataField="Address" HeaderText="Address">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn FilterControlAltText="Filter column4 column" UniqueName="column4"

     

     

    DataField="City" HeaderText="City">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn FilterControlAltText="Filter column5 column" UniqueName="column5"

     

     

    DataField="Country" HeaderText="Country">

     

     

    </telerik:GridBoundColumn>

     

     

    </Columns>

     

     

    <EditFormSettings>

     

     

    <EditColumn FilterControlAltText="Filter EditCommandColumn column">

     

     

    </EditColumn>

     

     

    </EditFormSettings>

     

     

    </MasterTableView>

     

     

    <FilterMenu EnableImageSprites="False">

     

     

    </FilterMenu>

     

     

    <ClientSettings EnableRowHoverStyle="True">

     

    <%

    --<Selecting AllowRowSelect="True" />--%>

     

     

    <ClientEvents OnRowSelected="OnRowSelectedHandler" />

     

     

    </ClientSettings>

     

     

    </telerik:RadGrid>

     

  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 28 Sep 2011 Link to this post

    Hello Dayana,

    I tried to reproduce your problem locally but didn't succeed. Could you please provide more information about the issue? The sample project that I tested is attached to the thread. What I am doing in it, is I am rebinding the grid on XmlHttpPanel callbacks, and then select a row in the grid.

    Greetings,
    Pero
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top