how to create link that will display RadGrid2

2 posts, 0 answers
  1. TippCityTom
    TippCityTom avatar
    14 posts
    Member since:
    Sep 2008

    Posted 13 Aug 2009 Link to this post

    I have two seperate RadGrids, I want the user to click on item in RadGrid1
    + if post count is zero then will popup via link a radwindow to add, this works
    + if post count is greater than zero then have a link that will simply pass the TopicID to RadGrid2 which will then display all posts
    for that topic in seperate grid.  Would be  nice to have RadGrid2 visible = false UNTIL user clicks on this link



    telerik:GridTemplateColumn UniqueName="Item" HeaderText="Item" ReadOnly="true" SortExpression="ITEM">






    # setPosts(Convert.ToInt32(Eval("Posts")))%>   -- this code sets a variabe in code behind so can be determined in next line




    if (Posts > 0)


    { %>


    -- this is where I need the help
    a href="#" runat="server" onserverclick='<%# withPosts(Convert.ToInt32(Eval("ID"))) %>'><%# DataBinder.Eval(Container.DataItem, "Item")%> (<%# DataBinder.Eval(Container.DataItem, "Posts")%>)





    <%} %>




    { %>


    <a href="#" onclick="openAddTopicWindow('<%# DataBinder.Eval(Container.DataItem, "ID") %>'); return false;"><%# DataBinder.Eval(Container.DataItem, "Item")%> (<%# DataBinder.Eval(Container.DataItem, "Posts")%>)





    <%} %>








  2. Martin
    Martin avatar
    823 posts

    Posted 18 Aug 2009 Link to this post

    Hello Thomas,

    We would need some more information about your scenario. Please send us a simplified sample project that we can debug locally. You can exclude any code that is not connected to the needed functionality.

    Looking forward to your reply.

    Best regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top