Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
160 views
hi Team,
 I am working on Rad Grid Batch Editing.I am facing a problem whenever i do postback ,grid not binding data on postback .I am creating GridTemplateColumn dynamically. I am also binding data on page load event.Whenever i do postback ,grid only binds data of GridNumericColumn but not of GridTemplateColumn.Reason is GridTemplateColumn.ItemTemplate property not firing InstantiateIn(Container container) function of Template class.I am making postback by RadioButton click.Please reply on shekhar.chauhan@innotiontech.com if possible.Please help me.

Thanks in advance,
Eyup
Telerik team
 answered on 13 Oct 2014
1 answer
215 views
I am trying to get a horizontal list of RadButtons.  So far, the best way I've been able to accomplish this is by using a RadMenu, and adding an ItemTemplate containing a RadButton.
However, this causes the menu's ItemClick to not fire.

Is there a way to use the itemtemplate to force the menu options to look like radbuttons, and still have the ItemClick event fire?  Or is there a better way to get a horizontal list of buttons?  (I had just a bunch of buttons, but I want to share the click event and just look for the clicked one, rather than having separate button click events).

Thanks for any help!
 Here's my markup:
<telerik:RadMenu ID="radMenuRegions" runat="server" Width="100%" BackColor="White"  Skin="" OnItemClick="radMenuRegions_ItemClick"  >
                <ItemTemplate>
                    <telerik:RadButton ID="radBtn" runat="server" Text='<%# DataBinder.Eval(Container, "Text")%>' Skin="WebBlue" Width="100px" Font-Names="Arial" Font-Size="14pt" Height="65px" style="margin:20px;" OnClick="radBtn_Click"></telerik:RadButton>
                    <telerik:RadToolTip ID="toolTip" runat="server" TargetControlID="radBtn" Title='<%# DataBinder.Eval(Container, "Text")%>' Skin="WebBlue" Text='<%# DataBinder.Eval(Container, "Value")%>'></telerik:RadToolTip>
                </ItemTemplate>
                <Items>
                    <telerik:RadMenuItem Text="East" Value="1"  />
                    <telerik:RadMenuItem Text="Main/FHC" Value="2" />
                    <telerik:RadMenuItem Text="Medina" Value="3" />
                    <telerik:RadMenuItem Text="West" Value="4" />
                    <telerik:RadMenuItem Text="Wooster" Value="5" />
                </Items>
            </telerik:RadMenu>
Dimitar Terziev
Telerik team
 answered on 13 Oct 2014
2 answers
215 views
Hi,

It does not recognize the get_value method in my custom button object.

.aspx calling the user control
...
<
telerik:RadTextBox ID="textBoxSearchItemCode" ClientInstanceName="textBoxSearchItemCode" runat="server" Width="90px" CssClass="inline">
</telerik:RadTextBox>
<telerik:RadTextBox ID="textBoxSearchItemName" ClientInstanceName="textBoxSearchItemName" runat="server" Width="190px" CssClass="inline">
</telerik:RadTextBox>
<cc1:JPopup ID="popupItem" runat="server" PopupType="Item" CodeControl="textBoxSearchItemCode" NameControl="textBoxSearchItemName
"
OKScript="Search();"/>
...

user control JPopup.cs
namespace My.Web.JControl.JPopup
{
    [DefaultProperty("Text")]
    [DefaultEvent("OK")]
    [ToolboxData("<{0}:Popup runat=server></{0}:Popup>")]
    public class JPopup : WebControl, IPostBackEventHandler
    {
 
        public JPopup()
            : base()
        {
            UseOKServerEvent = false;
            OKScript = "";
            CodeControl = "";
            NameControl = "";
            PopupControl = "";
            PopupType = ePopupType.None;
            Hidden = false;
        }
 
        #region Properties
 
        /// <summary>
        /// Use OKEvent
        /// </summary>
        [Bindable(true),
        Category("Event")]
        public bool UseOKServerEvent
        {
            get
            {
                return (bool)ViewState["PopupUseOKServerEvent"];
            }
            set
            {
                ViewState["PopupUseOKServerEvent"] = value;
            }
        }
 
