Dear All,
I would like to expand child rows based on a column condition in the parent row after the refresh on the UltraGrid.
For example only those rows where the column "comfired" = false need to be expanded.
Kind regards,
Peter.
foreach (UltraGridRow row in this.ultraGrid1.Rows) { if ((bool)row.Cells["Boolean 1"].Value == false) row.Expanded = true; else row.Expanded = false; }
Hello Mike,
I try to write this in Progress ABL
But the compiler does not understand it after the for each.
for each (UltraGridRow row in ultraGridOutput): if ((bool)row.Cells["Confirmed"] = false) then row:expanded = true. end.
Hope you can help me on some ABL coding.
Peter
I don't know anything about Progress ABL, that's not one of our supported languages. So if you need help with the syntax of that language you'd have to contact Progress support.
If you can't use a 'foreach' loop then you could do the same thing using a 'for' loop.
foreach (int i=0; i < this.ultraGrid1.Rows.Count; i++) { UltraGridRow row = this.ultraGrid1.Rows[i]; if ((bool)row.Cells["Boolean 1"].Value == false) row.Expanded = true; else row.Expanded = false; }
foreach (int i=0; i < this.ultraGrid1.Rows.Count; i++) {
UltraGridRow row = this.ultraGrid1.Rows[i]; if ((bool)row.Cells["Boolean 1"].Value == false) row.Expanded = true; else row.Expanded = false; }
I have got this from Mike Fechner.
With https://github.com/consultingwerk/ListsAndEnumSamples/blob/master/Consultingwerk/foreach.i
Boolean 1 would be the name of the grid cell that determines if you'd like to expand the row or now.
ultraGrid1 is the Grid reference.
You may need a few USING statements.
{Consultingwerk/foreach.i UltraGridRow oRow in ultraGrid1:Rows}
IF
UNBOX
(oRow:Cells[
"Boolean 1"
]:
Value
) =
FALSE
THEN
oRow:Expanded =
TRUE
.
ELSE
oRow:Expenaded =
END
Architect of the SmartComponent Library and WinKit
Consultingwerk Ltd.
- See more at: https://community.progress.com/community_groups/openedge_development/f/19/p/30359/101259#101259