RadXmlHttp Gridwiew Click Event Problem

6 posts, 0 answers
  1. Hakan
    Hakan avatar
    12 posts
    Member since:
    Jul 2010

    Posted 01 Jul 2010 Link to this post

    I have  2 RadXmlpHttp Panel of of them,When I select row,textboxes fill.Another one when I click a button which rebind Grid but,I cant select rows of grid again.Also When I use filter in grid there are script error on button click event.

    <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="XmlHttpPanel_ServiceRequest" RenderMode="Block">
    <asp:Button ID="Button1" runat="server" OnClientClick="UpdateGrid();return false;" Text="Button" />

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

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

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

    </telerik:RadXmlHttpPanel>

    <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel2" runat="server" OnServiceRequest="XmlHttpPanel_ServiceRequest2"

    RenderMode="Block">

    <telerik:RadGrid ID="RadGrid1" Skin="Hay" OnNeedDataSource="RadGrid1_NeedDataSource"

    Width="370px" AllowSorting="True" PageSize="10" AllowPaging="True" runat="server"

    AutoGenerateColumns="false" GridLines="None">
    <MasterTableView ClientDataKeyNames="Id" Width="100%" >
    <Columns>

    <telerik:GridBoundColumn DataField="Id" Visible="false">

    </telerik:GridBoundColumn>

    <telerik:GridBoundColumn HeaderText="Name" DataField="Header" UniqueName="Header" >

    </telerik:GridBoundColumn>

    <telerik:GridBoundColumn HeaderText="Address" DataField="ShortDescription" UniqueName="ShortDescription">

    </telerik:GridBoundColumn>

    </Columns>

    </MasterTableView>

    <PagerStyle Mode="Slider" PageButtonCount="5" />

    <ClientSettings EnableRowHoverStyle="true" Selecting-AllowRowSelect="true" ClientEvents-OnRowSelected="rowSelected">

    </ClientSettings>

    </telerik:RadGrid>

    </telerik:RadXmlHttpPanel>



    ANd CodeBehind

     

     

     

    protected void Page_Load(object sender, EventArgs e)

     

    {

    }

     

     

     

    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

     

    {

    RadGrid1.DataSource =

     

     

    db.dbRead("Select * from Doctors");

     

    }

     

    protected void XmlHttpPanel_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e)

     {
    string val = e.Value;
    DataSet ds = db.dbRead("Select * from Doctors where Id=" + val + "");

    TextBox1.Text = ds.Tables[0].Rows[0]["Header"].ToString();

    TextBox2.Text = ds.Tables[0].Rows[0]["ShortDescription"].ToString();

    TextBox3.Text = val;

    }
    protected void XmlHttpPanel_ServiceRequest2(object sender, RadXmlHttpPanelEventArgs e)

    {
    DataSet ds = db.dbRead("Select top 5 * from Doctors");

    RadGrid1.DataSource = ds;

    RadGrid1.DataBind();

    }

     

  2. Hakan
    Hakan avatar
    12 posts
    Member since:
    Jul 2010

    Posted 03 Jul 2010 Link to this post

    Why noone answered this question,I cound't understand ultil this time.But I solved the problem.Problem related with radgrid pager Mode When it is Slider mode there is a problem.it can not register??? Why I dont know but.When I made Numeric mode,Problem Solved.

    Thank you Telerik  Team for your helps...
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 06 Jul 2010 Link to this post

    Hi Hakan,

    This is a known issue, when using the RadGrid with the XmlHttpPanel, and the Grid has  PagerStyle.Mode=Slider. Please use different mode for the Grid's PagerStyle.

    Best wishes,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Francis Frank
    Francis Frank avatar
    35 posts
    Member since:
    Mar 2010

    Posted 13 Oct 2010 Link to this post

    Please Team,

    I have been in a problem for a long time enough to go half my project.

    I  have a RadListView which is inside an RadXmlHttp control.
    Inside this RadListView, i have a table where i placed a hyperlink which should trigger an event - but this has been a bottle neck.

    I tried the fellowing Java scripts but they didnt help.
    I also tried to see if i could create a code behind file (which will be better for my need) but i dont know how to get though because the hyperlink control is hidden.

    function getControl() {
                    var masterTable = $find("<%=RadXmlHttpPanelInfoCustomer.ClientID%>").get_MenuView();
                    var lnk = masterTable.findControl('lnkAddToCart');
                    lnk.set_text("ok");
                }

    The Below could not respond to click after i added onclick="GetRegisterServerElements(this);"  to the hyperlink click event
       //global DOM ID registry.  filled up by scripts rendered from templates.
                var registeredElements = [];
                //looks for an element that has been registered with the global array
                //requires that we emit a registration script block for each server control
                function GetRegisteredServerElement(serverID) {
                    var clientID = "";
                    for (var i = 0; i < registeredElements.length; i++) {
                        clientID = registeredElements[i];
                        if (clientID.indexOf(serverID) >= 0)
                            break;
                    }
                    //return document.getElementById(clientID);
                    alert(document.getElementById(clientID));
                }

    I WILL APPRECIATE A QUICK RESPONDE

    Great Appreciation Guys,
  6. Francis Frank
    Francis Frank avatar
    35 posts
    Member since:
    Mar 2010

    Posted 15 Oct 2010 Link to this post

    Thanks Team,

    I appreciate your concern each time we encounter dificulties.

    I have been able to solve my problem
    It was quite easier than i thought -
    what i did:
    I placed this on the click event of the encapsulated control: onclick="AddToCart(event, 'lnkAddToCart')

    With the below Jscipt function, I was able to get the control ID which happen to be idFrag
    function AddToCart(e, idFrag) {             
                    var panel = $find("<%= RadXmlHttpPanelInfoCustomer.ClientID %>");           
                    panel.set_value("added");
                }
    With the above, i could know when the AddToCart link was clicked.

    ITS FUN USING TELERIK !!! cheers
    (If their are other solutions u could resolve, i will appreciate if u let me have it)

    Francis
  7. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 15 Oct 2010 Link to this post

    Hi Francis,

    I am glad you resolved the issue yourself. When you have a problem that needs immediate response, please, besides opening a forum thread, open a new support ticket. Support tickets have higher priority, and you will receive an answer within 24 hours of opening the ticket.

    So, in case you have any other questions, do not hesitate to open a support ticket.

    Kind regards,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017