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

Kendo UI grid Frozen column on dynamic columns

3 Answers 316 Views
Grid
This is a migrated thread and some comments may be shown as answers.
boney
Top achievements
Rank 1
boney asked on 11 Sep 2016, 09:49 AM

Hi Telerik Team,

Here I have a scenario working on telerik KendoUI grid with frozen column. I have a set of frozen columns and a set of scroll columns which are on the right side of the grid .We have a grid that shows availability of resource for the certain time interval  shown in weeks. Resource name,project name,skills are frozen columns and say for an example weeks starting from Sep 1- Dec 15 to be shown as scrolled columns.So these week column are dynamic in nature. I got the grid as above by giving static columns but the requirement is that these columns are dynamic. Again I tried to create columns dynamically through JavaScript in a loop but I lost the frozen column feature in the grid. Thanks for any help.

 

Thanks and Regards

Boney M

3 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 14 Sep 2016, 12:09 PM
Hello Boney,

Thank you for the interest in Kendo UI.

The recommended approach when some of the columns can be added dynamically is to destroy the Grid and to re-create it:

http://docs.telerik.com/kendo-ui/intro/widget-basics/destroy

If all of the columns are available during initialization, I can suggest hideColumn and showColumn methods of the Grid:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-hideColumn

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-showColumn

Additionally, the columns can be locked after Grid' initialization using the lockColumn method of the Grid:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-lockColumn

I hope this will help you to achieve the desired result.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
boney
Top achievements
Rank 1
answered on 26 Sep 2016, 07:07 AM

Hi Stefan,

Thanks for the reply.

This post however helps me to resolve the issue.Able to create frozen table which are dynamic in nature.

Now I have got another problem. Above the grid listing I have a list of filters as shown in the attachment.

I need to implement the searching and used ajax call to post request on search. This grid works well in a normal grid but when

in a frozen column it breaks and shows error in console as "TypeError: r is undefined".See the attachments.Please reply as early as possible.

 

Thanks and Regards

Boney M

0
boney
Top achievements
Rank 1
answered on 27 Sep 2016, 04:15 AM

hi Stefan,

I just got a solution. While searching before binding kendoGrid just need to clear that div placeholder for Kendogrid and then bind the kendogrid that solves.

Thanks and Regards

Boney M

Tags
Grid
Asked by
boney
Top achievements
Rank 1
Answers by
Stefan
Telerik team
boney
Top achievements
Rank 1
Share this question
or