Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Hello, world!" example for DevExpress QuantumGrid?

I successfully installed the latest QuantumGrid from DevExpress, but I've never worked with this grid before, and I don't know how to get started. I find that the HLP file isn't really a tutorial, and the demos are so rich to the point where I can't get started quickly and see if QuantumGrid fits my needs.

Would someone happen to have a really basic example on how to create a small, non-DB-bound, non-hierarchized, but user-editable grid to host a couple of columns and fill the grid with a few rows?

Thank you.

like image 925
Gulbahar Avatar asked Sep 05 '09 21:09

Gulbahar


1 Answers

Place a grid on a form, then delete its default GridView and add a TableView. Add a few columns to TableView and then associate your GridLevel with this new view. Place a button on form and add this code to its click handler.

cxGrid1TableView1.DataController.BeginFullUpdate;
try
  cxGrid1TableView1.DataController.RecordCount := 3;
  cxGrid1TableView1.DataController.SetValue(0,0,'Data1');
  cxGrid1TableView1.DataController.SetValue(1,0,'Data2');
  cxGrid1TableView1.DataController.SetValue(2,0,'Data3');
finally
  cxGrid1TableView1.DataController.EndFullUpdate;
end;

RecordIndex corresponds to the row index and ItemIndex corresponds to the column index. I hope this helps you to get started.

like image 85
idursun Avatar answered Sep 28 '22 07:09

idursun