Guys, this might be a bug...
I searched everywhere for this topic, but it seems like im the only one. For what I understand, you can Bind a GridDropDownColumn with an objectDataSource that includes a DataSet, and then use the ListDataMember to point to the right DataTable in the DataSet... right???
Well, I get an error that says that I should leave the property empty so DefaultView can be used. After debugging for a while, I noticed that it selects the first table and its named DefaultView.
This is my code:
| <!--DataSources--> |
| <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" |
| EnablePaging="false" SelectMethod="SelectCatalog" |
| TypeName="XXX.Web.Common.clCatalogs" |
| onselecting="ObjectDataSource2_Selecting"> |
| </asp:ObjectDataSource> |
| <!--Column Definition--> |
| <telerik:GridDropDownColumn HeaderText="Substrate" DataField="SubstrateId" DataSourceID="ObjectDataSource2" ListDataMember="catSubstrate" |
| DataType="System.Int32" ListTextField="Code" ListValueField="Id" UniqueName="colSubstrate"> |
| </telerik:GridDropDownColumn> |
| //Business Object Class |
| [DataObject(true)] |
| public class clCatalogs |
| { |
| public clCatalogs(){} |
| [DataObjectMethod(DataObjectMethodType.Select, true)] |
| public static DataSet SelectCatalogs() |
| { |
| return (DataSet)HttpContext.Current.Cache["dsCatalogs"]; |
| } |
| } |
Anybody see's anything weird? One thing tough, is that if I use DataTable as a return type it works, but im interested in DataSet.
Thanx for the help
Victor