MY XML.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
CostumerId
ProductID
NameOfCosutumer
Addres
1
45
Martin
cll 4 # 36 54
2
48
Sandra
cll 4 # 36 as
HOW TO SET COLUMN NAMES ON THE XML FILE FOR THAT DATAPROCESOR ON SENDDATA() EVENT TAKE THE RESPECTIVE COUMN NAMES.
You should use following data processor command:
dp.enableDataNames(true);
Ok, I set the dataprocesor with enableDataNames(true) but on server side or queryString the column names are undefined for example
request.getQueryString() = gr_id=23636&undefined=23636&undefined=45
SO, in my xml where put the name values??? pls example
Unfortunately we cannot reproduce this issue locally. Please contact support@dhtmlx.com and provide sample where we can reproduce this issue.
ok, instead the answer.
Configuration via xml. What is attribute that set the name of column. FOR EXAMPLE
IN THIS XML WHERE AND WHAT ATTRIBUTE I MUST PUT.
CostumerId
ProductID
OR YOU CAN ATTACH A XML CONFIGURATION EXAMPLE WITH NAME COLUMNS?
THANKS
xm tag has attribute “id” which will be used as column id.
Product Label
You can find dhtmlxGrid xml format explanation here dhtmlx.com/docs/products/docsExp … dhtmlx_xml
PERFECT !!!
SORRY I HAVE A NEW QUESTION ABOUT THIS TOPIC.
I CAN GET THE VALUE OF CELL WITH THE COLUMN NAME??
FOR EXAMPLE
Product Label
mygrid.cells(mygrid.getSelectedRowId(),“ProductID”).getValue();
HOW TO??
You can get cell’s value if you know row ID or row Index and column Index:
var value=mygrid.cellById(rowID,cellINDEX).getValue();
or
var value=mygrid.cellByIndex(rowINDEX,cellINDEX).getValue();
If you know id of column you can get it’s index using:
var columnINDEX=mygrid.getColIndexById(columnID);
Also you can get column id if you know it’s index:
var columnID=mygrid.getColumnId(columnINDEX);
You can find list of all available API methods here dhtmlx.com/docs/products/dhtmlxG … grid_api_a