or
You can find information about known issues and important changes for the entire UI for ASP.NET AJAX suite in the following pinned thread: Known Issues and Important Changes in UI for ASP.NET AJAX.
Q1 SP2 2010 (Version number: 2010.1.519 and lower)
| <telerik:RadScriptManager runat="server" EnableScriptCombine="false" /> |
| <telerik:RadScriptManager runat="server"> |
| <Scripts> |
| <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" |
| Name="MicrosoftAjax.js" Path="Scripts-40412/MicrosoftAjax.js" /> |
| <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" |
| Name="MicrosoftAjaxWebForms.js" Path="Scripts-40412/MicrosoftAjaxWebForms.js" /> |
| </Scripts> |
| </telerik:RadScriptManager> |
| <telerik:RadComboBox ID="MyComboBox" runat="server" Width="250" CausesValidation="false" AutoPostBack="false" MarkFirstMatch="true" AllowCustomText="false" AutoCompleteSeparator=";" ExpandAnimation-Duration="250" AccessKey="O" /> |
Hi
I have a RadListView with a RadComboBox in the fieldset itemtemplate, and the RadComboBox has a CheckBox ItemTemplate.
What I’m need to do is to change the text of the first item in my combobox and hide the checkbox.
It works fine if I have only one combobox but I need this in a ListView.
Thanks,
Nicole
| protected void RadListView1_ItemDataBound(object sender, RadListViewItemEventArgs e) |
| { |
| RadComboBox cmbColores = (RadComboBox)e.Item.FindControl("cbmColores1"); |
| DataTable dt = CargarCombos(); |
| //Add Item |
| dt.Rows.Add(-1, ""); |
| DataView dv = new DataView(); |
| dv = dt.DefaultView; |
| dv.Sort = "NombreCompleto"; |
| DataTable dt1 = dv.ToTable(); |
| cmbColores.DataSource = dt1; |
| cmbColores.DataTextField = "NombreCompleto"; |
| cmbColores.DataValueField = "SKUID"; |
| cmbColores.DataBind(); |
| //change text: first item combobox |
| cmbColores.FindItemByValue("-1").Text = " -- Seleccione --"; |
| RadComboBoxItem item = cmbColores.FindItemByValue("-1"); |
| CheckBox chk = (CheckBox)item.FindControl("chk1"); |
| //first item combobox |
| chk.Visible = false; |
| } |
| <telerik:RadListView ID="RadListView1" Width="100%" AllowPaging="true" runat="server" |
| ItemPlaceholderID="ProductsHolder" DataKeyNames="SKUID" OnNeedDataSource="RadListView1_NeedDataSource" |
| OnItemDataBound="RadListView1_ItemDataBound" OnItemCommand="RadListView1_ItemCommand"> |
| <ItemTemplate> |
| <fieldset> |
| <telerik:RadComboBox ID="cbmColores1" runat="server" Skin="Windows7" Width="180px" |
| EmptyMessage="Color..." LoadingMessage="Cargando..." OnClientDropDownClosed="onDropDownClosing" |
| AutoPostBack="False"> |
| <ItemTemplate> |
| <div onclick="StopPropagation(event)"> |
| <asp:CheckBox runat="server" ID="chk1" Checked="false" /> |
| <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1"> |
| <%# DataBinder.Eval(Container.DataItem, "NombreCompleto")%> |
| </asp:Label> |
| </div> |
| </ItemTemplate> |
| </telerik:RadComboBox> |
| </fieldset> |
| </ItemTemplate> |
| <LayoutTemplate> |
| <fieldset id="RadListView1" > |
| </fieldset> |
| </LayoutTemplate> |
| </telerik:RadListView> |
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" |
| Culture="auto" %> |
| <%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" |
| Namespace="System.Web.UI.WebControls" TagPrefix="asp" %> |
| <%@ 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"> |
| <head runat="server"> |
| <title>Untitled Page</title> |
| <style type="text/css"> |
| </style> |
| </head> |
| <body style="height:100%"> |
| <form id="form1" runat="server" style="height:100%"> |
| <asp:ScriptManager runat="server" ID="Manager1"> |
| </asp:ScriptManager> |
| <telerik:RadGrid ID="RadGrid1" runat="server" Width="95%" ShowStatusBar="true" AutoGenerateColumns="False" |
| PageSize="7" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="False" Height="100%" |
| OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource" |
| OnPreRender="RadGrid1_PreRender" onitemcommand="RadGrid1_ItemCommand"> |
| <PagerStyle Mode="NumericPages"></PagerStyle> |
| <MasterTableView Width="100%" DataKeyNames="CustomerID" AllowMultiColumnSorting="True" Name="MasterTable" |
| CommandItemDisplay="Top" HierarchyLoadMode="Client"> |
| <CommandItemTemplate> |
| <div align="left"> |
| <asp:LinkButton ID="initInsertLinkButton" runat="server" CommandName="InitInsert">Add new |
| </asp:LinkButton> |
| <asp:LinkButton ID="editSelectedLinkButton" runat="server" CommandName="EditSelected">Edit Selected |
| </asp:LinkButton> |
| </div> |
| </CommandItemTemplate> |
| <ExpandCollapseColumn Visible="True"> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton" |
| DataField="CustomerID"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton" |
| DataField="ContactName"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton" |
| DataField="CompanyName"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings> |
| <Selecting AllowRowSelect="True"></Selecting> |
| <ClientEvents OnRowSelected="RowSelected"></ClientEvents> |
| <Scrolling AllowScroll="true" ScrollHeight="100%" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| </form> |
| </body> |
| </html> |

| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadTabStrip1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadMultiPage1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <script type="text/javascript"> |
| function onTabSelecting(sender, args) { |
| var foo = args.get_tab(); |
| if (args.get_tab().get_pageViewID()) { |
| args.get_tab().set_postBack(false); |
| } |
| } |
| </script> |
| <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" |
| MultiPageID="RadMultiPage1" Orientation="HorizontalTop" |
| OnTabClick="RadTabStrip1_TabClick" OnClientTabSelecting="onTabSelecting"> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" |
| Height="250px" Width="475px" BorderWidth="1" OnPageViewCreated="RadMultiPage1_PageViewCreated"> |
| </telerik:RadMultiPage> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!Page.IsPostBack) |
| { |
| AddTab(RadTabStrip1, "Tab1"); |
| AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab1")); |
| AddTab(RadTabStrip1, "Tab2"); |
| //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab2")); |
| AddTab(RadTabStrip1, "Tab3"); |
| //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab3")); |
| } |
| } |
| private void AddTab(RadTabStrip tabstrip, string tabName) |
| { |
| RadTab tab = new RadTab(); |
| tab.Text = tabName; |
| tabstrip.Tabs.Add(tab); |
| } |
| private void AddPageView(RadMultiPage multipage, RadTab tab) |
| { |
| RadPageView pageView = new RadPageView(); |
| pageView.ID = tab.Text; |
| multipage.PageViews.Add(pageView); |
| tab.PageViewID = pageView.ID; |
| } |
| protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e) |
| { |
| AddPageView(RadMultiPage1, e.Tab); |
| e.Tab.PageView.Selected = true; |
| } |
| protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) |
| { |
| string userControlPath = "~/WebUserControl.ascx"; |
| Control userControl = Page.LoadControl(userControlPath); |
| if (e.PageView.ID == "Tab1") |
| { |
| userControl.ID = "UserControl1"; |
| } |
| else if (e.PageView.ID == "Tab2") |
| { |
| userControl.ID = "UserControl2"; |
| } |
| else if (e.PageView.ID == "Tab3") |
| { |
| userControl.ID = "UserControl3"; |
| } |
| e.PageView.Controls.Add(userControl); |
| } |
| <telerik:RadScheduler runat="server" ShowViewTabs="false" OverflowBehavior="Expand" ColumnWidth="250px" TimelineView-NumberOfSlots="30" ID="timeline" GroupBy="Type" GroupingDirection="Vertical" DataSourceID="timelineDataSource" SelectedView="TimelineView" DataKeyField="RegulatoryResultsId" DataStartField="CreatedOn" DataEndField="ReceiveOn" DataSubjectField="Description"> |
| <ResourceTypes> |
| <telerik:ResourceType KeyField="TypeId" Name="Type" TextField="TypeName" ForeignKeyField="TypeValue" |
| DataSourceID="timelineSectionSource" /> |
| </ResourceTypes> |
| </telerik:RadScheduler> |
| <telerik:radscriptmanager runat="server" ID="ScriptManager" EnablePageMethods="True"></telerik:radscriptmanager> |
| <telerik:radscriptblock runat="server" ID="radScriptBlock"> |
| <script type="text/javascript"> |
| function openCustomerLookupWindow() |
| { |
| var txtNo = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>"); |
| var txtCoNam = $find("<%= txtExistingCustomerSearchCompanyName.ClientID %>"); |
| var txtCPN = $find("<%= txtExistingCustomerSearchContactPerson.ClientID %>"); |
| var txtCity = $find("<%= txtExistingCustomerSearchCity.ClientID %>"); |
| var cboState = $find("<%= cboExistingCustomerSearchState.ClientID %>"); |
| var oWnd = window.radopen('../../Lookups/NavCustomerLookup.aspx?navco=<%=session("SP_SearchCustomerNavCompany")%>&no=' + txtNo.get_value() + '&conam=' + txtCoNam.get_value() + '&cpn=' + txtCPN.get_value() + '&city=' + txtCity.get_value() + '&state=' + cboState.get_value() + '',"winCustomerLookup"); |
| //oWnd.argument = combo.get_value(); |
| oWnd.Center(); |
| //oWnd.SetSize(800,500); |
| } |
| function clientShow(sender, eventArgs) |
| { |
| //var txtDate = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>"); |
| //sender.argument = txtDate.get_value; |
| //sender.argument = document.getElementById('<%=txtExistingCustomerSearchCustomerNo.ClientID%>').innerText; |
| } |
| function clientClose(oWnd,args) |
| { |
| var txtNo = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>"); |
| var txtCoNam = $find("<%= txtExistingCustomerSearchCompanyName.ClientID %>"); |
| var txtCPN = $find("<%= txtExistingCustomerSearchContactPerson.ClientID %>"); |
| var txtCity = $find("<%= txtExistingCustomerSearchCity.ClientID %>"); |
| var cboState = $find("<%= cboExistingCustomerSearchState.ClientID %>"); |
| //get the transferred arguments |
| var arg = args.get_argument(); |
| if(arg) |
| { |
| var CustomerNo = arg.CustomerNo; |
| var CompanyName = arg.CompanyName; |
| var ContactPersonName = arg.ContactPersonName; |
| var CustomerCity = arg.CustomerCity; |
| var CustomerState = arg.CustomerState; |
| txtNo.set_value(CustomerNo); |
| txtCoNam.set_value(CompanyName); |
| txtCPN.set_value(ContactPersonName); |
| txtCity.set_value(CustomerCity); |
| cboState.set_value(CustomerState); |
| document.getElementById('pnlCustomerInfoCustomerData').style.display = 'none'; |
| } |
| document.forms[0].submit(); |
| } |
| </script> |
| </telerik:radscriptblock> |
| <telerik:radajaxpanel runat="server" LoadingPanelID="LoadingPanel" ID="AjaxPanel" Wrap="False" EnableAJAX="False"> |
| <asp:Panel ID="pnlCustomerInfoCustomerData" runat="server"></asp:Panel> |
| </telerik:RadAjaxPanel> |