        /// <summary>
        /// OKEvent Handler for Javascript
        /// </summary>
        [Bindable(true)]
        [Category("Event")]
        [Editor(typeof(OKEventEditor), typeof(UITypeEditor))]
        public string OKScript
        {
            get
            {
                return (string)ViewState["PopupOKScript"];
            }
            set
            {
                ViewState["PopupOKScript"] = value;
            }
        }
 
        #endregion
 
        #region Binding Property
 
        // column to editbox mapping
        [Bindable(true),
        DefaultValue(""),
        Category("Binding")]
        public string CodeControl
        {
            get
            {
                return (string)ViewState["PopupCodeControl"];
            }
            set
            {
                ViewState["PopupCodeControl"] = value;
            }
        }
 
        [Bindable(true),
        DefaultValue(""),
        Category("Binding")]
        public string NameControl
        {
            get
            {
                return (string)ViewState["PopupNameControl"];
            }
            set
            {
                ViewState["PopupNameControl"] = value;
            }
        }
 
        // column to editbox mapping
        [Bindable(true),
        DefaultValue(""),
        Category("Binding")]
        public string PopupControl
        {
            get
            {
                return (string)ViewState["PopupPopupControl"];
            }
            set
            {
                ViewState["PopupPopupControl"] = value;
            }
        }
 
        [Bindable(true),
        DefaultValue(""),
        Category("Binding")]
        public string Parameter
        {
            get
            {
                return (string)ViewState["PopupParameter"];
            }
            set
            {
                ViewState["PopupParameter"] = value;
            }
        }
 
        #endregion
 
        #region PopupType Property
 
        [Bindable(true)]
        [Category("PopupType")]
        [DefaultValue(ePopupType.None)]
        public ePopupType PopupType
        {
            get
            {
                return (ePopupType)ViewState["PopupType"];
            }
            set
            {
                ViewState["PopupType"] = value;
            }
        }
 
        [Bindable(true)]
        [Category("PopupType")]
        [DefaultValue(false)]
        public bool Hidden
        {
            get
            {
                return (bool)ViewState["PopupHidden"];
            }
            set
            {
                ViewState["PopupHidden"] = value;
            }
        }
 
        public enum ePopupType { None, User, Customer, PoCustomer, Item, MoldItem, PowerChart };
         
        #endregion
 
 
        #region Render
 
