Hi community,
I had a simple question. Is it possible to retrieve a RadComboBox control (or any other control)
from the <EditItemTemplate> of a GridTemplateColumn when the Grid is
NOT in Edit Mode?
Or To Explain Further if necessary:
The issue is that I am importing from an excel spreadsheet into a grid. One of the grids
has a <GridTemplateColumn> with a Label control in the <ItemTemplate>
and a RadComboBox in the <EditItemTempalte>. The 'DataTextField' of the combo
box is something like 'product_name', the 'DataValueField' is something like 'product_id'.
code:
The problem is that the user only knows the 'product_name' values so that's what they put
in the spreadsheet.
After they do the import, a grid appears with all the data (for review purposes) along with a 'Commit To Database' button.
I am using 'GridTemplateColumn ' because I am trying to display the value of 'Product' to the user as just a 'Label' as opposed to a 'RadComboBox' control.
The problem is I need to get at the <EditItemTemplate> part to set the product_id after the Excel is imported.
So far I haven't been able to get the combo box control unless the grid is in edit mode.
If anybody could help, it would be appreciated. Thanks!
I had a simple question. Is it possible to retrieve a RadComboBox control (or any other control)
from the <EditItemTemplate> of a GridTemplateColumn when the Grid is
NOT in Edit Mode?
Or To Explain Further if necessary:
The issue is that I am importing from an excel spreadsheet into a grid. One of the grids
has a <GridTemplateColumn> with a Label control in the <ItemTemplate>
and a RadComboBox in the <EditItemTempalte>. The 'DataTextField' of the combo
box is something like 'product_name', the 'DataValueField' is something like 'product_id'.
code:
<telerik:GridTemplateColumn HeaderText="Product" UniqueName="prodDropDown">
<EditItemTemplate>
<telerik:RadComboBox ID="prodDropDown"
DataSourceId="prodDataSource"
DataTextField="prod_name"
DataValueField="prod_id"
Visible="true" runat="server" />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="prodDropDownLbl" runat="server" Text='<%# Eval("prod_name") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
The problem is that the user only knows the 'product_name' values so that's what they put
in the spreadsheet.
After they do the import, a grid appears with all the data (for review purposes) along with a 'Commit To Database' button.
I am using 'GridTemplateColumn ' because I am trying to display the value of 'Product' to the user as just a 'Label' as opposed to a 'RadComboBox' control.
The problem is I need to get at the <EditItemTemplate> part to set the product_id after the Excel is imported.
So far I haven't been able to get the combo box control unless the grid is in edit mode.
If anybody could help, it would be appreciated. Thanks!