Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
133 views
I have a Tree View that controls a Left Navigation which is bound to a database. My database table has the following columns...

NodeID
NodeTxt
NodeURL
NodeVal
NodeParentID
NodeOrder

I added the NodeOrder column because I'm trying to figure how to allow drag/drop reordering of nodes and save the position of the nodes server-side in the database. I've looked at the example in the demos and it shows how to achieve this client side...event though I don't believe the positions are actually stored to a database or anything.

Do you have any examples of how this can be implemented server side so that the ordering of the nodes can be set and retrieved from a database when dragging and dropping child nodes?

Thanks =)
Philip Senechal
Top achievements
Rank 1
 answered on 05 Oct 2010
2 answers
238 views
I'm trying to build an alert into my master page that can be accessed from anywhere in the UI code-behind. Any method, any function.

I was doing quite well (I think) but I'm stuck now.

Master page

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Default.Master.cs" Inherits="Web.App_Templates.Default.Default" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head id="Head" runat="server">
    <title><%= Page.Title %></title>
</head>
<body>
  
    <form id="MainForm" runat="server">
  
        <telerik:RadScriptManager 
            ID="ScriptManager" 
            runat="server">
        </telerik:RadScriptManager>
          
        <telerik:RadAjaxManager 
            ID="TelerikAjaxManager" 
            runat="server">
        </telerik:RadAjaxManager>
          
        <telerik:RadWindowManager 
            ID="TelerikWindowManager" 
            runat="server">
            <Windows>
                <telerik:RadWindow 
                    ID="TelerikWindow" 
                    runat="server">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
  
        <asp:UpdatePanel 
            ID="UpdatePanel" 
            runat="server">
            <ContentTemplate>
                
                <asp:Literal 
                    ID="Feedback" 
                    runat="server" 
                    Text=" " />
  
                <asp:ContentPlaceHolder 
                    ID="MainContentPlaceHolder" 
                    runat="server">
                </asp:ContentPlaceHolder>
                      
            </ContentTemplate>
        </asp:UpdatePanel>
  
    </form>
  
</body>
</html>

Master page code behind

namespace Web.App_Templates.Default
{
    using System;
  
    public partial class Default : System.Web.UI.MasterPage
    {
        public void ShowFeedback(string feedBackText, bool useAlert)
        {
            if (useAlert)
            {
                string radalertscript = string.Format("<script language='javascript'>function f(){{radalert('{0}', 330, 210);Sys.Application.remove_load(f);}};Sys.Application.add_load(f);</script>", feedBackText);
                  
                Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert", radalertscript); 
            }
            else
            {
                this.Feedback.Text = feedBackText;                
            }
        }
    }
}

Web content page

<%@ Page Title="Welcome" Language="C#" MasterPageFile="~/App_Templates/Default/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Web.Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ MasterType VirtualPath="~/App_Templates/Default/Default.Master" %>
  
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
  
    <asp:Button 
        ID="TestFeedbackAlert" 
        runat="server" 
        Text="Click Me" 
        OnClick="TestFeedbackAlert_Click" 
        Width="100" />
     
    <asp:Button 
        ID="TestFeedbackNoAlert" 
        runat="server" 
        Text="Click Me" 
        OnClick="TestFeedbackNoAlert_Click" 
        Width="100" />
  
</asp:Content>

And the code behind

namespace Web
{
    using System;
    using System.Web.UI;
  
    public partial class Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //this.Master.ShowFeedback("<p>Hello, AppWorld!</p>", true);
            }
        }
  
        protected void TestFeedbackAlert_Click(object sender, EventArgs e)
        {
            this.Master.ShowFeedback("<p>Clicked!</p>", true);
        }
  
        protected void TestFeedbackNoAlert_Click(object sender, EventArgs e)
        {
            this.Master.ShowFeedback("<p>Clicked!</p>", false);
        }
    }
}

The alert will show if you uncomment out the entry in the page load.  It will also work if you click the TestFeedbackNoAlert button.