        /// <summary>
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        ///
        protected override void RenderContents(HtmlTextWriter output)
        {
            StringBuilder sbRender = new StringBuilder();
            // Design Mode
            if (this.DesignMode)
            {
                sbRender.Append("<div style=\"VERTICAL-ALIGN: bottom; DISPLAY:inline;POSITION:relative; \" onMouseOver = \"this.style.cursor = 'hand'\">");
                sbRender.Append("<img id = \"" + ID + "\" name = \"" + ID + "\"");
                sbRender.Append(string.Format(" src=\"/{0}/Images/Main/popup.gif\"/>", ConfigurationManager.AppSettings["WebSiteName"]));
 
                sbRender.Append("</div>");
                output.Write(sbRender);
                return;
            }
 
            sbRender.Append("<script type='text/javascript'>");
            sbRender.Append(string.Format(@"
function Popup_{0}()
{{
    var popSearchCode = $find('<%= {1}.ClientID %>').get_value(); <<---- here!!!!
    var popSearchName = $find('<%= {2}.ClientID %>').get_value();", ID, CodeControl, NameControl));
.......

error :
SCRIPT5007: Unable to get value of the property 'get_value()': object is null or undefined.

How Can I use RadTextBox get_value method?

Thank you.
Yoongu
Top achievements
Rank 1
 answered on 13 Oct 2014
11 answers
273 views
Hi,

I have a radwindow with a PanelBar inside.

I declare the window like this:

<telerik:RadWindow
    ID="RadWindow1"
    runat="server"
    AutoSizeBehaviors="Width, Height"
    AutoSize="true"
    VisibleStatusbar="false"
    Behaviors="Move"
    VisibleOnPageLoad="false"
    ReloadOnShow="true"
    Modal="true"
    NavigateUrl="Popup_Add.aspx"
    OnClientClose="OnClientclose"
    EnableShadow="true">
</telerik:RadWindow>

And inside the Popup_Add.aspx I have the RadPanelBar inside a tableCell, inside an updatepanel

<asp:TableCell
    ColumnSpan="3"
    VerticalAlign="Middle">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <telerik:RadAjaxPanel
                ID="RadAjaxPanel1"
                runat="server">
                <telerik:RadPanelBar
                    runat="server"
                    ID="RadPanelBar1"
                    ExpandMode="MultipleExpandedItems"
                    Width="100%">
                    <Items>
                        <telerik:RadPanelItem Expanded="false" Text="Advanced Settings" runat="server">
                                <Items>
                                    <telerik:RadPanelItem Value="AccountInformation" runat="server">
                                        <ItemTemplate>
[controls here]
 
                                                </ItemTemplate>
                                            </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelItem>
                            </Items>
                        </telerik:RadPanelBar>
                    </telerik:RadAjaxPanel>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:TableCell>
    </asp:TableRow>
</asp:Table>

based on http://demos.telerik.com/aspnet-ajax/window/examples/autosize/defaultcs.aspx
I think I am supposed to call 'popup.autoSize(true);'

But I am not sure how to wire it.

I already have this in the window to close it, so I could reuse the GetRadWindow() for the autosize.
I just need to know how to call it for the RadPanelBar expand/collapse

​
<script type="text/javascript">
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }
 
    function CloseWithArg(arg) {
        GetRadWindow().close(arg);
    }
</script>
Mickael
Top achievements
Rank 1
 answered on 11 Oct 2014
2 answers
566 views
Hi.

how close window when clicking outside?, when my window is modal because my window is out of my page and the title bar is not visible to close

thanks!
Faustino
Top achievements
Rank 1
 answered on 11 Oct 2014
2 answers
132 views
Hi all

How can I list all skins from FormDecorator in a RadMenu and then force the RadFormDecorater to decorate the page with the skin, which was selected in the RadMenu?

Regards
Felix
Felix
Top achievements
Rank 1
 answered on 11 Oct 2014
1 answer
99 views
Hello,

I am currently trying to have a certain layout for a RadGrid, Here is how I would like it to look:

|____Field1_____|_______Field2______|_______Field3_______|
|_____________________Field4__________________________|

and I would repeat that pattern for each item of the RadGrid. The first 3 fields are for reference number, date and a name.
The fourth one is a comment and can be pretty long so that is why I really need it to be on a second row.

As for right now, I don't really see how I could implement that and I havent seen any examples of it.

Just add a line return (<br>) doesn't work because I still have the column width problem !

Thanks ! 
Mark
Top achievements
Rank 1
 answered on 10 Oct 2014
3 answers
853 views
I have a grid with several databound columns. Some of the columns contain multiline data. The data is captured and stored in the database correctly (with carriage returns), but in the grid itself the carriage returns are removed and the lines all just run together into one long line in the cell instead of displaying 3 lines in the cell.
Does a databound grid column have any setting for multiline display within a cell?
Thanks
Mark
Top achievements
Rank 1
 answered on 10 Oct 2014
5 answers
207 views

Environment: Internet Explorer 11 (11.0.12) with Document Mode Edge (Default), Telerik UI for ASP.NET AJAX Library Q2 2014 version 2014.2.724

​Steps to reproduce:

1. In Visual Studio, create a new ASP.NET Web Application using the Empty template and the Web Forms as a core reference.
2. Add references to Telerik.Web.UI and Telerik.Web.UI.Skins assemblies.
3. Add the Default.aspx Web Forms item into the root of the project.
4. In Default.aspx page, add the following HTML:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2.Default" %><br>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<
html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
</head>
<body>
  <form id="form1" runat="server">   
   <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <telerik:RadEditor ID="RadEditor1" runat="server">
      <Snippets>
        <telerik:EditorSnippet Name="2 Column Div Layout">           
          <!-- Row 1 -->
          <div class="row">
           <div class="span7">
             <div class="row">
              <div class="span4">
                <p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
                </div>
              <div class="span3">
                <p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
                </div>
             </div>
           </div>
          </div>
          <!-- Pad -->
          <div class="pad15"></div>
          <!-- Row 2 -->
          <div class="row">
           <div class="span7">
             <div class="row">
              <div class="span4">
                <p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
              </div>
              <div class="span3">
                <p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
              </div>
             </div>
           </div>
          </div>
        </telerik:EditorSnippet>
      </Snippets>
    </telerik:RadEditor>
  </form>
</body>
</html>

5. Build and run the project using IE 11.
6. In the Editor control click the Insert Code Snippet button and select the 2 Column Div Layout code snippet.
7. Switch to the HTML tab and then back to Design one.
8. Click the Insert Code Snippet button and select the 2 Column Div Layout code snippet one more time.

Actual Result:

<!-- Row 1 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
<p>
<!-- Row 1 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
</div>
</div>
</div>
</div>
</p>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
<p>
<div class="row">
<div class="span7">
<div class="row">
<div class="span3">
</div>
</div>
</div>
</div>
<!-- Pad -->
<div class="pad15">&nbsp;</div>
<!-- Row 2 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
</div>
</div>
</div>
</div>
</p>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et. </p>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et. </p>
<p>
<div class="row">
<div class="span7">
<div class="row">
<div class="span3">
</div>
</div>
</div>
</div>
Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
<div class="span3">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
</div>
</div>
</div>
<!-- Pad -->
<div class="pad15">&nbsp;</div>
<!-- Row 2 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
<div class="span3">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
</div>
</div>
</div>

Expected Result:

<!-- Row 1 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
<div class="span3">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
</div>
</div>
</div>
<!-- Pad -->
<div class="pad15">&nbsp;</div>
<!-- Row 2 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et. </p>
</div>
<div class="span3">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et. </p>
</div>
</div>
</div>
</div>
<!-- Row 1 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
<div class="span3">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et.</p>
</div>
</div>
</div>
</div>
<!-- Pad -->
<div class="pad15">&nbsp;</div>
<!-- Row 2 -->
<div class="row">
<div class="span7">
<div class="row">
<div class="span4">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et. </p>
</div>
<div class="span3">
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus, suspendisse ac nec et. </p>
</div>
</div>
</div>
</div>

Note:
If you skip step #7 the Actual Result would be different, but still incorrect:
<!-- Row 1 --><br>
<div class="row"><br>
<div class="span7"><br>
<div class="row"><br>
<div class="span4"><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et.</p><br>
</div><br>
<div class="span3"><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et.</p><br>
</div><br>
</div><br>
</div><br>
</div><br>
<!-- Pad --><br>
<div class="pad15">&nbsp;</div><br>
<!-- Row 2 --><br>
<div class="row"><br>
<div class="span7"><br>
<div class="row"><br>
<div class="span4"><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et. </p><br>
</div><br>
<div class="span3"><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et.<br>
<!-- Row 1 --><br>
<div class="row"><br>
<div class="span7"><br>
<div class="row"><br>
<div class="span4"><br>
</div><br>
</div><br>
</div><br>
</div><br>
</p><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et.</p><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et.</p><br>
<p><br>
<div class="row"><br>
<div class="span7"><br>
<div class="row"><br>
<div class="span3"><br>
</div><br>
</div><br>
</div><br>
</div><br>
<!-- Pad --><br>
<div class="pad15">&nbsp;</div><br>
<!-- Row 2 --><br>
<div class="row"><br>
<div class="span7"><br>
<div class="row"><br>
<div class="span4"><br>
</div><br>
</div><br>
</div><br>
</div><br>
</p><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et. </p><br>
<p>Enim ultrices, elementum phasellus. Mauris sed nulla sed, egestas feugiat a dictum libero, nunc sapien tri tique facilisis venenatis risus,<br>
suspendisse ac nec et. </p><br>
</div><br>
</div><br>
</div><br>
</div>

Oleg
Top achievements
Rank 1
 answered on 10 Oct 2014
2 answers
80 views
HI,

I have a standalone RadLivetile that gets populated by a PageMethod (Webmethod).
In certain situations I want to stop calling of the Pagemethod that populates the tile, i.e. the tile should stop updating itself.
I tried to use

var livetile = $find("<%=RadLiveTile1.ClientID %>");

livetile.set_updateInterval(0);

but the Pagemethod is still called, i.e. the above call has no effect !

I run Windows 8.1 and see the Problem on all Major Browsers (IE,FF,Chrome)

Is this a bug i.e. do other People have the same problem or am I doing something wrong ?

Really hope someone can help !
Every Feedback is highly appreciated.
Best regards
Hans-Juergen





​
Hans-Jürgen
Top achievements
Rank 1
 answered on 10 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?