by Jorge Sousa » 19 Jul 2012 16:02
Hi Scott
use Col.Name
Col:= gridJQuery.JQGridOptions.ColModel.Add;
Col.Name:= 'SomeName';
Anyway for XML Direct Data (Self.gridJQuery.JQGridOptions.DataType := gdtXmlString), the Col.Name it's not important, what matters is the column order to be matched with XML RowsNode child nodes order
if the Col will have the key field, set Col.Key:= True.
This is important for Grid Edit and Delete.
you can hide it with Col.Hidden:= True;
Look at our online documentation, or in the .CHM file included in CGComps installation path for the several options. Documentation is still a working progress, there's still a lot to document, mainly for the Grid, which is very complex.
About the XML Data, There are other alternatives as welll, including json data, colllections GridEventProvider where you define by events what to do on OnGet, OnAdd OnEdit, OnDelete (TreeGrid in Demo uses it).
And also
JQGridOptions.AddRow, JQGridOptions.SetCelll
Like I said, We are preparing a demo showing with all those alternatives.
if your XML Data has too many correspondent rows, passing the whole XMLData is not the best solution. Working with providers, the grid requests the server whenever it needs data or any other operation.
Best Regards
Jorge