Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
59 views
I have a webpage that has 2 user controls on it. In one user control i have a RadMenu. In the other user control, underneath the first user control, a flash movie object is placed, When I am developing and I run the application on my machine using either IE or Firefox as my default, the RadMenu displays over the flash movie. I then deploy the code to my development server. When I run the application (development server) using the Firefox browser on my machine the RadMenu displays over the flash movie.

When I run the application (development server) using IE browser on my machine the RadMenu displays behind the flash movie. This is the same IE (version 8) that my machine uses when running it locally on my machine.

I have tried everything but cannot see what is wrong. Attached is the code being generated using FireFox (embed) and IE(object). In both cases the wmode is set to opaque.Any thoughts on why it is displaying behind the flash movie when running IE using the development server only?
Ivan Danchev
Telerik team
 answered on 25 Mar 2015
1 answer
164 views
Hello,

I have a tree with node templates that are added programmatically in the code-behind. The tree is set up to display checkboxes (Checkboxes="true") and the template includes a label and checkbox.  I want to set up the tree so that when checking the node's checkbox will also set the template's checkbox to the opposite value and viceversa (checking the template's checkbox will set the node's checkbox).  I have tried different approaches but I just can't get this to work.  Can anybody point me in the right direction.  Here's the code for the .aspx page:

<style type="text/css">
    .RedBoldFont
    {
        color: red;
        font-weight:bold;
    }
    .RedBoldItalicFont
    {
        color: red;
        font-weight:bold;
        font-style:italic;
    }
</style>

<telerik:RadTreeView ID="attributesTree2" runat="server" OnNodeDataBound="attributesTree2_NodeDataBound" CheckBoxes="true" TriStateCheckBoxes="true" OnNodeCheck="attributesTree2_NodeCheck">

