Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
106 views
radgrid each record updated on outside button click and simultaneously show each record update status visually on UI
Maria Ilieva
Telerik team
 answered on 28 May 2015
5 answers
208 views

So I'm using Telerik's gui system and would like to insert a dropdown inside another one but I don't know how to do that.

 

This is what I've got so far

<telerik:RadToolBarDropDown runat="server" ToolTip="DropDown1" ImageUrl="~/Images/test.png">
    <Buttons>

          <telerik:RadToolBarButton runat="server" Text="Click me!" Value="TOGGLE_WALLS" CheckOnClick="true" ImageUrl="~/Images/checkmark.png"/>

    </Buttons>
</telerik:RadToolBarDropDown>

 More or less, a dropdown inside a dropdown.

Is it possible? Do Telerik support this?

Ivan Danchev
Telerik team
 answered on 28 May 2015
6 answers
145 views
Hi

When I Export to Excel from a  RadGrid then everything is fine, but if I Export RadGrid with
GridTemplateColumn and RadComboBox as an  ItemTemplate, then the Value of the RadComboBox is not shown.
Can some one tell me how to make a work arround the problem so in the Excel document the Text of the Selected value of the RadComBox is displayed.
Jaspal
Top achievements
Rank 1
 answered on 28 May 2015
4 answers
272 views
I have a RadGrid in which I associated EditBatchCommand event.
In this event , I must do insert/update/delete.
I have 2 buttons in my RadGrid page, insert button and update button, insert button will add new row and update button will update all changes.

I have associated client events as follows to these buttons, 

  if (UpdateButton.Visible)
                {
                    script = @"function SaveChanges_" + grid.ClientID + @"(sender,args) {
            var grid = $find('" + grid.ClientID + @"');
            var changes = grid.get_batchEditingManager()._extractChangesString(grid.get_masterTableView())
            if(changes.length > 0)
                grid.get_batchEditingManager().saveChanges(grid.get_masterTableView());
        }";
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "saveGrid", script, true);                    UpdateButton.AutoPostBack = false;
                    UpdateButton.OnClientClicked = "SaveChanges_" + grid.ClientID;
                    this.Page.Form.DefaultButton = UpdateButton.UniqueID;                } 
        
       if (InsertButton.Visible)
                {
                    script = @"function InsertRow_" + grid.ClientID + @"(sender,args) {
            var grid = $find('" + grid.ClientID + @"');
            grid.get_batchEditingManager().addNewRecord(grid.get_masterTableView());
        }";
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "insertRow", script, true);
                    InsertButton.AutoPostBack = false;
                    InsertButton.OnClientClicked = "InsertRow_" + grid.ClientID;
                }

I have updated 1 line in my grid.
In my event "BatchEditCommand", I am having 1 commands with type "update" and I am able to get values with command.NewValues.
But when I insert a line in my grid.
In my event "BatchEditCommand", I am not getting type "insert". I am having only one command with type "update" with command.NewValues = null.
I am having this problem only after updating to new version Q3 2014. The old version of Telerik worked well and I had a command of type "insert" and I was able to get the data of newly added row with command.NewValues.
How can get the datas of my newly added row?
Thanks in advance. 

Konstantin Dikov
Telerik team
 answered on 28 May 2015
1 answer
93 views

Hi,

I'm having two problems with a rad editor.  One is that I cannot right click inside the content area.. the regular browser context menu is suppressed for some reason.  I can right click on the demo rad editors so I'm not sure what could cause it not to work in mine.

 The other problem is with spell check.  The spell checker isn't doing a good job of placing the context menu next to the related word..  you have to manually scroll down to find each word as it goes.  Any ideas?  Thanks a lot.  

Ianko
Telerik team
 answered on 28 May 2015
1 answer
97 views

Hi,

 We use this nice tool to upload file directly to FTP writing custom handler but encountered an issue.

 If the customer encounters network glitch and lose connection, is it possible to resume the file upload rather than start from all over again?

 

Thanks,

Charlie

Hristo Valyavicharski
Telerik team
 answered on 28 May 2015
1 answer
226 views

Hi, 

I want to add ios7 Style Toggle Switch in RadGrid Item Template. So i have used this jquery control http://abpetkov.github.io/switchery/

I am able to apply the control over checkbox but the problem is that it kills the autopostback of the checkbox under itemtemplate. What i found that after render html it adds a span over the input control so the checkbox event is never fired. Please tell me the workaround for this

 My Page markup

