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

manipulating client side columns by name instead of index

4 Answers 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 26 Feb 2016, 02:09 PM

You guys ought to create .hide(), .show(), etc, or similar methods on your client-side GridColumn object. In that way, users will be able to get a reference to a particular column by UniqueName using the tableView method getColumnByUniqueName and perform actions, like hiding. As it stands, in order to hide a column, one must use the hideColumn method of the TableView object and this expects an index argument. Referencing grid column indexes leads to really fragile code since grid columns can be inserted/removed all the time and one might not think to look at some obscure javascript that depends on the order of columns.

You could also add a get_index() method to the GridColumn which would facilitate obtaining the index without hard-coding it.

4 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 02 Mar 2016, 09:53 AM
Hello Albert,

Thank you for the provided suggestions. You can use our feedback portal to log all the feature requests you want. Thus other users can vote for your item and increase its priority.
As for the current requirements we will take them into account, but note that currently you can hide/show a column on the client using the approach demonstrated in the demo below:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/clientsideapi/defaultcs.aspx

Regards,
Maria Ilieva
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 09 May 2017, 05:05 PM
Has any work been done in this area? This is a glaring weakness of the client-side AP of RadGrid. Nobody who wants to write anything but horribly fragile code, accesses grid columns, primarily by index.
0
Peter Milchev
Telerik team
answered on 12 May 2017, 12:09 PM
Hello Albert,

Thank you for your feedback.

I examined the feedback portal items and were unable to find a logged feature request. I am afraid that without a filed feature request it is hard to determine the client demand for this feature and to properly prioritize it in the backlog.  

Nevertheless, I notified our management about this request and hopefully, it will be implemented in the future.

Regards,
Peter Milchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 12 May 2017, 12:46 PM
There are some things that are self-evident and shouldn't require client polling. You guys are running a software company, not a political campaign.
Tags
Grid
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Maria Ilieva
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Peter Milchev
Telerik team
Share this question
or