It will not work if you click the TestFeedbackAlert button.

I've looked at the suggestions at:
http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind.aspx

But I'm none the wiser. Can anyone help? I need it to work no matter where it gets called (page load, postback, ajax call, etc.)

Regards,
Richard



Richard Weeks
Top achievements
Rank 2
 answered on 05 Oct 2010
2 answers
111 views
I have a scenario I'd like to know if you can help me with...

I want to populate a TreeView using a Linq data source. This is because there is going to be another page that graphically allows admins to add/edit/delete/re-order nodes. When the admins work with this page, they will obviously be able to see all the nodes.

Now on the actual page that the TreeView is going to be available to the general public, I want to be able to programatically limit which nodes are visible to the user based on active directory groups. Is there a way to turn nodes visible/hidden after the dataset has been returned from the Linq query? How would I accomplish this?

Thanks for the assistance!
Philip Senechal
Top achievements
Rank 1
 answered on 04 Oct 2010
2 answers
123 views
Hi all!

I find two links 

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx

http://www.telerik.com/support/kb/aspnet-ajax/grid/google-suggest-style-filtering-in-radgrid.aspx
(sorry! The Hyperlink Manager's problem so I pasted as the text)

They show the way to use the Radcombobox as the filter of RadGrid, the same way with "Google suggest" now
It's one of the best wonderful support from RadCombobox, a good helpful tool for filtering.
But it's so slow when the RadCombobox has lots of data such as 4,000. Is there any ways to improve this one?

Thanks!

Andy.
Andy
Top achievements
Rank 1
 answered on 04 Oct 2010
2 answers
106 views

Hi,

I am using MOSS Radeditor on one of my SharePoint 2010 site. The issue is when I am accessing the SharePoint site remotely to open the image editor dialog form through image manager than the system gives me following error

"Web application at http://SiteIp could not be found"

However when I open the site locally (i.e. through the http://localhost ) then image editor dialog form is opening correctly without giving any error message.

Please see the attached screen shots for details.

Can anybody help me that how to fix this issue.


Thanks

Martin IDS
Top achievements
Rank 1
 answered on 04 Oct 2010
4 answers
107 views
I am setting up a radgrid to export the grid to excel via a button click. It is processing the request. Hiding the columns I don't want to be exported and updating the grid with a new view. It does not have a give me the option to save a file.

  <telerik:RadGrid ID="DisplayDataGrid" runat="server" AutoGenerateColumns="False"
        AllowSorting="True" AllowPaging="True" PageSize="6" OnNeedDataSource="Grid_NeedDataSource"
        OnItemCreated="Grid_ItemCreated" Width="100%" GridLines="None" Skin="Hay" ShowStatusBar="true"
        ItemStyle-Font-Size="7pt" AlternatingItemStyle-Font-Size="7pt">
        <ClientSettings EnableRowHoverStyle="true">
            <Scrolling AllowScroll="True" ScrollHeight="230px" UseStaticHeaders="True" />
        </ClientSettings>
        <ExportSettings IgnorePaging="true" OpenInNewWindow="true" FileName="SeismicPetroWeb2D"
            ExportOnlyData="true" Excel-Format="ExcelML" Excel-FileExtension="xls"  />
   <MasterTableView>
                            <Columns>
 <telerik:GridHyperLinkColumn DataTextField="SURVEY" HeaderText="Survey" SortExpression="SURVEY"
                                    UniqueName="SURVEY">
                                    <HeaderStyle Width="85px" />
                                    <ItemStyle Font-Underline="False" ForeColor="Black" Wrap="False" Width="85px" />
                                </telerik:GridHyperLinkColumn>
...
...
    </telerik:GridHyperLinkColumn>
                            </Columns>
                            <PagerStyle AlwaysVisible="True" />
                        </MasterTableView>
    </telerik:RadGrid>


and the button click event:
 Protected Sub ButtonExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonExcel.Click
        DisplayDataGrid.MasterTableView.Columns(0).Visible = False
        DisplayDataGrid.MasterTableView.Columns(1).Visible = False
     
        DisplayDataGrid.MasterTableView.ExportToExcel()
    End Sub

Thoughts?

Thanks!
William
Top achievements
Rank 1
 answered on 04 Oct 2010
6 answers
194 views
In our web app, we are setting CurrentFilterFunction values for each column that will be able to be filtered.

However, once one column has some criteria entered in and the user presses <Enter>, that column's filter is properly applied but every remaining column now has a CurrentFilterFunction of "NoFilter"...even after the original criteria is blanked out, essentially setting the grid back to its original state.

Is this something that can be done via the markup/client-side only or are we going to have to set CurrentFilterFunction for each column after every postback?

Or, is there some other method for setting filtering options that persist after postbacks for a page?  In our case, we want only one filtering option to be available for each column and no filter icon to be shown.

Thanks.

Jerry
Jerry T.
Top achievements
Rank 1
 answered on 04 Oct 2010
1 answer
194 views

I had a similiar question but I didnt see an answer so...

I am updating a Org item... but I need to updated the 'updatedby' and 'updateddate' which I must do programmatically since it is not part of the radgrid... How do I do this ?

Here is how I am trying to do it but the break point is not being hit.. is this the right way to get my custom update?  I suppose I COULD create a seperate stored procedure.. but it would be nice if I could keep it in the entities world.

<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=G3TEntities"
          DefaultContainerName="G3TEntities" EnableFlattening="False" EnableInsert="True"
          EntitySetName="Orgs" EnableUpdate="True" OnUpdated="EntityDataSource1_Updated">
      </asp:EntityDataSource>
   protected void EntityDataSource1_Updated(object sender, EntityDataSourceChangedEventArgs e)
      {
          Org oOrg = new Org();
          oOrg = (Org)e.Entity;
          oOrg.updateby = 69;
      }
matt
Top achievements
Rank 1
 answered on 04 Oct 2010
1 answer
165 views

Hi Team

 

I have two Telerik RadComboBox at the bottom of the page. On selection change of first RadComboBox ,2nd RadComboBox will populate, In this case binding is working fine but Page does not maintain scroll position at the bottom of the page, It goes on the top of the page.

 

I have written MaintainScrollPositionOnPostback="true" but it is not working.

Please help me ,It’s very urgent.

 

My Code blocks is

  <telerik:RadComboBox ID="drpRequestType" Width="185px" runat="server" AutoPostBack="True"

                                    OnSelectedIndexChanged="drpRequestType_SelectedIndexChanged" EnableScreenBoundaryDetection="true" >

                                </telerik:RadComboBox>

  <telerik:RadComboBox Width="185px" ID="drpSubRequestType" runat="server">

                                </telerik:RadComboBox>

 

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

                        <AjaxSettings>

                        

                            <telerik:AjaxSetting AjaxControlID="drpRequestType">

                                <UpdatedControls>

                                    <telerik:AjaxUpdatedControl ControlID="drpSubRequestType"  />

                                </UpdatedControls>

                            </telerik:AjaxSetting>

                          

                        </AjaxSettings>

                    </telerik:RadAjaxManager>

Simon
Telerik team
 answered on 04 Oct 2010
1 answer
50 views

With this set up, the border on the bottom / last menu item is a double line border while the others are as designed in the CSS below.  How do I make the last item like the others?

<

 

telerik:RadMenu ID="USSRadMenu" runat="server" DataSourceID="USSsmd" EnableEmbeddedSkins="false" Skin="">

 

 

</telerik:RadMenu>

 

 

div.RadMenu .rmGroup .rmLink

 

{

 

color: #000;

 

 

border:1px solid #DEDFDF;

 

 

padding: 2px 0 2px 0;

 

}

TIA

Yana
Telerik team
 answered on 04 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?