Hi,
I am using Telerik controls for displaying data.
Inside the Telerik grid i have to show radcombobox.
I have done this using Template column, but now i am trying the same using telerik GridDropDownColumn.
For providing data to the grid, i am using a SQL data source and for populating dropdown i am using separate sql data source.
I have tried two scenarios here:
1) When the query to populate the dropdown is a subset of the main query to populate the rad grid. (In this case it was working good).
2) When the query to populate the dropdown is coming from a different table, i am getting "'System.Data.DataRowView' does not contain a property with the name ERROR" in this case.
I dont know if i am missing any property to set for the dropdown column.
Below is the same code for this....
<telerik:RadGrid ID="rgrdUpdateDropdown" runat="server" DataSourceID="dsDropDown" GridLines="None" Width="600px">
<MasterTableView AutoGenerateColumns="False" EditMode="InPlace" DataSourceID="dsDropDown" DataKeyNames="COMM_CD">
<Columns>
<telerik:GridEditCommandColumn UniqueName="EDIT_IMAGE" ButtonType="LinkButton" EditText="Edit">
<ItemStyle Width="2%"/>
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="COMM_CD" HeaderText="ID" UniqueName="COMM_CD">
</telerik:GridBoundColumn>
<telerik:GridDropDownColumn DataSourceID="dsDropDown2" HeaderText="Editable" UniqueName="Dropdown1" DataField="POSSE_ADDR"
ListTextField="POSSE_ADDR" ListValueField="POSSE_ADDR" DropDownControlType="RadComboBox">
</telerik:GridDropDownColumn>
<telerik:GridDropDownColumn DataSourceID="dsDropDown" HeaderText="Editable1" UniqueName="Dropdown12" DataField="COMM_CD"
ListTextField="COMM_CD" DropDownControlType="RadComboBox">
</telerik:GridDropDownColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="dsDropDown" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "COMM_CD","COMM_NAME" FROM "COMMUNITY"'>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsDropDown2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT DISTINCT "POSSE_ADDR" FROM "ADDRESS" WHERE ROWNUM < 10'>
</asp:SqlDataSource>
Thanks
SKY
I am using Telerik controls for displaying data.
Inside the Telerik grid i have to show radcombobox.
I have done this using Template column, but now i am trying the same using telerik GridDropDownColumn.
For providing data to the grid, i am using a SQL data source and for populating dropdown i am using separate sql data source.
I have tried two scenarios here:
1) When the query to populate the dropdown is a subset of the main query to populate the rad grid. (In this case it was working good).
2) When the query to populate the dropdown is coming from a different table, i am getting "'System.Data.DataRowView' does not contain a property with the name ERROR" in this case.
I dont know if i am missing any property to set for the dropdown column.
Below is the same code for this....
<telerik:RadGrid ID="rgrdUpdateDropdown" runat="server" DataSourceID="dsDropDown" GridLines="None" Width="600px">
<MasterTableView AutoGenerateColumns="False" EditMode="InPlace" DataSourceID="dsDropDown" DataKeyNames="COMM_CD">
<Columns>
<telerik:GridEditCommandColumn UniqueName="EDIT_IMAGE" ButtonType="LinkButton" EditText="Edit">
<ItemStyle Width="2%"/>
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="COMM_CD" HeaderText="ID" UniqueName="COMM_CD">
</telerik:GridBoundColumn>
<telerik:GridDropDownColumn DataSourceID="dsDropDown2" HeaderText="Editable" UniqueName="Dropdown1" DataField="POSSE_ADDR"
ListTextField="POSSE_ADDR" ListValueField="POSSE_ADDR" DropDownControlType="RadComboBox">
</telerik:GridDropDownColumn>
<telerik:GridDropDownColumn DataSourceID="dsDropDown" HeaderText="Editable1" UniqueName="Dropdown12" DataField="COMM_CD"
ListTextField="COMM_CD" DropDownControlType="RadComboBox">
</telerik:GridDropDownColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="dsDropDown" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "COMM_CD","COMM_NAME" FROM "COMMUNITY"'>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsDropDown2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT DISTINCT "POSSE_ADDR" FROM "ADDRESS" WHERE ROWNUM < 10'>
</asp:SqlDataSource>
Thanks
SKY