This is a migrated thread and some comments may be shown as answers.

Odd behavior on Expand Collapse Group

1 Answer 8 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 25 Oct 2016, 04:09 PM

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?

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 28 Oct 2016, 01:01 PM
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.
Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or