How i find in radcombobox in javascript tag ,
<telerik:RadCodeBlock runat="server" ID="radCodeBlock">
<script type="text/javascript">
function onSelectedIndexChanged(sender, eventArgs) {
debugger;
updateComboBox(sender);
}
function updateComboBox(listBox) {
var text = "";
var value = "";
var items = listBox.get_selectedItems();
for (var i = 0; i < items.length; i++) {
var item = items[i];
//Check whether the Item's 'selected' attribute is set to true.
if (item.get_selected()) {
text += item.get_text() + ", ";
value += item.get_value() + ", ";
}
}
text = text.substring(0, text.length - 2);
value = value.substring(0, value.length - 2);
var comboBox = $find("ComboBox_SortColumn");
//Set the text of the RadComboBox to the texts of the selected Items, separated by ','.
comboBox.set_text(text);
//Set the value of the RadComboBox to values of the selected Items, separated by ','.
comboBox.trackChanges();
comboBox.get_items().getItem(0).set_value(value);
comboBox.commitChanges();
}
</script>
</telerik:RadCodeBlock>
<EditFormSettings CaptionFormatString="Create" EditFormType="Template">
<td>
<asp:Label ID="Label15" runat="server">Selected</asp:Label>
<telerik:RadListBox runat="server" DataTextField="Text" DataValueField="Value" ID="RadListBoxDestinationGroup"
AutoPostBackOnReorder="true" EnableDragAndDrop="true" AllowReorder="true" Height="140px"
Width="160px" ButtonSettings-Position="Left" OnClientSelectedIndexChanged="onSelectedIndexChanged">
</telerik:RadListBox>
</td>
<td>
<telerik:RadComboBox ID="ComboBox_SortColumn" runat="server" Width="175px" SelectedValue='<%# Bind("SortColumn") %>'
AllowCustomText="true">
<Items>
<telerik:RadComboBoxItem Text="" />
</Items>
</telerik:RadComboBox>
</td>
<EditFormSettings/>
Thanks,
Mohamed.
3 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 01 Jun 2011, 01:12 PM
Hello Mohamed,
The following code library submission explains how to access controls in a Grid template on the client side. Go through it and see if it helps.
Accessing server controls in a grid template on the client.
Thanks,
Princy.
The following code library submission explains how to access controls in a Grid template on the client side. Go through it and see if it helps.
Accessing server controls in a grid template on the client.
Thanks,
Princy.
0