<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="CountryMaster.aspx.cs" Inherits="Test.CountryMaster" %><br><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"><br>    <link href="content/css/switchery.css" rel="stylesheet" /><br>    <script src="content/js/switchery.js"></script><br>        <script type="text/javascript"><br>            function pageLoad() {<br>                var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));<br>                elems.forEach(function (html) {<br>                    var switchery = new Switchery(html);<br>                });<br>           };<br>    </script><br></asp:Content><br><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"><br>    <div><h4 class="heading-inline">Country Manager</h4></div><br>    <div class="row-spacer"></div><br>     <div class="row"><br>         <telerik:RadGrid ID="grv_countries" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GroupPanelPosition="Top" OnNeedDataSource="grv_countries_NeedDataSource" OnItemCreated="grv_countries_ItemCreated"><br>                <MasterTableView NoMasterRecordsText="No Country Found" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" DataKeyNames="CountryID"><br>                    <CommandItemSettings  ShowAddNewRecordButton="False" /><br>                    <Columns><br>                        <telerik:GridBoundColumn DataField="CountryID" FilterControlAltText="Filter SystemLogID column" HeaderText="Country ID" UniqueName="CountryID" FilterControlWidth="50px" AutoPostBackOnFilter="True"><br>                        </telerik:GridBoundColumn><br>                        <telerik:GridImageColumn FilterControlAltText="Filter CountryFlagPicture column" ImageHeight="20px" ImageWidth="30px"  UniqueName="CountryFlagPicture"  HeaderText="Flag" AllowFiltering="false" DataImageUrlFields="CountryFlagPicture" ><br>                        </telerik:GridImageColumn><br>                        <telerik:GridBoundColumn DataField="CountryName" FilterControlAltText="Filter CountryName column" HeaderText="Name" UniqueName="CountryName" AutoPostBackOnFilter="True"><br>                            <ItemStyle Wrap="false"></ItemStyle><br>                        </telerik:GridBoundColumn><br>                        <telerik:GridTemplateColumn AutoPostBackOnFilter="True" DataField="AllowedSending" FilterControlAltText="Filter AllowedSending column" FilterControlWidth="50px" HeaderText="Allowed Sending" UniqueName="AllowedSending"><br>                            <ItemTemplate><br>                                <asp:CheckBox ID="chk_sending" runat="server" Checked='<%# Eval("AllowedSending") %>' AutoPostBack="True" OnCheckedChanged="chk_sending_CheckedChanged" /><br>                            </ItemTemplate><br>                        </telerik:GridTemplateColumn><br>                        <telerik:GridTemplateColumn AutoPostBackOnFilter="True" DataField="AllowedReceving" FilterControlAltText="Filter AllowedReceving column" FilterControlWidth="50px" HeaderText="Allowed Receving" UniqueName="AllowedReceving"><br>                            <ItemTemplate><br>                                <asp:CheckBox ID="chk_receving" runat="server" Checked='<%# Eval("AllowedReceving") %>' AutoPostBack="True" OnCheckedChanged="chk_receive_CheckedChanged" /><br>                            </ItemTemplate><br>                        </telerik:GridTemplateColumn><br>                        <telerik:GridBoundColumn FilterControlAltText="Filter CurrencyCode column" UniqueName="CurrencyCode" HeaderText="Currency" DataField="CurrencyCode" AutoPostBackOnFilter="True"><br>                             <ItemStyle Wrap="false"></ItemStyle><br>                        </telerik:GridBoundColumn><br>                         <telerik:GridTemplateColumn AutoPostBackOnFilter="True" DataField="MinTransferLimit" FilterControlAltText="Filter MinTransferLimit column" HeaderText="Min Transfer Limit" UniqueName="MinTransferLimit"><br>                             <ItemTemplate><br>                                 <telerik:RadNumericTextBox ID="txt_min_amount" DbValue='<%# Eval("MinTransferLimit") %>' runat="server" CssClass="form-control" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" EnableTheming="True" MinValue="0" RenderMode="Auto" AutoPostBack="True" OnTextChanged="txt_min_amount_TextChanged"><br><NegativeStyle Resize="None"></NegativeStyle><br><br><NumberFormat ZeroPattern="n" DecimalDigits="2" GroupSeparator=","></NumberFormat><br><br><EmptyMessageStyle Resize="None"></EmptyMessageStyle><br><br><ReadOnlyStyle Resize="None"></ReadOnlyStyle><br><br><FocusedStyle Resize="None"></FocusedStyle><br><br><DisabledStyle Resize="None"></DisabledStyle><br><br><InvalidStyle Resize="None"></InvalidStyle><br><br><HoveredStyle Resize="None"></HoveredStyle><br><br><EnabledStyle Resize="None"></EnabledStyle><br>                 </telerik:RadNumericTextBox><br>                             </ItemTemplate><br>                        </telerik:GridTemplateColumn><br>                        <telerik:GridTemplateColumn AutoPostBackOnFilter="True" DataField="MaxTransferLimit" FilterControlAltText="Filter MaxTransferLimit column" HeaderText="Max Transfer Limit" UniqueName="MaxTransferLimit"><br>                            <ItemTemplate><br>                                <telerik:RadNumericTextBox ID="txt_max_amount" DbValue='<%# Eval("MaxTransferLimit") %>' runat="server" CssClass="form-control" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" EnableTheming="True" MinValue="0" RenderMode="Auto" AutoPostBack="True" OnTextChanged="txt_max_amount_TextChanged"><br><NegativeStyle Resize="None"></NegativeStyle><br><br><NumberFormat ZeroPattern="n" DecimalDigits="2" GroupSeparator=","></NumberFormat><br><br><EmptyMessageStyle Resize="None"></EmptyMessageStyle><br><br><ReadOnlyStyle Resize="None"></ReadOnlyStyle><br><br><FocusedStyle Resize="None"></FocusedStyle><br><br><DisabledStyle Resize="None"></DisabledStyle><br><br><InvalidStyle Resize="None"></InvalidStyle><br><br><HoveredStyle Resize="None"></HoveredStyle><br><br><EnabledStyle Resize="None"></EnabledStyle><br>                 </telerik:RadNumericTextBox><br>                            </ItemTemplate><br>                        </telerik:GridTemplateColumn><br>                        <telerik:GridTemplateColumn AutoPostBackOnFilter="True" DataField="RecevingPercentage" FilterControlAltText="Filter RecevingPercentage column" HeaderText="Receving Percentage" UniqueName="RecevingPercentage"><br>                             <ItemTemplate><br>                                 <telerik:RadNumericTextBox ID="txt_receving_percentage" runat="server" CssClass="form-control" DbValue='<%# Eval("RecevingPercentage") %>' EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" EnableTheming="True" MinValue="0" MaxValue="100" Type="Percent" RenderMode="Auto" AutoPostBack="True" OnTextChanged="txt_receving_percentage_TextChanged"><br><NegativeStyle Resize="None"></NegativeStyle><br><br><NumberFormat ZeroPattern="n" DecimalDigits="2" GroupSeparator=""></NumberFormat><br><br><EmptyMessageStyle Resize="None"></EmptyMessageStyle><br><br><ReadOnlyStyle Resize="None"></ReadOnlyStyle><br><br><FocusedStyle Resize="None"></FocusedStyle><br><br><DisabledStyle Resize="None"></DisabledStyle><br><br><InvalidStyle Resize="None"></InvalidStyle><br><br><HoveredStyle Resize="None"></HoveredStyle><br><br><EnabledStyle Resize="None"></EnabledStyle><br>                 </telerik:RadNumericTextBox><br>                            </ItemTemplate><br>                        </telerik:GridTemplateColumn><br>                    </Columns><br>                </MasterTableView><br>                <ClientSettings AllowExpandCollapse="True"><br>                    <Selecting AllowRowSelect="True" /><br>                    <Scrolling AllowScroll="True"  ScrollHeight="" /><br>                </ClientSettings><br>            </telerik:RadGrid><br>      </div><br>     <telerik:RadNotification ID="notify" runat="server" Animation="Fade" EnableRoundedCorners="True" EnableShadow="True" Position="Center" VisibleTitlebar="False"></telerik:RadNotification><br></asp:Content>

