This is a migrated thread and some comments may be shown as answers.

[Solved] Migration Problem

1 Answer 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 20 Mar 2008, 01:22 PM
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:
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

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 24 Mar 2008, 02:39 PM
Hello Manfred,

I tried to reproduce the erroneous behavior using the latest release of RadGrid Prometheus but unfortunately to no avail. To progress in our investigation, can you please isolate a stripped working version of your project, recreating the abnormality, and attach the previous version of the control you used which behaved normally? We will test it with both versions of our web grid and will get back to you with our findings.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Share this question
or