jQuery UI Widgets Forums Grid Put a variable to enter name of the header

This topic contains 7 replies, has 2 voices, and was last updated by  lsmarco2008@gmail.com 10 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Hi,

    I have the following situation where I need it to function as the “exemp1”, but I tried to put a variable to enter the name of the header but it does not work, has a solution?

    exemp1: data = {HERE NOT ACCEPT VARIABLE: pregistroa [“col_001”]}

    exemp2: data = {Q1_1: pregistroa [“col_001”]} *** HERE IS OK, BUT NEED TO INFORM THE NAME OF THE HEADER WITH A VARIABLE AS ABOVE exemp1

    value = $ (“# GridExport”). jqxGrid (“addrow”, null, data)

    Thank you!


    Peter Stoev
    Keymaster

    Hi ismarco2008,

    You can set a column header only by setting the “text” property of your columns.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    But in this case could not separate the columns, is it? Then there is the possibility of informing the text of a column property through a variable?


    Peter Stoev
    Keymaster

    Hi lsmarco2008,

    If you wish, you can change a column header text by using the Grid’s setcolumnproperty method.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Following your instruction, you can adjust this line to the example below to see how I would change the text in the column?
    Â
    $ (‘# grid’) jqxGrid (‘setcolumnproperty’, ‘firstname’, ‘renderer’, headercheckboxRenderer).;

    exemp1: data = {HERE NOT ACCEPT VARIABLE: pregistroa [“col_001”]}

    exemp2: data = {Q1_1: pregistroa [“col_001”]} *** HERE IS OK, BUT NEED TO INFORM THE NAME OF THE HEADER WITH A VARIABLE AS ABOVE exemp1

    value = $ (“# GridExport”). jqxGrid (“addrow”, null, data)

    Thank you!

    Peter,

    The example below modifies the width, as would be the following model by modifying the text name of the header? How do I tell which column header you want to modify?

    $ (“# Objetives”) jqxGrid (‘setcolumnproperty’, ‘mValor’, ‘width’, 10).;

    Peter,

    I tried this way and it did not work, where am I going wrong?

    $ (“# GridExport”). JqxGrid (“setcolumnproperty”, “firstname”, “Q1_1”, “Questão1”)

    Hello,

    I saw an example that modifies the header.
    I’m trying this way, but to no avail, where I am going wrong?
    This property would change Q1_1 to Questão1, correct?

    $ (‘# GridExport’). JqxGrid (‘setcolumnproperty’, ‘firstname’, ‘Q1_1’, ‘Questão1’)

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

You must be logged in to reply to this topic.