If I specify my grid headers like this:
I would expect that since I'm telling it which field to match up, that I could control the order that the data item displays in. However it seems to render the columns based on the JSON property order instead.
So lets say the above is the correct order the json is coming down in, if I swapped the first two header items, theyd render swapped, but the data would bind as it did before, so the pdrs would be in the rotations column and visa versa.
data-columns='[{
"field"
:
"pdrID"
,
"title"
:
"PdrID"
},
{
"field"
:
"rotationName"
,
"title"
:
"Rotation"
},
{
"field"
:
"siteCapacityID"
,
"title"
:
"CapacityID"
},
{
"field"
:
"ruleID"
,
"title"
:
"RuleID"
},
{
"field"
:
"userID"
,
"title"
:
"UserID"
},
{
"field"
:
"name"
,
"title"
:
"Student"
},
{
"field"
:
"location"
,
"title"
:
"Site"
},
{
"field"
:
"statusDesc"
,
"title"
:
"Status"
},
{
"field"
:
"pref"
,
"title"
:
"Pref"
},
{
"field"
:
"campusName"
,
"title"
:
"Campus"
},
{
"field"
:
"startDate"
,
"title"
:
"Start"
},
{
"field"
:
"endDate"
,
"title"
:
"End"
}
]'
I would expect that since I'm telling it which field to match up, that I could control the order that the data item displays in. However it seems to render the columns based on the JSON property order instead.
So lets say the above is the correct order the json is coming down in, if I swapped the first two header items, theyd render swapped, but the data would bind as it did before, so the pdrs would be in the rotations column and visa versa.