I have a ultragrid with 2 valuelist columns.
when I select a value in the first column I change the valuelist in the second column.
Muy problem is when I change the row, when I select a diferent value en the first column I neede change the valuelist in the second column, but only en the second row.
The valuelist is asociate to the column, Can I associate a diferent valuelist by row?
Hello Patricia,
It is possible to associate a different ValueList on a per-cell basis. Each of the UltraGridCell elements that exists within each row’s Cells collection has a ValueList property that you can use to set the ValueList on a per-cell basis. Something you could do at the start in this case is to utilize the InitializeRow event of the UltraGrid to set your ValueList there, as the event arguments of that event can net you the row that is initializing. From there, you could index that row’s Cells collection and assign a ValueList, rather than assigning it to the column.
Please let me know if you have any other questions or concerns on this matter.
Hello Andrew,
Thanks, I've done it:
UltraGrid1.Rows(fila).Cells(UltraGrid1.DisplayLayout.Bands(0).Columns("BSubCategoria")).ValueList = UltraGrid1.DisplayLayout.ValueLists("ListaSubCategorias")
Another question please, what event do I have to use to capture the selection of a row? When a row is selected I want to display a button to delete the row.
I am curious if you really want selection or rather the activation of the row in this case. An activated row is essentially the “focused” one. In any case, I will answer both scenarios.
For the actual selection, you can use the AfterSelectChange event of the UltraGrid. Conversely for the row activation, you can use the AfterRowActivate event of the grid.
Thanks!!, I need use AfterSelectChange.
Helio,
Another question please, How can I filter in a cell valuelist?