Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
100 views
Need to change Fill Opacity in Areachart. Now it is 0.4 i need to change it as 0.8.  Though it is in SVG format i dont know how to change. Please guide me
Danail Vasilev
Telerik team
 answered on 13 Oct 2014
1 answer
735 views
Hi!

I want to create a qr-code:
    
string photo = @"PHOTO;PNG;ENCODING=BASE64:" + Convert.ToBase64String(File.ReadAllBytes(Server.MapPath(@"/Img/qr_test.png")));
string vCardText = "BEGIN:VCARD\r\nVERSION:2.1\r\nN:";
vCardText += "Name" + "\r\n";
vCardText += "TEL;WORK;VOICE:" + "+00-0000-00000" + "\r\n";
vCardText += "EMAIL;PREF;INTERNET:" + "peter.xxx@yyy.cc" + "\r\n";
vCardText += photo + "\r\n";
vCardText += "END:VCARD";
            
RadBarcode barcode = new RadBarcode();
barcode.Text = vCardText;
barcode.Type = BarcodeType.QRCode;
barcode.LineWidth = 1;

System.Drawing.Image image = barcode.GetImage();

I get following error:
Parametername: The Text cannot be encoded with the current Version, ErrorCorrectionLevel and Mode.

Please help! Thank you!
Konstantin Dikov
Telerik team
 answered on 13 Oct 2014
1 answer
154 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
209 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
204 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
258 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
556 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
128 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
95 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
828 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?