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

dropdown in RadGrid

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 18 Feb 2011, 10:36 PM
Hi
I have the following within a RadGrid

<telerik:GridTemplateColumn Visible="False" DataField="fk_project_id" DataType="System.Int64" FilterControlAltText="Filter fk_project_id column" HeaderText="Project" SortExpression="fk_project_id" UniqueName="fk_project_id">
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="fk_project_idRadComboBox" runat="server" DataSourceID="sdsProjects" EmptyMessage="begin typing project# or name" AllowCustomText="true" Width="300px" Filter="contains"
                             DataTextField="project_full" DataValueField="id" SelectedValue='<%# Bind("fk_project_id") %>'>
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="fk_project_idLabel" runat="server" Text='<%# Eval("fk_project_id") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>

Im using a SqlDataSource to perform the insert but I cant seem to get the value from the radComboBox to perform the insert.
Here is the code from the Insert Parameter section
<asp:ControlParameter ControlID="fk_project_idRadComboBox" PropertyName="DataValueField" Name="fk_project_id" DbType="Int32" /> 

should I not be using a control parameter here to get at the value?           
Any help would be greatly appreciated.
Thanks
Alex

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Feb 2011, 06:44 AM
Hello Alex,

Instead of using ControlParameter, you can directly set the Name property in asp:Parameter inside InsertParameters like below.

 <InsertParameters>
              <asp:Parameter Name="fk_project_id" />
 </InsertParameters>

Thanks,
Princy.
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or