</telerik:RadTreeView>


 and for the code-behind:

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace DDW
{
    public partial class TestingForDAR : System.Web.UI.UserControl
    {


        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                
                ///////////////////////////////

                attributesTree2.DataSource = GetAttributes();

                attributesTree2.DataFieldID = "ID";
                attributesTree2.DataFieldParentID = "ParentID";
                attributesTree2.DataBind();


            }

            TreeNodeTemplate template = new TreeNodeTemplate();

            foreach (RadTreeNode node in attributesTree2.GetAllNodes())
            {                
                template.InstantiateIn(node);
            }

            //attributesTree2.DataBind();


        }

        public List<Attribute> GetAttributes()
        {
            List<Attribute> attributesList = new List<Attribute>();

            attributesList.Add(new Attribute(1, null, "Attribute A", "Description for Attribute A", true, false, false));
            attributesList.Add(new Attribute(2, 1, "Attribute A1", "Description for Attribute A1", true, false, false));
            attributesList.Add(new Attribute(3, 1, "Attribute A2", "Description for Attribute A2", false, false, false));
            attributesList.Add(new Attribute(4, 1, "Attribute A3", "Description for Attribute A3", false, false, false));
            attributesList.Add(new Attribute(5, null, "Attribute B", "Description for Attribute B", true, false, true));
            attributesList.Add(new Attribute(6, 5, "Attribute B1", "Description for Attribute B1", true, false, true));
            attributesList.Add(new Attribute(7, 5, "Attribute B2", "Description for Attribute B2", false, false, false));
            attributesList.Add(new Attribute(8, null, "Attribute C", "Description for Attribute C", false, false, false));
            attributesList.Add(new Attribute(9, 8, "Attribute C1", "Description for Attribute C1", false, false, false));
            attributesList.Add(new Attribute(10, 8, "Attribute C2", "Description for Attribute C2", false, false, false));

            //attributesList.Add(new Attribute(11, 10, "Attribute C21", "Description for Attribute C21", false, false, false));
            //attributesList.Add(new Attribute(12, 10, "Attribute C22", "Description for Attribute C22", false, false, false));
            //attributesList.Add(new Attribute(13, 12, "Attribute C22a", "Description for Attribute C22a", false, false, false));
            //attributesList.Add(new Attribute(14, 12, "Attribute C22b", "Description for Attribute C22b", false, false, false));
            //attributesList.Add(new Attribute(15, 12, "Attribute C22b", "Description for Attribute C22c", false, false, false));



            return attributesList;

        }

        protected void attributesTree2_NodeDataBound(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
            Attribute nodeData = (Attribute)e.Node.DataItem;

            if (nodeData.Default)
            {
                //e.Node.ForeColor = Color.Red;
                e.Node.CssClass = "RedBoldFont";
                if (nodeData.Exclude)
                {
                    e.Node.CssClass = "RedBoldItalicFont";
                }

            }

            e.Node.Attributes.Add("Name", nodeData.Name);
            string exclude = nodeData.Exclude ? "true" : "false";
            e.Node.Attributes.Add("Exclude", exclude);
            e.Node.Attributes.Add("Description", nodeData.Description);


        }

        protected void attributesTree2_NodeCheck(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
            e.Node.Attributes["Exclude"] = e.Node.Checked ? "false" : "true";

            attributesTree2.DataBind();
        }

    }


    public class Attribute
    {
        public int ID { get; set; }
        public int? ParentID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public bool Include { get; set; }
        public bool Exclude { get; set; }
        public bool Default { get; set; }

        public Attribute()
        {

        }

        public Attribute(int id, int? parentID, string name, string description, bool def, bool include, bool exclude)
        {
            ID = id;
            ParentID = parentID;
            Name = name;
            Description = description;
            Default = def;
            Include = include;
            Exclude = exclude;
        }

    }

    ////////////////////////////////////////////////////////////////////////////////////////////////

    class TreeNodeTemplate : ITemplate
    {

        public event CommandEventHandler Command;

        private void OnCommand(CommandEventArgs e)
        {

            if (Command != null)
            {
                Command(this, e);
            }
        }

        public void InstantiateIn(Control container)
        {
            //...  

            Label lblAttrName = new Label();
            lblAttrName.ID = "lblAttrName";
            lblAttrName.DataBinding += new EventHandler(lblAttrName_DataBinding);
            container.Controls.Add(lblAttrName);

            CheckBox chkExclude = new CheckBox();
            chkExclude.ID = "ckExclude";
            chkExclude.AutoPostBack = true;
            chkExclude.DataBinding += new EventHandler(chkExclude_DataBinding);
            chkExclude.CheckedChanged += new EventHandler(chkExclude_CheckedChanged);
            container.Controls.Add(chkExclude);

            //Button saveButton = new Button();
            //saveButton.ID = "saveButton1";
            //saveButton.Text = "save";

            ////set properties  
            //saveButton.Command += saveButton_Command;
            ////data binding event handler  
            ////add to controls collection  
            //container.Controls.Add(saveButton);
            //...  
        }

        private void lblAttrName_DataBinding(object sender, EventArgs e)
        {
            Label target = (Label)sender;
            RadTreeNode node = (RadTreeNode)target.BindingContainer;

            target.Text = node.Attributes["Name"];
            target.ToolTip = node.Attributes["Description"];
        }

        private void chkExclude_DataBinding(object sender, EventArgs e)
        {
            CheckBox chkExclude = (CheckBox)sender; 
            RadTreeNode node = (RadTreeNode)chkExclude.BindingContainer;

            chkExclude.Checked = Convert.ToBoolean(node.Attributes["Exclude"]);
            node.Checked = !chkExclude.Checked;


        }

        private void chkExclude_CheckedChanged(object sender, EventArgs e)
        {
            CheckBox target = (CheckBox)sender;
            RadTreeNode node = (RadTreeNode)target.Parent;

            Attribute data = (Attribute)node.DataItem;
            node.Checked = !data.Exclude;

        }

    }




}


 
Plamen
Telerik team
 answered on 25 Mar 2015