mohamed
Top achievements
Rank 1
answered on 01 Jun 2011, 01:35 PM
Thanks For ur reply,
"how to add radlistbox value into radcombobox in server side "
In this radcombobox not inside the radgrid ,
That's in the editformsettings
Any other examples for this process.
this's my code ..
in radlist available listbox values are assigned the radcombobox
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LayoutDialog.aspx.cs" Inherits="TBS_HelpDesk.Views.Assets.LayoutDialog" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock runat="server" ID="radCodeBlock">
<script type="text/javascript">
function onSelectedIndexChanged(sender, eventArgs) {
debugger;
updateComboBox(sender);
}
function updateComboBox(listBox) {
var text = "";
var value = "";
var items = listBox.get_selectedItems();
for (var i = 0; i < items.length; i++) {
var item = items[i];
//Check whether the Item's 'selected' attribute is set to true.
if (item.get_selected()) {
text += item.get_text() + ", ";
value += item.get_value() + ", ";
}
}
text = text.substring(0, text.length - 2);
value = value.substring(0, value.length - 2);
var comboBox = $find("ComboBox_SortColumn");
//Set the text of the RadComboBox to the texts of the selected Items, separated by ','.
comboBox.set_text(text);
//Set the value of the RadComboBox to values of the selected Items, separated by ','.
comboBox.trackChanges();
comboBox.get_items().getItem(0).set_value(value);
comboBox.commitChanges();
}
</script>
</telerik:RadCodeBlock>
<div style="width: 600px; height: 500px;">
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelHeight="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" OnNeedDataSource="RadGrid1_NeedDataSource"
OnItemCommand="RadGrid1_ItemCommand" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
GridLines="None" AutoCompleteType="Disabled" AllowFilteringByColumn="True" AllowPaging="True"
AllowSorting="True" OnItemDataBound="RadGrid1_ItemDataBound">
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" EditMode="PopUp"
EditFormSettings-PopUpSettings-Modal="true" IsFilterItemExpanded="false" ClientDataKeyNames="LayoutId,LayoutName">
<CommandItemTemplate>
<telerik:RadToolBar ID="RadToolBar1" OnButtonClick="RadToolBar1_ButtonClick" runat="server">
<Items>
<telerik:RadToolBarButton Text="Add new" CommandName="InitInsert" ImageUrl="../../images/AddRecord.gif"
Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Refresh" CommandName="RebindGrid" ImageUrl="../../images/Refresh.gif">
</telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>
</CommandItemTemplate>
<PagerStyle BackColor="#D8EBFC" Mode="NextPrevNumericAndAdvanced" />
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldAlias="Views" FieldName="LayoutName" HeaderValueSeparator=" : "
FormatString="" HeaderText=""></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="LayoutUserId" SortOrder="Ascending"></telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="10px">
<HeaderStyle Width="10px"></HeaderStyle>
</telerik:GridEditCommandColumn>
<telerik:GridNumericColumn DataField="LayoutId" HeaderText="LayoutId" SortExpression="LayoutId"
UniqueName="LayoutId" FilterControlWidth="20px" HeaderStyle-Width="80px" ReadOnly="true"
Visible="false">
</telerik:GridNumericColumn>
<telerik:GridHyperLinkColumn DataTextField="LayoutName" HeaderStyle-Width="150px"
DataNavigateUrlFields="LayoutId,LayoutName" HeaderText="LayoutName" SortExpression="LayoutName"
UniqueName="LayoutName" DataNavigateUrlFormatString="AssetsListBreakWork.aspx?LayoutId={0}&LayoutName={1}">
</telerik:GridHyperLinkColumn>
<telerik:GridNumericColumn DataField="LayoutUserId" HeaderText="LayoutUserId" SortExpression="LayoutUserId"
UniqueName="LayoutUserId" FilterControlWidth="20px" HeaderStyle-Width="80px"
Visible="false">
</telerik:GridNumericColumn>
<telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" HeaderStyle-Width="10px"
UniqueName="DeleteColumn" CommandArgument="Child" ConfirmDialogType="RadWindow"
ConfirmText="Are You Sure Want To Delete This Record?" ConfirmTitle="Delete Confirm">
<HeaderStyle Width="10px"></HeaderStyle>
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings CaptionFormatString="Create" EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormTemplate>
<div style="margin-left: 10px;">
<table>
<tr>
<td style="height: 100px; width: 470px;">
<table style="float: right;">
<tr>
<td>
<asp:Label ID="Label3" runat="server" ForeColor="Red" Text="*" Width="1px"></asp:Label>
<asp:Label ID="Label2" Text="Mandatory Field(s)" runat="server"></asp:Label>
</td>
</tr>
</table>
<fieldset>
<legend style="margin-bottom: 10px">Layout</legend>
<table cellspacing="2" cellpadding="1" width="470px" border="0">
<tr>
<td colspan="2">
<asp:TextBox Width="200px" ID="LayoutId" AutoCompleteType="Disabled" runat="server"
Text='<%# Bind("LayoutId") %>' Visible="false"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Layout Name :
</td>
<td>
<asp:TextBox Width="200px" ID="LayoutName" AutoCompleteType="Disabled" runat="server"
Text='<%# Bind("LayoutName") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<fieldset>
<legend>Layout List</legend>
<table style="width: 450px;">
<tr>
<%-- <td>
<asp:Label ID="GroupAvailable" runat="server"> Available</asp:Label>
<telerik:RadListBox runat="server" DataTextField="Text" DataValueField="Value" ID="RadListBoxSourceGroup"
Height="140px" Width="100px" AllowTransfer="true" TransferToID="RadListBoxDestinationGroup"
SelectionMode="Multiple" AllowReorder="false" AllowDelete="false" ButtonSettings-HorizontalAlign="Center"
ButtonSettings-VerticalAlign="Middle" TransferMode="Move" />
</td>
<td>
<asp:Label ID="Label15" runat="server"> Selected</asp:Label>
<telerik:RadListBox runat="server" DataTextField="Text" DataValueField="Value" ID="RadListBoxDestinationGroup"
Height="140px" Width="100px" />
</td>--%>
<td>
<asp:Label ID="Label15" runat="server"> Selected</asp:Label>
<telerik:RadListBox runat="server" DataTextField="Text" DataValueField="Value" ID="RadListBoxDestinationGroup"
AutoPostBackOnReorder="true" EnableDragAndDrop="true" AllowReorder="true" Height="140px"
Width="160px" ButtonSettings-Position="Left" OnClientSelectedIndexChanged="onSelectedIndexChanged">
</telerik:RadListBox>
</td>
<td>
<asp:Label ID="GroupAvailable" runat="server"> Available</asp:Label>
<telerik:RadListBox Height="140px" Width="160px" runat="server" DataSourceID="SqlDataSource1"
DataValueField="COLUMN_NAME" DataTextField="COLUMN_NAME" ID="RadListBoxSourceGroup"
AllowTransfer="true" TransferToID="RadListBoxDestinationGroup" SelectionMode="Multiple"
AllowReorder="false" AllowDelete="false" TransferMode="Move" AutoPostBackOnTransfer="true"
AutoPostBackOnReorder="true" EnableDragAndDrop="true" ButtonSettings-Position="Left">
</telerik:RadListBox>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td valign="top" align="right">
Layout UserId :
</td>
<td>
<asp:CheckBox ID="LayoutUserId" runat="server" Checked='<%# 2.Equals(Eval("LayoutUserId")) ? true : false %>' />
</td>
</tr>
<tr>
<td valign="top" align="right">
Sort Column :
</td>
<td>
<telerik:RadComboBox ID="ComboBox_SortColumn" runat="server" Width="175px" SelectedValue='<%# Bind("SortColumn") %>'
AllowCustomText="true">
<Items>
<telerik:RadComboBoxItem Text="" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td valign="top" align="right">
Sort Order :
</td>
<td>
<telerik:RadComboBox ID="ComboBox_SortOrder" runat="server" Width="175px" SelectedValue='<%# Bind("SortOrder") %>'>
<Items>
<telerik:RadComboBoxItem Text="Ascending" Value="Asc" Selected="true" />
<telerik:RadComboBoxItem Text="Descending" Value="Desc" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td valign="top" align="right">
Group Column :
</td>
<td>
<telerik:RadComboBox ID="ComboBox_GroupByColumn" runat="server" Width="175px" DataSourceID="SqlDataSource1"
SelectedValue='<%# Bind("GroupColumn") %>' DataValueField="COLUMN_NAME" DataTextField="COLUMN_NAME">
</telerik:RadComboBox>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<table>
<tr>
<td>
<asp:Button ID="Button3" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>
<asp:Button ID="Button4" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel">
</asp:Button>
</td>
</tr>
</table>
</div>
</FormTemplate>
<PopUpSettings Modal="True"></PopUpSettings>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
SelectCommand="SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE (TABLE_NAME = 'Assets') ORDER BY ORDINAL_POSITION">
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
Thanks,
Mohamed.
"how to add radlistbox value into radcombobox in server side "
In this radcombobox not inside the radgrid ,
That's in the editformsettings
Any other examples for this process.
this's my code ..
in radlist available listbox values are assigned the radcombobox
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LayoutDialog.aspx.cs" Inherits="TBS_HelpDesk.Views.Assets.LayoutDialog" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock runat="server" ID="radCodeBlock">
<script type="text/javascript">
function onSelectedIndexChanged(sender, eventArgs) {
debugger;
updateComboBox(sender);
}
function updateComboBox(listBox) {
var text = "";
var value = "";
var items = listBox.get_selectedItems();
for (var i = 0; i < items.length; i++) {
var item = items[i];
//Check whether the Item's 'selected' attribute is set to true.
if (item.get_selected()) {
text += item.get_text() + ", ";
value += item.get_value() + ", ";
}
}
text = text.substring(0, text.length - 2);
value = value.substring(0, value.length - 2);
var comboBox = $find("ComboBox_SortColumn");
//Set the text of the RadComboBox to the texts of the selected Items, separated by ','.
comboBox.set_text(text);
//Set the value of the RadComboBox to values of the selected Items, separated by ','.
comboBox.trackChanges();
comboBox.get_items().getItem(0).set_value(value);
comboBox.commitChanges();
}
</script>
</telerik:RadCodeBlock>
<div style="width: 600px; height: 500px;">
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelHeight="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" OnNeedDataSource="RadGrid1_NeedDataSource"
OnItemCommand="RadGrid1_ItemCommand" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
GridLines="None" AutoCompleteType="Disabled" AllowFilteringByColumn="True" AllowPaging="True"
AllowSorting="True" OnItemDataBound="RadGrid1_ItemDataBound">
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" EditMode="PopUp"
EditFormSettings-PopUpSettings-Modal="true" IsFilterItemExpanded="false" ClientDataKeyNames="LayoutId,LayoutName">
<CommandItemTemplate>
<telerik:RadToolBar ID="RadToolBar1" OnButtonClick="RadToolBar1_ButtonClick" runat="server">
<Items>
<telerik:RadToolBarButton Text="Add new" CommandName="InitInsert" ImageUrl="../../images/AddRecord.gif"
Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Refresh" CommandName="RebindGrid" ImageUrl="../../images/Refresh.gif">
</telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>
</CommandItemTemplate>
<PagerStyle BackColor="#D8EBFC" Mode="NextPrevNumericAndAdvanced" />
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldAlias="Views" FieldName="LayoutName" HeaderValueSeparator=" : "
FormatString="" HeaderText=""></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="LayoutUserId" SortOrder="Ascending"></telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="10px">
<HeaderStyle Width="10px"></HeaderStyle>
</telerik:GridEditCommandColumn>
<telerik:GridNumericColumn DataField="LayoutId" HeaderText="LayoutId" SortExpression="LayoutId"
UniqueName="LayoutId" FilterControlWidth="20px" HeaderStyle-Width="80px" ReadOnly="true"
Visible="false">
</telerik:GridNumericColumn>
<telerik:GridHyperLinkColumn DataTextField="LayoutName" HeaderStyle-Width="150px"
DataNavigateUrlFields="LayoutId,LayoutName" HeaderText="LayoutName" SortExpression="LayoutName"
UniqueName="LayoutName" DataNavigateUrlFormatString="AssetsListBreakWork.aspx?LayoutId={0}&LayoutName={1}">
</telerik:GridHyperLinkColumn>
<telerik:GridNumericColumn DataField="LayoutUserId" HeaderText="LayoutUserId" SortExpression="LayoutUserId"
UniqueName="LayoutUserId" FilterControlWidth="20px" HeaderStyle-Width="80px"
Visible="false">
</telerik:GridNumericColumn>
<telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" HeaderStyle-Width="10px"
UniqueName="DeleteColumn" CommandArgument="Child" ConfirmDialogType="RadWindow"
ConfirmText="Are You Sure Want To Delete This Record?" ConfirmTitle="Delete Confirm">
<HeaderStyle Width="10px"></HeaderStyle>
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings CaptionFormatString="Create" EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormTemplate>
<div style="margin-left: 10px;">
<table>
<tr>
<td style="height: 100px; width: 470px;">
<table style="float: right;">
<tr>
<td>
<asp:Label ID="Label3" runat="server" ForeColor="Red" Text="*" Width="1px"></asp:Label>
<asp:Label ID="Label2" Text="Mandatory Field(s)" runat="server"></asp:Label>
</td>
</tr>
</table>
<fieldset>
<legend style="margin-bottom: 10px">Layout</legend>
<table cellspacing="2" cellpadding="1" width="470px" border="0">
<tr>
<td colspan="2">
<asp:TextBox Width="200px" ID="LayoutId" AutoCompleteType="Disabled" runat="server"
Text='<%# Bind("LayoutId") %>' Visible="false"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Layout Name :
</td>
<td>
<asp:TextBox Width="200px" ID="LayoutName" AutoCompleteType="Disabled" runat="server"
Text='<%# Bind("LayoutName") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<fieldset>
<legend>Layout List</legend>
<table style="width: 450px;">
<tr>
<%-- <td>
<asp:Label ID="GroupAvailable" runat="server"> Available</asp:Label>
<telerik:RadListBox runat="server" DataTextField="Text" DataValueField="Value" ID="RadListBoxSourceGroup"
Height="140px" Width="100px" AllowTransfer="true" TransferToID="RadListBoxDestinationGroup"
SelectionMode="Multiple" AllowReorder="false" AllowDelete="false" ButtonSettings-HorizontalAlign="Center"
ButtonSettings-VerticalAlign="Middle" TransferMode="Move" />
</td>
<td>
<asp:Label ID="Label15" runat="server"> Selected</asp:Label>
<telerik:RadListBox runat="server" DataTextField="Text" DataValueField="Value" ID="RadListBoxDestinationGroup"
Height="140px" Width="100px" />
</td>--%>
<td>
<asp:Label ID="Label15" runat="server"> Selected</asp:Label>
<telerik:RadListBox runat="server" DataTextField="Text" DataValueField="Value" ID="RadListBoxDestinationGroup"
AutoPostBackOnReorder="true" EnableDragAndDrop="true" AllowReorder="true" Height="140px"
Width="160px" ButtonSettings-Position="Left" OnClientSelectedIndexChanged="onSelectedIndexChanged">
</telerik:RadListBox>
</td>
<td>
<asp:Label ID="GroupAvailable" runat="server"> Available</asp:Label>
<telerik:RadListBox Height="140px" Width="160px" runat="server" DataSourceID="SqlDataSource1"
DataValueField="COLUMN_NAME" DataTextField="COLUMN_NAME" ID="RadListBoxSourceGroup"
AllowTransfer="true" TransferToID="RadListBoxDestinationGroup" SelectionMode="Multiple"
AllowReorder="false" AllowDelete="false" TransferMode="Move" AutoPostBackOnTransfer="true"
AutoPostBackOnReorder="true" EnableDragAndDrop="true" ButtonSettings-Position="Left">
</telerik:RadListBox>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td valign="top" align="right">
Layout UserId :
</td>
<td>
<asp:CheckBox ID="LayoutUserId" runat="server" Checked='<%# 2.Equals(Eval("LayoutUserId")) ? true : false %>' />
</td>
</tr>
<tr>
<td valign="top" align="right">
Sort Column :
</td>
<td>
<telerik:RadComboBox ID="ComboBox_SortColumn" runat="server" Width="175px" SelectedValue='<%# Bind("SortColumn") %>'
AllowCustomText="true">
<Items>
<telerik:RadComboBoxItem Text="" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td valign="top" align="right">
Sort Order :
</td>
<td>
<telerik:RadComboBox ID="ComboBox_SortOrder" runat="server" Width="175px" SelectedValue='<%# Bind("SortOrder") %>'>
<Items>
<telerik:RadComboBoxItem Text="Ascending" Value="Asc" Selected="true" />
<telerik:RadComboBoxItem Text="Descending" Value="Desc" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td valign="top" align="right">
Group Column :
</td>
<td>
<telerik:RadComboBox ID="ComboBox_GroupByColumn" runat="server" Width="175px" DataSourceID="SqlDataSource1"
SelectedValue='<%# Bind("GroupColumn") %>' DataValueField="COLUMN_NAME" DataTextField="COLUMN_NAME">
</telerik:RadComboBox>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<table>
<tr>
<td>
<asp:Button ID="Button3" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>
<asp:Button ID="Button4" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel">
</asp:Button>
</td>
</tr>
</table>
</div>
</FormTemplate>
<PopUpSettings Modal="True"></PopUpSettings>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
SelectCommand="SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE (TABLE_NAME = 'Assets') ORDER BY ORDINAL_POSITION">
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
Thanks,
Mohamed.
0
Hi mohamed,
You can handle the grid ItemDataSound server-side event. There you can find the RadComboBox in question and define its items as you would do if the comboxbox was outside the grid.
For more information on accessing grid cells and rows, find the below articles:
http://www.telerik.com/help/aspnet-ajax/grid-accessing-cells-and-rows.html
http://www.telerik.com/help/aspnet-ajax/grid-operations-with-dropdownlist-in-edititemtemplate.html
Kind regards,
Iana
the Telerik team
You can handle the grid ItemDataSound server-side event. There you can find the RadComboBox in question and define its items as you would do if the comboxbox was outside the grid.
For more information on accessing grid cells and rows, find the below articles:
http://www.telerik.com/help/aspnet-ajax/grid-accessing-cells-and-rows.html
http://www.telerik.com/help/aspnet-ajax/grid-operations-with-dropdownlist-in-edititemtemplate.html
Kind regards,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.