hello,
i am using a UserControl for my grid's EditForm. usually i have no problems.
but now i have a problem.. if i use a normal RadComboBox:
...this works when i bind to it like so:
BUT, if i try to use multi columns:
...then the ComboBox fails to render anything -- i only see my separator char, " - ".. No "VictimNumber" nor "Name".
why is this happening?
to test, i placed the same into a non-grid, normal ASPX page. worked fine there.
thanks,
matt
i am using a UserControl for my grid's EditForm. usually i have no problems.
but now i have a problem.. if i use a normal RadComboBox:
| <Telerik:RadComboBox ID="rcbVictims" |
| DataValueField="VictimPersonID" |
| DataTextField="Name" |
| DropDownWidth="300" |
| ShowToggleImage="false" |
| AllowCustomText="False" |
| MarkFirstMatch="true" |
| Skin="Gray" |
| TabIndex="2" |
| runat="server"> |
| </Telerik:RadComboBox> |
...this works when i bind to it like so:
| private void MyEditForm_DataBinding(object sender, System.EventArgs e) |
| { |
| //bind |
| rcbVictims.DataSource = Victims.GetVictimsByReport(reportID); |
| rcbVictims.DataBind(); |
| rcbVictims.Items.Insert(0, new RadComboBoxItem()); |
| //set current value |
| rcbVictims.Items.FindItemByValue(DataBinder.Eval(this.DataItem, "VictimPersonID").ToString()).Selected = true; |
| rcbVictims.DataSource = null; |
| } |
BUT, if i try to use multi columns:
| <Telerik:RadComboBox ID="rcbVictims" DataValueField="VictimPersonID" DataTextField="Name" DropDownWidth="300" ShowToggleImage="false" AllowCustomText="False" MarkFirstMatch="true" Skin="Gray" TabIndex="2" runat="server"> |
| <ItemTemplate> |
| <%# DataBinder.Eval(Container.DataItem, "VictimNumber")%> - <%# DataBinder.Eval(Container.DataItem, "Name")%> |
| </ItemTemplate> |
| </Telerik:RadComboBox> |
...then the ComboBox fails to render anything -- i only see my separator char, " - ".. No "VictimNumber" nor "Name".
why is this happening?
to test, i placed the same into a non-grid, normal ASPX page. worked fine there.
thanks,
matt