This is a migrated thread and some comments may be shown as answers.
Hide/Show column in edit mode depending on value of other column
3 Answers 19 Views
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 19 Feb 2016, 01:07 PM

Hi 

I have a grid with several GridDropDownColumn. 
I want to be able to show/hide of few of these GridDropDownColumn depending on what is selected in on of the other GridDropDownColumn.

How can I perform this? Is it possible client side.

I know how to find a Dropdowncontrol if I use GridTemplateColumn and disable the control but I would prefer the show/hide the entire column

 

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 24 Feb 2016, 07:38 AM
Hi Peter,

Some of the columns generate their editing controls automatically, which brings convenience to the developer constructing the grid CRUD system. GridNumericColumn, for example, creates a RadNumericTextBox input control to enable only numeric characters when updating a numeric field. The ID of the automatically generated control starts with the RNTB prefix, which is abbreviation for RadNumericTextBox.
Copy Code
var numBox = $telerik.findControl(container, "RNTB_numboxID");

When Template form is used, however, the ID of any inner control is set manually. And it can be accessed later on using the same ID.

I suggest that you check the sample provided in the following post:
http://www.telerik.com/forums/find-control-in-insert-item-grid-client-side#2tgx6AugyU6c562P--mIIg

I hope this will prove helpful.

Regards,
Eyup
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
Peter
Top achievements
Rank 1
answered on 01 Mar 2016, 10:29 AM
I can get the control by ID, but it is possible to get row in the editform that contains the control and hide the entire row or get the label/header control and hide that as well
0
Eyup
Telerik team
answered on 04 Mar 2016, 06:40 AM
Hi Peter,

Generally, you can use the someTelerikControl.get_parent() method to access the container grid item. It may require that you generate the items objects beforehand using grid.get_masterTableView().get_dataItems().

Regards,
Eyup
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
Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Peter
Top achievements
Rank 1
Share this question
or