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

GridDropDownColumn with onneeddatasource

3 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 19 Aug 2011, 05:23 PM
Hi,

i'm binding my radgrid1 to an onneeddatasource. All of the columns work fine except for the GridDropDownColumn. This column fail to populate with data in regular mode.

 

 

<telerik:GridDropDownColumn DataField="_UnloadTypeName"  

DataSourceID="RadGrid1_NeedDataSource"  

FilterControlAltText="Filter UnloadTypeColumn column"  

HeaderText="Unloading Type" ListTextField="_UnloadTypeName"  

ListValueField="_UnloadTypeName" UniqueName="UnloadTypeColumn">  

 

<HeaderStyle Width="100px" />  

 

<ItemStyle Width="100px" />  

 

</telerik:GridDropDownColumn>

please help.

thanks,
Minh Bui

 

3 Answers, 1 is accepted

Sort by
0
Susan
Top achievements
Rank 1
answered on 19 Aug 2011, 08:39 PM
Hi. This may not help any, but here's a sample of what I'm using. I'm having editing issues myself, but this is working fine to get the data:
<telerik:GridDropDownColumn DataField="store" HeaderText="Store" UniqueName="store" DataSourceID="SqlDataSource2"
       ListTextField="store" ListValueField="store">
</telerik:GridDropDownColumn>
 
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT distinct store FROM [stores] order by store"></asp:SqlDataSource>

Of course it is using a SqlDataSource2 instead of the same SqlDataSource1 as the rest of the grid. I'm not sure how they would use the same data source. Anyway, I'm just figuring this stuff out myself, so this may not be of any help to you, but I tried.

Michael
0
Minh
Top achievements
Rank 1
answered on 19 Aug 2011, 09:10 PM
Hi,

yes...this is to populate the dropdown during insert and update. I'm having problem getting the grid to come up with the original inserted value.

thanks,
Minh Bui
0
Accepted
Shinu
Top achievements
Rank 2
answered on 22 Aug 2011, 05:00 AM
Hello Minh,

When in browser mode, GridDropDownColumn looks and behaves like a standard GridBoundColumn. When in edit mode, however, it displays a drop-down control for each edited cell in the column.

Thanks,
Shinu.
Tags
Grid
Asked by
Minh
Top achievements
Rank 1
Answers by
Susan
Top achievements
Rank 1
Minh
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or