Completed
Last Updated: 27 Oct 2022 12:55 by ADMIN
David
Created on: 12 Oct 2022 20:38
Category: UI for ASP.NET AJAX
Type: Feature Request
0
Inability to change RadGridHeader dynamically without loosing HeaderContext filter type icon

Scenario: need dynamically change header test on dropdown change, while retaining HeaderContext filter type icon

After conversation with support created this request

4 comments
David
Posted on: 27 Oct 2022 12:54

It works!

Thank you

ADMIN
Doncho
Posted on: 25 Oct 2022 12:25

Hi David,

Thank you for your opening a public item as I have suggested!

I am joining this thread with some good news. We have discussed the current issue with Attila and investigated it further. It turned out that the desired behavior is actually pretty easy to achieve.

The current case is about renaming a GridColum dynamically on the server side. You can change the HeaderText of a column at any stage, you will just need to Rebind the Grid afterward so the change takes effect. That way you can avoid the tricky client-side approach I suggested in the initial ticket.

For instance:

<asp:DropDownList ID="ddlYears" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlYears_SelectedIndexChanged">
    <asp:ListItem Value="2021" Text="2021" />
    <asp:ListItem Value="2022" Text="2022" />
</asp:DropDownList>
<telerik:RadGrid ID="RadGrid1" runat="server" ....>

VB

Protected Sub ddlYears_SelectedIndexChanged(sender As Object, e As EventArgs)
    Dim col = RadGrid1.MasterTableView.GetColumn("ShipName")
    col.HeaderText = ddlYears.SelectedValue
    RadGrid1.Rebind()
End Sub

Please give this a try and let me know if any questions come up.

As the current Bug Report is regarding customization of the default Grid behavior I will convert it to a Feature Request. I will also set its status to NeedMoreInfo while expecting your feedback if the suggested approach will fit the current requirements.

Kind regards,
Doncho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

David
Posted on: 19 Oct 2022 12:24

It is not described functionality, but limitation. 

Here is Doncho's recommendation, that i acted upon

Hi David,

I agree with your point. Yet, the RadGrid is a pretty complex control, and implementing the requested behavior would require a significant change in the source code of the control which comes with a high risk of introducing regressions.

Still, if you consider that this should be an available feature for the Grid please feel free to log it as a feature request in our FeedbackPortal. That way it can collect votes and gather measurable demand. If the interest gets high our developers will consider its implementation in the future.

ADMIN
Attila Antal
Posted on: 19 Oct 2022 12:19

Hi David,

Please note that Bugs can only be reported for embedded functionalities that do not work as expected.

Could you please point me out the Functionality that does now work as described in the RadGrid documentation

Once you share more details we will investigate the issue and share our feedback!

I look forward to hearing from you.

Regards,
Attila Antal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.