1 answer
84 views
Hi Admin, I want to export a  excel report file. It include infomation customer( radgrid on usercontrol), oder(radgrid on usercontrol), order detail (Radgird on mainpage). I dont know how to combie data on many control-> a report.
Please show me how to solve it!
Thanks
David Tran

<div id="uxPOContainer" runat="server" class="POContainer">
        <asp:HiddenField runat="server" ID="hdfOrderId" />
        <uc:CustomerInfo ID="uxCustomerInfo" runat="server"></uc:CustomerInfo>
        <uc:OrderInfo ID="uxOrderInfo" runat="server"/>        
        <div class="myborder" ></div>
        <asp:Button ID="uxEditOrd" runat="server" Text ="Edit Order" OnClick="uxEditOrd_Click" CssClass="ButtonType1" Visible="false"  />
        <asp:PlaceHolder ID="phDetail" runat="server">
            <ext:RadListView runat="server" ID="rlvOrderDetail" ItemPlaceholderID="plhDetail" OnItemDataBound="rlvOrderDetail_ItemDataBound"
                OnNeedDataSource="rlvOrderDetail_NeedDataSource" OnItemCreated="rlvOrderDetail_ItemCreated" BorderWidth="1" >
                <LayoutTemplate>
                    <table class="FixTableOD TablePaddingTD TableWithInputFocus" border="1">
                        <colgroup>
                            <col class="w5" />
                            <col class="w25" />
                            <col class="w15" />
                            <col class="w10" />
                            <col class="w10" />
                            <col class="w15" />
                            <col class="w10" />
                            <col class="w10" />
                        </colgroup>

                        <thead class="TableHeader">
                            <tr>
                                <th></th>
                                <th class="FormatString"><%# Resources.LocalizedStrings.FieldName_ProductName %></th>
                                <th class="FormatNumber"><%# Resources.LocalizedStrings.FieldName_Quantity %></th>
                                <th class="FormatCode"><%# Resources.LocalizedStrings.Products_Grid_ProductUnit %></th>
                                <th class="FormatNumber"><%# Resources.LocalizedStrings.FieldName_UnitPrice %></th>
                                <th class="FormatNumber"><%# Resources.LocalizedStrings.FieldName_Amount %></th>
                                <th class="FormatDate"><%# Resources.LocalizedStrings.FieldName_ExpectDeliveryDate %></th>
                                <th class="FormatNumber"><%# Resources.LocalizedStrings.FieldName_CBM %></th>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:PlaceHolder ID="plhDetail" runat="server"></asp:PlaceHolder>

                        </tbody>
                        <tfoot class="OrderDetailFooter inlineTableBg">
                            <tr>
                                <td colspan="2" >
                                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources: LocalizedStrings,FieldName_Total %>"> </asp:Label>

                                </td>
                                <td class="FormatNumber" >
                                    <asp:Literal runat="server" ID="ltrTotalQuantity"></asp:Literal>
                                      <p class="totalQty">
                                    <asp:Literal runat="server" ID="ltrTotalQtyByCarton">
                                    </asp:Literal>
                                    <br />
                                    <asp:Literal runat="server" ID="ltrTotalQtyByPcs">
                                    </asp:Literal>
                                </p>
                                </td>
                                <td></td>
                                <td></td>
                                <td class="FormatNumber">
                                    <asp:Literal runat="server" ID="ltrTotalAmount"></asp:Literal>

                                </td>
                                <td></td>
                                <td class="FormatNumber">
                                    <asp:Literal runat="server" ID="ltrTotalCBM"></asp:Literal>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </LayoutTemplate>

                <ItemTemplate>
                    <div id="uxCalc">
                        <tr>
                            <td class="FormatNumber">
                                <%# Container.DataItemIndex + 1 %>
                            </td>
                            <td title='<%# Eval("ProductId") %>'>
                                <asp:HiddenField ID="ItemIndex" Value="<%# Container.DataItemIndex %>" runat="server" />
                                <%# Eval("ProductName") %>
                            </td>

                            <td class="FormatNumber">
                                <asp:Label  ID="uxQuantity" runat="server"><%# (int.Parse( Eval("Quantity").ToString())).ToString("#,##0") %></asp:Label>
                              

                            </td>
                            <td class="FormatCode">
                                <asp:Label ID="uxUOM" runat="server" Visible="false"  ><%#  Eval("UOM").ToString() %> </asp:Label>
                                <asp:Label ID="uxUOMName" runat="server" ></asp:Label> 
                            </td>
                            <td class="FormatNumber">
                                 <asp:Label ID="uxUnitPrice" runat="server"><%# (double.Parse( Eval("UnitPrice").ToString())).ToString("#,##0.00") %></asp:Label>
                            </td>
                            <td class="FormatNumber">
                                 <asp:Label ID="uxAmount" runat="server"><%# (double.Parse( Eval("Amount").ToString())).ToString("#,##0.00")  %></asp:Label>
                            </td>

                            <td class="FormatDate">
                                <asp:Label ID="uxExpectDeliveryDate" runat="server"><%# Eval("ExpectDeliveryDate").ToString() %></asp:Label>
                            </td>
                            <td class="FormatNumber">
                                 <asp:Label ID="uxCBM" runat="server"><%# double.Parse( Eval("CBM").ToString()) %></asp:Label>
                                
                            </td>
                        </tr>
                    </div>
                </ItemTemplate>


            </ext:RadListView>
        </asp:PlaceHolder>
    </div>
