Odd behavior on Expand Collapse Group

2 posts, 0 answers
  1. Ed
    Ed avatar
    3 posts
    Member since:
    Sep 2013

    Posted 25 Oct Link to this post

    Hello, 

    I have a rad grid where grouping is being used.  The first column is a linkbutton which after 1 layer of being clicked into is then replaced with text to both disable and remove the link.  

    When I collapse and then re-expand the group the column values are now all gone. 

    Prior to collapsing my markup looks like 

    <td class="GrdBtn">

    <span style="cursor:default;">Sept 2016</span>

    </td>

    After clicking the collapse and then expanding the markup is 

    <td class="GrdBtn">

    <a href="javascript:__doPostBack('ReportGrid$ctl00$ctl05$ctl00','')"></a>

    </td>

     

    I cannot identify an event to which this occurs.  The column is defined in the apsx as 

       <telerik:GridButtonColumn ButtonType="LinkButton" ImageUrl="" HeaderText="Region" DataTextField="RegionName" ItemStyle-CssClass="GrdBtn" CommandName="Select" UniqueName="btnSelect" SortExpression="RegionName" HeaderStyle-Width="150px" />

     

    The event to which changes the linkbutton to a span is within the RadGrid_DataBound event and looks like 

    btn = CType(CType(Page.Form.FindControl("ReportGrid"), RadGrid).MasterTableView.Items(i).Cells(3).Controls(0), LinkButton)
    CType(Page.Form.FindControl("ReportGrid"), RadGrid).MasterTableView.Items(i).Cells(3).Controls.Remove(btn)
    Dim finalTxt As String = String.Format("<span style='cursor:default;'>{0}</span> ", btn.Text)
    Dim litControl As New LiteralControl(finalTxt)

    What event could be causing this?  Or how can i prevent this behavior from happening?

     

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 28 Oct Link to this post

    Hello Ed,

    The behavior you describe is rather strange. However, based on the provided information it would be hard to pinpoint what is causing the data to disappear.

    Would you ensure that you are not calling DataBind for RadGrid in the code-behind. If you would like to bind the Grid programmatically please use the NeedDataSource event.

    In case the behavior persists please send us the complete markup of the page with the relevant code-behind so we can examine it. Alternatively you can submit a support ticket with a small sample where the behavior is replicated. Thus, we will be able to examine the issue locally and look for its cause.

    Regards,
    Viktor Tachev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top