Rendered HTML

For checkbox with jquery toggle applied

<td><br>                                <input id="ctl00_ContentPlaceHolder1_grv_countries_ctl00_ctl04_chk_sending" type="checkbox" name="ctl00$ContentPlaceHolder1$grv_countries$ctl00$ctl04$chk_sending" onclick="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$grv_countries$ctl00$ctl04$chk_sending\',\'\')', 0)" class="js-switch" data-switchery="true" style="display: none;"><span class="switchery switchery-default" style="box-shadow: rgb(100, 189, 99) 0px 0px 0px 16px inset; border-color: rgb(100, 189, 99); transition: border 0.4s, box-shadow 0.4s, background-color 1.2s; -webkit-transition: border 0.4s, box-shadow 0.4s, background-color 1.2s; background-color: rgb(100, 189, 99);"><small style="left: 20px; transition: background-color 0.4s, left 0.2s; -webkit-transition: background-color 0.4s, left 0.2s; background-color: rgb(255, 255, 255);"></small></span><br>                            </td>

 

Normal CheckBox Without Jquery Applied (Autopostback Works Fine)

<td><br>                                <input id="ctl00_ContentPlaceHolder1_grv_countries_ctl00_ctl04_chk_receving" type="checkbox" name="ctl00$ContentPlaceHolder1$grv_countries$ctl00$ctl04$chk_receving" checked="checked" onclick="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$grv_countries$ctl00$ctl04$chk_receving\',\'\')', 0)"><br>                            </td>

