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

How can we set the column properties dynamically

1 Answer 224 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raj Yennam
Top achievements
Rank 1
Raj Yennam asked on 18 Mar 2014, 03:28 PM
Hi,

I am binding dynamic data to kendo ui grid without defining schema. I have to set the column's title,type,sortable options dynamically. i tried to fetch the columns using 
grid.columns option in databound event. but what are the changes i made in databound event  are not reflecting to the grid.

i am defining the grid as below:

$("#grid").kendoGrid({
            dataSource: {
                transport: {
                    read: {
                        url: urlPath,
                        type: "POST",
                        data: {
                            count: function () { return $('#txt_no').val(); },
                                                       
                        }

                    }
                }

Please give a suggestion in which event i should set the column properties dynamically .

Thanks,
Raj Yennam

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 19 Mar 2014, 03:05 PM
Hello Raj,

Column settings cannot be changed after Grid initialization. I suggest you to retrieve them in advance and then create the Grid with the correct configuration.

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