Kostadin
Telerik team
 answered on 25 Mar 2015
3 answers
163 views
Hello, 
I tried to Disable the Radtooltip,
<telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID ="myTarget"  Position ="TopCenter"  AutoCloseDelay ="0"  Enabled ="false">


but the Tooltip is still active... 

I want to disable / enable the tooltip with Javascript, 
but set_visible(true / false) don't work.

I Use the RadControls Q1 2009 

any Idea ?           
Marin Bratanov
Telerik team
 answered on 25 Mar 2015
3 answers
270 views
Hello,

We are working on a very important project for our company.
Our project uses Telerik’s RadGrid control.
We are showing the DetailTable, when the user expands a The Master Table View.

We are 100% SURE that this issue was not present before an upgrade of Telerik’s Controls!
It doesn't work now and we don’t know why.

This is extremely important for us the we solve this issue as soon as possible, as we need to demonstrate the project to our clients soon!

The user can request different information through various reports.
Each time the user requests a report, new information is shown in the RadGrid.
However, the TableDetailView always retains the same columns, as the first request of details!? 

Please see this video: http://youtu.be/6dFA2mqep_U

How can I fix that?  

Thanks,
Daniel.
.NET Programmer at
ISR Corp.
Daniel
Top achievements
Rank 1
 answered on 25 Mar 2015
1 answer
110 views
I have a telrik Grid with a FormTemplate, Inside of that I have a Multiline text box and two DropDownList controls. Because the Multiline text box takes up so much space the other controls appear to be aligning to the bottom and I want them to align to the top within the template. I haven't been able to figure out how or where to apply something like the ItemStyle-VerticalAlign="Top" and actually get it to work. I would appreciate any thoughts anyone might have.

Below is my current code:


<EditFormSettings EditFormType="Template">
    <FormTemplate>                           
        <
div class="editGridSubGoal">>                     
            <
