Hi
I am trying to find a control like a label inside the nestedtable view in the client side when a button on the parent table is clicked. Can you please direct me to how get it.
This is how far I got :-
function showDetailsOnButtonClick(rowIndex) {
var parentRow = $find("<%=rGridColors.ClientID %>").get_masterTableView().get_dataItems()[rowIndex];
var lblInNestedTableView = parentRow .get_dataItems()[0].findControl("lblInNestedTableView");
lblInNestedTableView .visible = false;
}
Here is the markup :-
<telerik:RadGrid runat="server" ID="rGridColors" >
<MasterTableView AutoGenerateColumns="false" AllowPaging="false" HierarchyDefaultExpanded="true" CssClass="grid">
<Columns>
<telerik:GridTemplateColumn HeaderText="Color" UniqueName="Color">
<ItemTemplate>
<asp:ImageButton ID="btnShowColorLabel" runat="server" ImageUrl="~\images/info.gif"/>
</span>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<NestedViewTemplate>
<asp:Label runat="server" id ="lblInNestedTableView" Text ="You CLicked on color :===" />
Thanks
I need to get a reference to a combo box on that is in an edittemplatecolumn. I only need the reference on post back after the first combo box has an item selected.
As you can see below I have a very simple grid for testing purposes. I basically just want to select cmboCondition and have it auto post back. On item index changed, I want to populate cmboCondition2 however I can't get a reference to cmboCondition2.
<telerik:RadGrid ID="gridConditions" EnableTheming="false" runat="server" AllowPaging="false" AllowSorting="false" AllowFilteringByColumn="false" PageSize="1000" AutoGenerateColumns="false"> <GroupingSettings CaseSensitive="false" /> <ClientSettings> <Scrolling AllowScroll="False" /> <Selecting AllowRowSelect="true" /> </ClientSettings> <MasterTableView CommandItemDisplay="Top" AllowNaturalSort="false" NoMasterRecordsText="There are no conditions. Please add one to the rule." ShowHeader="false"> <CommandItemTemplate> <div style="padding-left:8px; padding-right:8px; padding-top:6px; padding-bottom:6px;"> <table width="100%"> <tr> <td runat="server" Visible='<%# Not gridConditions.MasterTableView.IsItemInserted%>'> <asp:LinkButton ID="btnAddCondition" runat="server" ToolTip="Add Condition" CommandName="InitInsert" Visible='<%# Not gridConditions.MasterTableView.IsItemInserted%>'><asp:Image ID="imgAddCondition" runat="server" ImageUrl="~/images/add_button.gif"/>Add</asp:LinkButton> <asp:LinkButton ID="btnDeleteCondition" runat="server" ToolTip="Delete Condition" OnClientClick = " return confirm('Are you sure you want to delete the selected condition?');" CommandName="DeleteSelected" Visible='<%# Not gridConditions.MasterTableView.IsItemInserted%>'><asp:Image ID="Image1" runat="server" ImageUrl="~/images/delete_button.gif"/>Delete</asp:LinkButton> </td> <td runat="server" Visible='<%# gridConditions.MasterTableView.IsItemInserted%>'> <asp:LinkButton ID="btnInsertCondition" runat="server" ToolTip="Confirm Add" CommandName="PerformInsert" Visible='<%# gridConditions.MasterTableView.IsItemInserted%>'><asp:Image ID="imgInsertCondition" runat="server" ImageUrl="~/images/updaterecord_button.gif"/>Confirm Add</asp:LinkButton> <asp:LinkButton ID="btnCancelCondition" runat="server" ToolTip="Cancel Add" CommandName="CancelAll" Visible='<%# gridConditions.EditIndexes.Count > 0 or gridConditions.MasterTableView.IsItemInserted %>'><asp:Image ID="imgCancelCondition" runat="server" ImageUrl="~/images/cancel_button.gif"/>Cancel Add</asp:LinkButton> </td> </tr> </table> </div> </CommandItemTemplate> <Columns> <telerik:GridTemplateColumn UniqueName="Condition" HeaderText="" AllowFiltering="false" ItemStyle-Wrap="false"> <ItemTemplate> <table> <tr> <td> <asp:Label runat="server" ID="lblCondition" Text="" /> </td> <td> <asp:Label runat="server" ID="lblCondition2" Text="" /> </td> <td> <asp:Label runat="server" ID="lblValue" Text="" /> </td> </tr> </table> </ItemTemplate> <EditItemTemplate> <table> <tr> <td> <telerik:RadComboBox runat="server" ID="cmboCondition" AutoPostBack="true" OnSelectedIndexChanged="cmboCondition_OnSelectedIndexChanged"> <Items> <telerik:RadComboBoxItem Text="Select One" Value="0" /> <telerik:RadComboBoxItem Text="The sender ..." Value="1" /> <telerik:RadComboBoxItem Text="The recipient ..." Value="2" /> <telerik:RadComboBoxItem Text="The subject or body ..." Value="3" /> <telerik:RadComboBoxItem Text="Any attachment ..." Value="4" /> <telerik:RadComboBoxItem Text="Any recipient ..." Value="5" /> <telerik:RadComboBoxItem Text="A message header ..." Value="6" /> </Items> </telerik:RadComboBox> </td> <td> <telerik:RadComboBox runat="server" ID="cmboCondition2"/> </td> <td> This is where the value popup goes </td> </tr> </table> </EditItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView></telerik:RadGrid>Private Sub PopulateConditions(ByVal clientID As String) Dim cmboCondition2 As RadComboBox = gridConditions.MasterTableView.FindControl(clientID) For Each item As GridDataItem In gridConditions.EditItems cmboCondition2 = CType(item("Condition").FindControl("cmboCondition2"), RadComboBox) Next If Not cmboCondition2 Is Nothing Then Dim prmParentID As New SqlParameter("@ParentID", cmboCondition2.SelectedValue) Dim arrParameters() As SqlParameter = {prmParentID} Dim dsValues As DataSet = mySQLFunctions.SQLStoredProc("sp_selectDLPConditionsByParentID", arrParameters) If dsValues.Tables.Count > 0 Then cmboCondition2.DataSource = dsValues.Tables(0) cmboCondition2.DataTextField = "Text" cmboCondition2.DataValueField = "Value" cmboCondition2.DataBind() End If End If End Sub Protected Sub gridConditions_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gridConditions.NeedDataSource gridConditions.DataSource = New Datatable() End Sub Protected Sub gridConditions_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) If TypeOf e.Item Is GridCommandItem Then Dim commandItem As GridCommandItem = CType(e.Item, GridCommandItem) Dim insertButton As LinkButton = CType(commandItem.FindControl("PerformInsertButton"), LinkButton) Dim cancelButton As LinkButton = CType(commandItem.FindControl("CancelButton"), LinkButton) insertButton.Visible = False cancelButton.Visible = False End If End Sub Protected Sub cmboCondition_OnSelectedIndexChanged(ByVal sender As RadComboBox, ByVal e As EventArgs) PopulateConditions(sender.ClientID & "2") End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim astr As String = theEditor.Text theEditor.ExportToRtf() End SubProtected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Dim totalStr As String = "" Using sr As StreamReader = New StreamReader("C:\Users\User\Downloads\RadEditorExport.rtf") Dim line As String Do line = sr.ReadLine() totalStr &= line Loop Until line Is Nothing sr.Close() End Using theEditor.LoadRtfContent(totalStr) End SubHello,
is there any way how to get rid of all embedded resources (css, js) and handle everything different way?
We are using custom skins, so all related css are on our server. But I would like to be able maintain all other base resources and disable using axd handlers to server data.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PurchaseRequestControl.ascx.cs" Inherits="Controls.PurchaseRequestControl" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><link href="../Styles/PurchaseRequestStyleSheet.css" rel="stylesheet" type="text/css" /><asp:PlaceHolder runat="server" ID="placeHolder"> <script type="text/javascript"> function onNavigate(isMoveNext) { var tabs = $find('<%= tabStrip.ClientID %>'); var totalNumOfTabs = tabs.get_tabs().get_count(); if (totalNumOfTabs > 0) { var newTabIndex; var currentTabIndex = tabs.get_selectedIndex(); if (isMoveNext) { if (currentTabIndex + 2 == totalNumOfTabs) { newTabIndex = 0; } else { newTabIndex = currentTabIndex + 2; } } else { if (currentTabIndex - 1 < 0) { newTabIndex = totalNumOfTabs - 2; } else { newTabIndex = currentTabIndex - 2 } } tabs.set_selectedIndex(newTabIndex); } } </script></asp:PlaceHolder><telerik:RadAjaxManager ID="ajaxManager" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="tabStrip"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="tabStrip" /> <telerik:AjaxUpdatedControl ControlID="multiPage" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="multiPage"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="tabStrip" /> <telerik:AjaxUpdatedControl ControlID="multiPage" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="cartgrdItems"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="multiPage" LoadingPanelID="ajaxLoadingPanel" /> <telerik:AjaxUpdatedControl ControlID="tabStrip" LoadingPanelID="ajaxLoadingPanel" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel runat="server" ID="ajaxLoadingPanel" InitialDelayTime="500"></telerik:RadAjaxLoadingPanel><div id="control-wrapper"> <div class="title-and-nav"> <span></span> <telerik:RadTabStrip runat="server" ID="tabStrip" MultiPageID="multiPage" CssClass="tab-strip" EnableEmbeddedSkins="False" AutoPostBack="true" OnTabClick="tabStrip_TabClick"> <Tabs> <telerik:RadTab IsSeparator="true" Text="1" CssClass="tab-number" Enabled="false"></telerik:RadTab> <telerik:RadTab CssClass="tab" SelectedCssClass="tab-selected" Text="Buyer" PageViewID="pvBuyer"></telerik:RadTab> <telerik:RadTab IsSeparator="true" Text="2" CssClass="tab-number" Enabled="false"></telerik:RadTab> <telerik:RadTab CssClass="tab" SelectedCssClass="tab-selected" Text="Supplier" PageViewID="pvSupplier"></telerik:RadTab> <telerik:RadTab IsSeparator="true" Text="3" CssClass="tab-number" Enabled="false"></telerik:RadTab> <telerik:RadTab CssClass="tab" SelectedCssClass="tab-selected" Text="Shipping" PageViewID="pvShipping"></telerik:RadTab> <telerik:RadTab IsSeparator="true" Text="4" CssClass="tab-number" Enabled="false"></telerik:RadTab> <telerik:RadTab CssClass="tab" SelectedCssClass="tab-selected" Text="Cart" PageViewID="pvCart"></telerik:RadTab> <telerik:RadTab IsSeparator="true" Text="5" CssClass="tab-number" Enabled="false"></telerik:RadTab> <telerik:RadTab CssClass="tab" SelectedCssClass="tab-selected" Text="Review" PageViewID="pvReview"></telerik:RadTab> </Tabs> </telerik:RadTabStrip> </div> <telerik:RadMultiPage runat="server" ID="multiPage" RenderSelectedPageOnly="true"> <!-- ********************************CART START****************************** --> <telerik:RadPageView runat="server" ID="pvCart" CssClass="page-view"> <div class="controls-container"> <telerik:RadGrid runat="server" ID="cartgrdItems" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="true" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" GridLines="Horizontal" GroupingEnabled="False" ondeletecommand="cartgrdItems_DeleteCommand" oninsertcommand="cartgrdItems_InsertCommand" onupdatecommand="cartgrdItems_UpdateCommand"> <MasterTableView EnableNoRecordsTemplate="true" CommandItemDisplay="TopAndBottom" EditMode="InPlace" InsertItemPageIndexAction="ShowItemOnCurrentPage"> <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add Item" /> <NoRecordsTemplate>Add Items</NoRecordsTemplate> </MasterTableView> </telerik:RadGrid> </div> <br /> <div class="navigation-buttons"> <asp:Button ID="cartbtnPrevious" runat="server" Text="Previous" OnClientClick="onNavigate(false); return false;" CssClass="nav-button"/> <asp:Button ID="cartbtnNext" runat="server" Text="Next" OnClientClick="onNavigate(true); return false;" CssClass="nav-button" /> </div> </telerik:RadPageView> </telerik:RadMultiPage></div>I'm evaluating the Telerik's Ajax UI controls, and I'm running into an issue with the RadAutoCompleteBox control. If I use this control outside a modal, then the suggestions get displayed. However, if I use this control inside a Bootstrap modal then the suggestions don't show up.
Please see attached files. The ID for the modal in which I'm trying to use the Autocomplete box is: "panPN". The ID of the RadAutoCompleteBox that is working outside the modal is: "acRadBox"
Thanks,
Maria

I'm having some trouble getting the AllowSubmitOnEnter property to work. I have a page with two grids...selecting a row in Grid A populates Grid B. In both grids, my users want to be able to use the enter key to submit inserts/edits on the grid.
I have set the following navigation settings on both grids:
<ClientSettings AllowKeyboardNavigation="true" >
<KeyboardNavigationSettings AllowSubmitOnEnter="true" />
</ClientSettings>
On Grid A, this works perfectly and the users can press enter. However, on Grid B, those settings seem to be getting ignored. When the users press enter to submit an insert/edit, those events are not fired. Instead, the submit button's event is fired.
Can anyone give me a clue as to what to look for? The grids are pretty identical in properties, the biggest difference being that Grid A populates Grid B. I'm confused as to why the exact same properties seem to work on one but are ignored on the other.
Thank you!
Donna