Server Side For Appyling Class​

protected void grv_countries_ItemCreated(object sender, GridItemEventArgs e)<br>        {<br>            if (e.Item is GridDataItem)<br>            {<br>                CheckBox chk_sending = (CheckBox)e.Item.FindControl("chk_sending");<br>                chk_sending.InputAttributes["class"] = "js-switch";<br>            }<br>        }

please help to enable autopostback on the jquery styled button

 

thanks

Viktor Tachev
Telerik team
 answered on 28 May 2015
2 answers
74 views
If I download the zip file directly from the Style Builder application, then upload it straight into the Skin Assembly application, it works fine, but if I unzip the file and rezip it without changing anything, Skin Assembly will go to the "Server Error" page.
Danny
Top achievements
Rank 1
 answered on 27 May 2015
2 answers
233 views

hi,

I am running into a style issue for multi-column combo box with selections. The checkbox and corresponding item are in two lines. (see attached). Here is my code:

 

<%@ Page AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="ComboBox.Examples.Functionality.MultiColumnCombo.DefaultCS"
    Language="c#" MasterPageFile="~/MasterPage.master" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link rel="stylesheet" type="text/css" href="styles.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceholder1" runat="Server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Label1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <div class="demo-container size-narrow">
        <h2>Grid-like multi-column:</h2>
        <telerik:RadComboBox runat="server" ID="RadComboBox1" Height="190px" Width="460px" CheckBoxes="true"
            MarkFirstMatch="true" DataSourceID="SessionDataSource1" EnableLoadOnDemand="true"
            HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
            OnDataBound="RadComboBox1_DataBound" OnItemDataBound="RadComboBox1_ItemDataBound"
            OnItemsRequested="RadComboBox1_ItemsRequested" DropDownCssClass="exampleRadComboBox">
            <HeaderTemplate>
                <ul>
                    <li class="col1">Contact Name</li>
                    <li class="col2">City</li>
                    <li class="col3">Title</li>
                </ul>
            </HeaderTemplate>
            <ItemTemplate>
                <ul>
                    <li class="col1">
                        <%# DataBinder.Eval(Container.DataItem, "ContactName") %></li>
                    <li class="col2">
                        <%# DataBinder.Eval(Container.DataItem, "City") %></li>
                    <li class="col3">
                        <%# DataBinder.Eval(Container.DataItem, "ContactTitle") %></li>
                </ul>
            </ItemTemplate>
            <FooterTemplate>
                A total of
<asp:Literal runat="server" ID="RadComboItemsCount" />
                items
            </FooterTemplate>
        </telerik:RadComboBox>
        <br />
        <br />
        <h2>Multiple rows and columns:</h2>
        <telerik:RadComboBox ID="RadComboBox2" runat="server" Height="190px" Width="460px"
            DropDownCssClass="multipleRowsColumns" DropDownWidth="460px" />

        <telerik:RadButton runat="server" ID="Button1" Text="Select" OnClick="Button1_Click"></telerik:RadButton>
        <asp:Label runat="server" ID="Label1" />
    </div>

    <asp:SqlDataSource ID="SessionDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString35 %>"
        SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource>

    <telerik:RadScriptBlock runat="server">
        <script type="text/javascript">
            function UpdateItemCountField(sender, args) {
                //Set the footer text.
                sender.get_dropDownElement().lastChild.innerHTML = "A total of " + sender.get_items().get_count() + " items";
            }
        </script>
    </telerik:RadScriptBlock>
</asp:Content>

Your help will be greatly appreciated.

Bin
Top achievements
Rank 1
 answered on 27 May 2015
1 answer
52 views

HiI am currently running my application in IE11 and set the content mode to IE8

<add name="X-UA-Compatible" value="IE=8" />

So now in IE 11, expand functionality of radpanelitem is not displaying the expanded

itemitem.expand();

It is rendering it as  -Not Working

Refer notworking.jpg snapshot

But displaying correctly in below mentioned scenarios

Browser IE11 Content Mode:Edge

<add name="X-UA-Compatible" value="IE=Edge" /> 

 Refer working.jpg snapshot

Browser IE8 Content Mode:IE8

<add name="X-UA-Compatible" value="IE=8" />

Refer working.jpg snapshot

Ivan Danchev
Telerik team
 answered on 27 May 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?