Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
204 views
hello

i know there are a lot of issues for frozen columns and horizontal scrolling when the number of frozen columns is high and takes a lot of space in the grid. i also use the workaround of increasing the last column with in order to be able to scroll to last column.
the bug i am facing is if i don't scoll using the arrows of the scroll bar but click directly in the scroll bar to scroll some columns it always jumps back to the beginning.
if i already scrolled to the middle position and then click it works.

is there a workaround or fix or this issue?

regards
رامي
Top achievements
Rank 1
 answered on 08 Sep 2017
0 answers
136 views

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

 

Rishi
Top achievements
Rank 1
 asked on 07 Sep 2017
1 answer
289 views

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

 

Trevor
Top achievements
Rank 1
 answered on 07 Sep 2017
6 answers
501 views
I use ExportToRtf to save theEditor's content(Track Change), but it seems to lose the text format. When I reload the Rtf file I saved the text format is losed. If I export with ExportToPdf function, the text format is keeped. But there is no function to load pdf file. I prefer using Rtf. Does somebody know how to keep Editor's text format(track change) and save the content into a Rtf, and then load the Rtf file and show the content(keep Track Change) in Editor?

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 Sub
Protected 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 Sub
gayathri
Top achievements
Rank 1
 answered on 07 Sep 2017
0 answers
177 views

Hello,

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.

René
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 07 Sep 2017
2 answers
170 views
I know this is AJAX related, but I can't seem to figure it out.  I have a TabStrip with a MultiPage and PageViews.  On one of the PageViews is a RadGrid.  For some reason when I click the Add button on the RadGrid (or do anything for that matter) I have to click to another tab and back to see the change.  I thought I could solve this by adding the grid and the multipage to the AJAX Manager, but that's not working.  I've tried wrapping the grid in its own AJAX panel, but that didn't work either.

Ideas?

<%@ 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>
Bart
Top achievements
Rank 1
 answered on 07 Sep 2017
2 answers
301 views

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

M
Top achievements
Rank 1
 answered on 06 Sep 2017
3 answers
193 views
Hi,

How to enable the font family attribute for the default font?

We have an editor for user to construct their email to send email newsletter.

The default font is Arial so when user select Arial, it doesn't have the font tag.

The problem comes when recipient receive the email in Outlook or other email clients that uses Times New Roman as default font.
This will render the text as Times New Roman since there is no font-tag in the email.

Thanks.



Rumen
Telerik team
 answered on 06 Sep 2017
1 answer
344 views
How can I center the actual captcha image with the text box and message to "Type the code from the image?"

I have enclosed a screen capture of what it looks like now and as you can see it looks awkward with the captcha image left aligned with the text box and text centered. I'd like everything to be centered.

Thanks for your help!
Marin Bratanov
Telerik team
 answered on 06 Sep 2017
3 answers
154 views

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

Eyup
Telerik team
 answered on 06 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?