Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Simpler way to access Option in GridCtrl
Simpler way to access Option in GridCtrl [message #31987] |
Thu, 14 April 2011 10:34 |
|
koldo
Messages: 3355 Registered: August 2008
|
Senior Veteran |
|
|
Hello Daniel
Option() method is very nice but it is not possible to get access to the underlying control (for example to set a WhenAction()).
To get that possibility when adding a row I have to do this:
while(SQL.Fetch()) { // Loop for all fetched data
grid.Add(); // Added new row
for (int i = 0; i < fields.GetCount(); ++i) { // For all fields
sqlBase.grid(i) = SQL[i]; // Filling with data
if (column is Option) { // THIS HAVE TO BE DONE FOR ALL ROWS
Option *opt = new Option(); // new Option()
opt->WhenAction = THISBACK(MyCallback); // Set the callback to the control
sqlBase.grid.SetCtrl(i, opt); // Set the control to the cell
}
}
}
Is there any simpler possibility?
Best regards
IƱaki
|
|
|
Goto Forum:
Current Time: Fri Mar 29 17:01:57 CET 2024
Total time taken to generate the page: 0.02990 seconds
|