jQWidgets Forums

jQuery UI Widgets Forums General Discussions Globalization to Jqwidgets controls

Tagged: 

This topic contains 7 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 11 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Globalization to Jqwidgets controls #52927

    chengamkathiravan
    Participant

    Hi,

    Please answer to the below questions at earliest.

    1) How to apply globalization to jqwidgets controls?
    2) Is it supporting globalization for jqwidgets controls like label,grid,input,tabs,button,datatable,menu?
    3) Mainly we need to set text for text/headertext attribute to controls?
    4) How to pass custom text from DB or xml to controls headertext or text ? Please give some examples and online demos.

    Best Regards
    Bala.

    Globalization to Jqwidgets controls #52928

    Peter Stoev
    Keymaster
    Globalization to Jqwidgets controls #52936

    chengamkathiravan
    Participant

    Hi Peter,

    Thanks for your reply and demo pages.

    For example I want to set the column header text(NAME) of jqxgrid by my custom text from DB.

    $(“#jqxgrid”).jqxGrid(
    {
    width: 850,
    source: dataAdapter,
    showfilterrow: true,
    filterable: true,
    pageable: true,
    autoheight: true,
    editable: true,
    localization: getLocalization(),
    selectionmode: ‘singlecell’,
    columns: [
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, datafield: ‘name’, width: 180 },
    { text: ‘Produkt’, filtertype: ‘textbox’, datafield: ‘productname’, width: 220 },
    { text: ‘Datum’, datafield: ‘date’, columntype: ‘datetimeinput’, filtertype: ‘date’, width: 210, cellsalign: ‘right’, cellsformat: ‘d’ },
    { text: ‘Qt.’, datafield: ‘quantity’, columntype: ‘numberinput’, filtertype: ‘textbox’, cellsalign: ‘right’, width: 60 },
    { text: ‘Preis’, datafield: ‘price’, columntype: ‘numberinput’, filtertype: ‘textbox’, cellsformat: “c2”, cellsalign: ‘right’ }
    ]
    });

    How to set header text(text) from DB ? Please give the example/code for it.

    Best Regards
    Bala.

    Globalization to Jqwidgets controls #52947

    Peter Stoev
    Keymaster

    Hi Bala,

    The “text” property which you set specifies the Column Header’s Text i.e “Name”, “Produkt”, “Datum”, etc.

    Best Regards,
    Peter Stoev

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

    Globalization to Jqwidgets controls #53020

    chengamkathiravan
    Participant

    Hi Peter,

    Thanks for your reply.

    Meanwhile we have a text from resource file as “Spara”. I want to set this text to a Button in jquery as “value” property.

    How to set this text to jqxsave button in jquery.

    Html:-
    <input type=”button” id=”jqxSave” />

    Script:-
    <script type=”text/javascript”>
    $(document).ready(function () {
    var valtext = ‘<%= GetLocalResourceObject(“Save”) %>’;
    $(“#jqxSave”).jqxButton({ value: valtext });

    });
    </script>

    In above example we want to set output of “valtext” to jqxsave button in jquery?

    I set value “Valtext” as above. But it is not working.

    Please help in this regard.

    Best Regards
    Bala.

    Globalization to Jqwidgets controls #53021

    Peter Stoev
    Keymaster

    Hi Bala,

    $(“#jqxSave”).val() would work.
    

    Example: http://jsfiddle.net/jqwidgets/mTqtr/

    Hope this helps.

    Best Regards,
    Peter Stoev

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

    Globalization to Jqwidgets controls #53052

    chengamkathiravan
    Participant

    Hi Peter,

    Ok. Thanks.

    Now it is working fine for jqxbutton value.

    In the case of jqxGrid,

    $(“#jqxgrid”).jqxGrid(
    {
    width: 850,
    source: dataAdapter,
    showfilterrow: true,
    filterable: true,
    pageable: true,
    autoheight: true,
    editable: true,
    localization: getLocalization(),
    selectionmode: ‘singlecell’,
    columns: [
    { text: ‘Name’, columntype: ‘textbox’, filtertype: ‘textbox’, datafield: ‘name’, width: 180 },
    { text: ‘Produkt’, filtertype: ‘textbox’, datafield: ‘productname’, width: 220 },
    { text: ‘Datum’, datafield: ‘date’, columntype: ‘datetimeinput’, filtertype: ‘date’, width: 210, cellsalign: ‘right’, cellsformat: ‘d’ },
    { text: ‘Qt.’, datafield: ‘quantity’, columntype: ‘numberinput’, filtertype: ‘textbox’, cellsalign: ‘right’, width: 60 },
    { text: ‘Preis’, datafield: ‘price’, columntype: ‘numberinput’, filtertype: ‘textbox’, cellsformat: “c2″, cellsalign: ‘right’ }
    ]
    });

    For example

    var name=”test1″;
    var Produkt=”test2″;
    var Datum=”test3″;
    var Qt=”test4″;
    var Preis=”test5”;

    Now to set the text field “Name” to be set by “name” variable and so on.

    { text: ‘+name+’, columntype: ‘textbox’, filtertype: ‘textbox’, datafield: ‘name’, width: 180 },
    { text: ‘ +Produkt + ‘, filtertype: ‘textbox’, datafield: ‘productname’, width: 220 },
    { text: ‘+Datum+’, datafield: ‘date’, columntype: ‘datetimeinput’, filtertype: ‘date’, width: 210, cellsalign: ‘right’, cellsformat: ‘d’ },
    { text: ‘+Qt.+’, datafield: ‘quantity’, columntype: ‘numberinput’, filtertype: ‘textbox’, cellsalign: ‘right’, width: 60 },
    { text: ‘+Preis+’, datafield: ‘price’, columntype: ‘numberinput’, filtertype: ‘textbox’, cellsformat: “c2”, cellsalign: ‘right’ }

    Meanwhile we want to set text property by variable for jqxgrid. How to do it?

    The above syntax is not working?

    Best Regards
    Bala.

    Globalization to Jqwidgets controls #53054

    Peter Stoev
    Keymaster

    Hi Bala,

    Please, look at the samples I posted you earlier. There you will find a sample about Localizing all the Grid texts.

    Also note that text: ‘+name+’ represents a JavaScript Syntax Error. It should be name, because that is your variable.

    Best Regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.