Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
196 views

Hi

 

I am using  http://demos.telerik.com/aspnet-ajax/menu/examples/functionality/templates/defaultcs.aspx to generate menu

How can i use the bread crumb up to the level RadSiteMapNode. I was using following code sample  but not working 

 

using System;
using System.Collections.Generic;
using Telerik.Web.UI;
  
namespace Menu.Examples.Programming.ShowPath
{
    public partial class DefaultCS : System.Web.UI.Page
    {
        //If RadMenu is data bound, please use its DataBound event instead of PageLoad.
        protected void Page_Load(object sender, EventArgs e)
        {
            RadMenuItem currentItem = RadMenu1.FindItemByUrl(Request.Url.PathAndQuery);
            if (currentItem != null)
            {
                //Select the current item and his parents
                currentItem.HighlightPath();
                //Update the title of the
                PageTitleLiteral.Text = currentItem.Text;
                //Populate the breadcrumb
                DataBindBreadCrumbSiteMap(currentItem);
            }
            else
                RadMenu1.Items[0].HighlightPath();
                  
        }
  
        private void DataBindBreadCrumbSiteMap(RadMenuItem currentItem)
        {
            List<RadMenuItem> breadCrumbPath = new List<RadMenuItem>();
            while (currentItem != null)
            {
                breadCrumbPath.Insert(0, currentItem);
                currentItem = currentItem.Owner as RadMenuItem;
            }
            BreadCrumbSiteMap.DataSource = breadCrumbPath;
            BreadCrumbSiteMap.DataBind();
        }
    }
}

<telerik:RadMenu RenderMode="Lightweight" runat="server" ID="RadMenu1" Skin="Glow">
            <DefaultGroupSettings Height="270px" />
            <Items>
                <telerik:RadMenuItem Text="Asia">
                    <ContentTemplate>
                        <telerik:RadSiteMap runat="server" ID="RadSiteMap1" Skin="Glow" CssClass="itemContent asia">
                            <DefaultLevelSettings ListLayout-RepeatColumns="3"></DefaultLevelSettings>
                            <Nodes>
                                <telerik:RadSiteMapNode Text="Afghanistan"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Bangladesh"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Cambodia"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="China"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="India"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Indonesia"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Iran"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Iraq"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Japan"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Maldives"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Philippines"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Saudi Arabia"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Thailand"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="Yemen"></telerik:RadSiteMapNode>
                                <telerik:RadSiteMapNode Text="United Arab Emirates"></telerik:RadSiteMapNode>
  
                            </Nodes>
                        </telerik:RadSiteMap>
                    </ContentTemplate>
                </telerik:RadMenuItem>
     </Items>
</telerik:RadMenu>

Veselin Tsvetanov
Telerik team
 answered on 07 Mar 2016
5 answers
191 views
For the other controls you can click on them and a property window will popup to give them a name, but not for the text box?..How come? How do we name them?
Vessy
Telerik team
 answered on 07 Mar 2016
3 answers
113 views

Hello,

I have a RadGrid with MasterView, a child GridTableView, and then a further child GridTableView. On a Button firing in the child view I do this:

    protected void CIncludeConnection_Click(object sender, EventArgs e)
    {
        IncludeConnection_Click(sender, e);
        RebindChildren();
    }

    protected void CExcludeConnection_Click(object sender, EventArgs e)
    {
        ExcludeConnection_Click(sender, e);
        RebindChildren();
    }

 protected void RebindChildren()
    {
        GridTableView tableView = (GridTableView)ConnectionsGrid.MasterTableView.Items[0].ChildItem.NestedTableViews[0]; // accessing child gridview of first parentitem

        tableView.Rebind(); 
    }

which works fine, the grid view updates visually and no collapsing occurs.

The problem is with the Grandchild view where I do this:

    protected void GCIncludeConnection_Click(object sender, EventArgs e)
    {
        IncludeConnection_Click(sender, e);
        RebindGrandChildren();
    }

    protected void GCExcludeConnection_Click(object sender, EventArgs e)
    {
        ExcludeConnection_Click(sender, e);
        RebindGrandChildren();
    }

    protected void RebindGrandChildren()
    {
        GridTableView tableView = (GridTableView)ConnectionsGrid.MasterTableView.Items[0].ChildItem.NestedTableViews[0]; // accessing child gridview of first parentitem

        GridTableView nestedView = (GridTableView)tableView.Items[0].ChildItem.NestedTableViews[0]; // Accessing grandchild gridview

        nestedView.Rebind();
    }

Which works correctly but does not update visually at all.

