Hi,
I'm on the way to migrate from RadGrid - ASP.NET to RadGrid-Prometheus.
MOST of the things worked without problems - but now I get stucked.
My Data has a DropDownList.
It refers to an external table.
This table holds entries like
Driver (fast)
Driver (slow)
Biker (cool)
Biker (fast)
Biker (old)
Diver (deep)
Diver (safe)
and so on.
Think of it that every "Member" is a Driver or a Biker or a Diver.
This role must never change.
But the "Subrole" (fast, slow) and so on can change.
So in editmode I want to restrict the DropDown Entries to those from the same "Class".
With the "old grid" (RC for ASP.NET) I manage the things by using:
This does not work in Prometheus Grid.
ddList.Selected item is null!
Debugging the things I found ddList is empty at the time the databound event fires.
I guess there is some differnt data binding logic, or the databound event is fired "too early".
Any ideas how I can manage this?
Regards
Manfred
I'm on the way to migrate from RadGrid - ASP.NET to RadGrid-Prometheus.
MOST of the things worked without problems - but now I get stucked.
My Data has a DropDownList.
It refers to an external table.
This table holds entries like
Driver (fast)
Driver (slow)
Biker (cool)
Biker (fast)
Biker (old)
Diver (deep)
Diver (safe)
and so on.
Think of it that every "Member" is a Driver or a Biker or a Diver.
This role must never change.
But the "Subrole" (fast, slow) and so on can change.
So in editmode I want to restrict the DropDown Entries to those from the same "Class".
With the "old grid" (RC for ASP.NET) I manage the things by using:
| protected void rgRaidMembers_ItemDataBound(object sender, GridItemEventArgs e) { |
| if (e.Item is GridEditableItem && e.Item.IsInEditMode) { |
| GridEditFormItem eeditedItem = e.Item as GridEditFormItem; |
| GridEditManager editMan = editedItem.EditManager; |
| GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("ClassID")); |
| DropDownList ddList = editor.DropDownListControl; |
| string[] strA = ddList.SelectedItem.Text.Split(' '); |
| if (strA.Length < 2) { |
| return; |
| } |
| for (int nX = 0; nX < ddList.Items.Count; nX++) { |
| if (!ddList.Items[nX].Text.StartsWith(strA[0])) { |
| ddList.Items.RemoveAt(nX); |
| nX--; |
| } |
| } |
| } |
| } |
This does not work in Prometheus Grid.
ddList.Selected item is null!
Debugging the things I found ddList is empty at the time the databound event fires.
I guess there is some differnt data binding logic, or the databound event is fired "too early".
Any ideas how I can manage this?
Regards
Manfred