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

How to add a new templated column to a grid on click event?

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joonu
Top achievements
Rank 1
Joonu asked on 15 Nov 2012, 09:54 PM
Hi,

I have a grid that has 2 columns, something like the following:

Country India USA

GDP ($ trn) 1.85 15.09

Inflation (%) 7.9 2.0

Countries are selectable from dropdown lists, whereas the statistics pertaining to them are shown in read-only textboxes.

Now on top of the grid, I have a button titled 'Add', on clicking which a new templated column needs to get added to the grid. In the new column, I should be able to select a country from the dropdown list and then enter values for its GDP and inflation rate (textboxes for GDP and inflation in the new column are editable, unlike the ones for existing columns, which are read-only.)

Would the gridbuilder class be useful here? I was just taking a casual look at its documentation, don't know if it could help me.

Please advise on how this could be done.

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 20 Nov 2012, 01:39 PM
Hello Joonu,

I am afraid that the Grid does not support dynamically adding/removing columns. You can only hide/show columns with the corresponding methods of the client API.

I am sorry for any inconvenience caused.

Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Joonu
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or