Is there a generic method of addressing any grid at any depth and Rebinding without collapsing (a generic Masterview rebind collapses) from a button event given the sender object and the EventArgs?

protected void AnyConnectionOperation_Click(object sender, EventArgs e) ?

Thanks,

 

 

 

 

Viktor Tachev
Telerik team
 answered on 07 Mar 2016
3 answers
696 views
I keep reading that the RadMenu is responsive, etc. I have added it to our page and when I resize the page the menu does not change. Does it only change if you are actually on a mobile device? Is there a way to have it change in the 'small' version like things do when you are using the RadPaygLayout control?
Magdalena
Telerik team
 answered on 07 Mar 2016
1 answer
81 views

Hi team,

 

We have upgraded telerik from 2014.2.618.45 to 2015.3.1111.45

 

Tree View was showing the node highlighted in grey color previously but now it is not showing.

Attached is the screenshot for the same. Waiting for your response.

 

Thanks in advance

Magdalena
Telerik team
 answered on 07 Mar 2016
16 answers
2.1K+ views
How do I access the underlying datarow to which a GridDataItem is bound to in the ItemDataBound event?

I cannot use cell content because I am trying to get at a field in the datarow for which there is no column in the radgrid.

Thanks,
Kermit
Eyup
Telerik team
 answered on 07 Mar 2016
1 answer
67 views
I want a radwindow to open when the radgauge marker is done moving.  The idea is that if a certain number is reached, it opens a radwindow.  The only way I have been able to achieve this is the window opens as soon as the gauge starts moving, thus covering up the gauge.
Danail Vasilev
Telerik team
 answered on 07 Mar 2016
23 answers
418 views

Hi,

I have NestedTemplate radgrid in my application. I want  how to access the RadNumericTextBox inside Nestedtemplate (RadGrid3)  client side.

 <telerik:RadGrid ID="RadGrid1"  runate="server" ... >
            <MasterTableView>
                   <NestedViewTemplate>
                       <telerik:RadGrid ID="RadGrid2" runat="server" ... >
                        <MasterTableView >
                                <NestedViewTemplate>

                                     <telerik:RadGrid ID="RadGrid3" runat="server"  .. >

                                            <MasterTableView ... >

                                                      <Columns>

                                                                     <telerik:GridTemplateColumn HeaderText="cmd" UniqueName="_order">
                                                                             <ItemTemplate>
                                                                                            <telerik:RadNumericTextBox ID="_order_txt" runat="server" >
                                                                                            </telerik:RadNumericTextBox>
                                                                              </ItemTemplate>
                                                                              <FooterTemplate>
                                                                                      <telerik:RadNumericTextBox ID="_order_sum_txt" runat="server">
                                                                                      </telerik:RadNumericTextBox>
                                                                               </FooterTemplate>
                                                                      </telerik:GridTemplateColumn>

Regrads

 

Viktor Tachev
Telerik team
 answered on 07 Mar 2016
1 answer
165 views

Hi,

I have Rad Grid with batch updates. Edit template column has a custom user control with multiple buttons used to check if the user entered exists within Active directory and a cancel. These buttons cause a post back and causing the grid to reload. Is there a way to persist the edit mode of the grid ??

Please help

Thanks

Konstantin Dikov
Telerik team
 answered on 07 Mar 2016
4 answers
267 views
I have a radgrid that is databound using an object data source.
The grid has a GridTemplateColumn with an asp:ImageButton in it. This button has a click-event that does some business logic and then is supposed to open a new window with some calculated result.

I've tried Page.ClientScript, RadScriptManager.RegisterStartupScript, and RadScriptManager.GetCurrent(this.Page).RegisterDataItem.
I even tried to create a new RadWindow via code-behind, but nothing happens.

public void editLink_Click(object sender, EventArgs e)
{
  string script = "alert('hello');";
 
  //This does not work
  RadScriptManager.RegisterStartupScript(this, GetType(), "test", script, true);
 
  //This does not work
  RadScriptManager.GetCurrent(this.Page).RegisterDataItem(this, "javascript:" + script);
                
  //This does not work
  RadWindow newWindow = new RadWindow();
  newWindow.NavigateUrl = "http://www.telerik.com";
  newWindow.VisibleOnPageLoad = true;
  ((AlarmLogMaster)this.Page.Master).WindowManager.Windows.Add(newWindow);              
}

The master-page exposes the RadWindowsManager via the WindowManager property. The code is run since I can set a break-point in the click event.
Eyup
Telerik team
 answered on 07 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?