jQuery UI Widgets Forums TreeGrid JQX Tree grid hide column on left

This topic contains 5 replies, has 2 voices, and was last updated by  Martin 6 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • JQX Tree grid hide column on left #103572

    Indumathi
    Participant

    Hi,

    Can I hide and show the leftmost column dynamically on a jqx tree grid?
    When I say hidden = true, the column value is hiding but the column and the header are still showing up….maybe because the tree grid has to show the indentation and the hierarchy over there? Is there a way that I can make this work? Show the hierarchy on the 2nd column (next to the leftmost column) when the leftmost is hidden and then show it on the leftmost when the column is showing.

    Thanks,
    Indu.

    JQX Tree grid hide column on left #103627

    Martin
    Participant

    Hello Indu,

    Yes, it is possible.
    Please, look at the following Example.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    JQX Tree grid hide column on left #103644

    Indumathi
    Participant

    Thank you so much for your reply…I was able to implement it.
    One more question:-
    If I want to partially edit the left most column…the indentation and everything should be there….but the data in the cell should change in some cases and not, depending on the value of the row (var row = $(“#jqxtreeGrid”).jqxTreeGrid(‘getRow’, rowkey);)….is there a way I can access the html of the cell in createEditor event? We have rowkey, cellvalue, editor, celltext, width and height as parameters…but not the cell html value. If I can access the html, then I can just return the html as-is without any changes in cases where I don’t want to change the look of the cell.

    Thanks,
    Indu.

    JQX Tree grid hide column on left #103661

    Martin
    Participant

    Hello Indu,

    You can get the html of a cell using document.querySelector inside the createEditor callback.
    You know the row id from the rowkey parameter, so you can use document.querySelector("[data-key='"+ row +"']").children[colId];.
    Here is an Example.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    JQX Tree grid hide column on left #103664

    Indumathi
    Participant

    Thank you!!! That does help.
    Only follow up question I have is:- if I want html of the editing cell before the editor is added, in which event should I use the document.querySelector in?

    Thanks,
    Indu.

    JQX Tree grid hide column on left #103709

    Martin
    Participant

    Hello Indu,

    You could use the rowClick event for such case. As then the editor is not created yet.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.