asp:Label ID="lblSubGoalText" runat="server" Text="Sub-Goal:"  AssociatedControlID="tbSubGoalText"  Visible="false"  /> 
            <asp:TextBox ID="tbSubGoalText" runat="Server" TextAlign="Right" TextMode="MultiLine" Rows="5" Columns="55"
                 Text='<%# Eval("SubgoalText") %>' MaxLength="255" style=" overflow:auto;"  
                 onkeydown="if (this.value.length > 255) this.value = this.value.substring(0, 255);"
                 onkeyup="if (this.value.length > 255) this.value = this.value.substring(0, 255);"/>
            <asp:RequiredFieldValidator ID="tbSubGoalText_RequiredFieldValidator" runat="server" ErrorMessage="* Required" CssClass="validator" ControlToValidate="tbSubGoalText" Display="Dynamic" />
            <asp:Label ID="lblEditSubGoalStatus" runat="server" Text="Status:" AssociatedControlID="ddlSubGoalStatus" Visible="false" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:DropDownList ID="ddlSubGoalStatus" runat="server" SelectedValue='<%# Bind("StatusTypeCode") %>'>                              <asp:ListItem Value="INPROGRESS" Text="In Progress" />
            <asp:ListItem Value="MET" Text="Met" />
            <asp:ListItem Value="UNMET" Text="Un-Met" />
            </asp:DropDownList>
            <asp:LinkButton ID="btnCancelSubGoal" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:LinkButton>
            <asp:LinkButton ID="btnSaveSubGoal" runat="server"  CssClass="silverLinkButton"  CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' ><span>Save</span></asp:LinkButton>
        </div>
   </FormTemplate>


Viktor Tachev
Telerik team
 answered on 25 Mar 2015
1 answer
121 views
Hello,

I'm new to this forum, spending my last few hours searching for information/help, but with no results I decided to join and ask. Hope it's correct place, if not then please move it to more appropriate section.

I have moderate knowledge of C# and Java but was tasked with creating simple(at first glance) Chrome Extension. I wasn't familiar at all with all of quirks and small things that JS comes with, but was doing ok until I got to a point, where I have no idea what to do.

I'm using latest Chrome(41.0.2272.89.m as I'm writing this), with Windows 7 Enterprise.

The problem is that when user fills out one NumericBox and leaves focus(with TAB or clicking something else) onblur() is invoked and some other fields are updated with entered data. But I need to fill these boxes with extension that parses user provided string. And here is root of my problem.

In Chrome developer console, elements pane, when I locate element in question and look at event listeners I can see handler at blur event. Same goes for console:
var element=InputFormOnPageSampleNameForExamplePurposesOnly
element._events.blur[0].handler()  //<-this actually executes and updates what I need!

But, when I look at:
element.blur
//returns
function blur() { [native code] }
 
element.blur()
//returns
undefined

In my extension, to update them all I put element IDs in an array, then foreach it with function that I would like to call blur() handler on each of these elements, but I can't manage to do this and after around 4 hours of research I'm feeling stuck.When debugging with breakpoint inside loop I can see that current processed element has all regular properties except these written in ALL_CAPS and _events 
Is it even possible to fire this event from Chrome extension? Everything else so far works ok, but without this continuing this extension will be pointless as user will need to click each field at least once in order to update it.

And I have tried also trying to get those field select()-ed or click()-ed and even simulate keypresses, but nothing helped.
Abdiasz
Top achievements
Rank 1
 answered on 25 Mar 2015
3 answers
222 views
Hi,
I am using 2 RadListbox for item transfer with help of OnTransferring event,it is working fine in my local system and no build errors in VS2010,even working fine after publish in Local IIS server in my system,but after publish in to public IIS server it is showing below error in IE Browser:

 'Telerik' is undefined
'Telerik.Web.UI.RadListBox' is null


Please support.

Thanks and Regards,
Santhosh Naik

Aneliya Petkova
Telerik team
 answered on 25 Mar 2015
1 answer
173 views
I can insert radio button using the form button on the RadEditor tool bar. How do you put then into a group. Radio buttons are not very useful if you can select them all and they are not grouped....
Danail Vasilev
Telerik team
 answered on 25 Mar 2015
4 answers
196 views
I have a AJAX DropDownTree that has checkboxes on it.

When I use a webservice to load child nodes in the RadDropDownTree I need to be able to set Checked=true on some of the child DropDownDataNodes that I create.

When creating the nodes in the webservice code is their any way I can access the Checked property on the DropDownDataNodes as the Checked property doesn't seem to be available?


Or if I could hook into an event that fires when the webservice call ends...could I set the new child items Checked property then?

Dominic
Top achievements
Rank 1
 answered on 25 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?