Kendo UI grid Frozen column on dynamic columns

4 posts, 1 answers
  1. boney
    boney avatar
    3 posts
    Member since:
    Sep 2016

    Posted 11 Sep Link to this post

    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
  2. Answer
    Stefan
    Admin
    Stefan avatar
    272 posts

    Posted 14 Sep Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. boney
    boney avatar
    3 posts
    Member since:
    Sep 2016

    Posted 26 Sep in reply to Stefan Link to this post

    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

  5. boney
    boney avatar
    3 posts
    Member since:
    Sep 2016

    Posted 26 Sep in reply to boney Link to this post

    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

Back to Top
Kendo UI is VS 2017 Ready