Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
133 views
Hello
I am creating a number of RadTreeView controls at run time:
RadTreeView MyTree = new RadTreeView();

I am struggling to see how to assign the OnNodeExpand event to a code behind event.
With a static declaration this was :
<telerik:RadTreeView  OnNodeExpand="RadPopulateNode">

But I can't see a property at runtime that matches OnNodeExpand.

Please could anyone help me with the answer.

Thankyou
Plamen
Telerik team
 answered on 12 Jan 2012
5 answers
94 views
hi can i Drag and Drop from RadGrid to RadTreeView
if can give me simple example
Bozhidar
Telerik team
 answered on 12 Jan 2012
1 answer
103 views
Hi,
I have a RadTreeView in MasterPage. After login, Landing page will inherit the master page containing the RadTreeView and the RadTreeView is loaded correctly.
Then i will expand the RadTreeView and click on one of the node which will navigate to other page which inherits the same masterpage which contains the RadtreeView. But the problem is entire page is getting resfreshed and RadtreeView will be collapsed as it was when first time.. i want to avoid this.. Can anyone help ?

Any solution for this ?

Regards,
Akki
Plamen
Telerik team
 answered on 12 Jan 2012
1 answer
87 views
Hi,

I am using radscheduler. date binding in page load. start date working fine. but appointment panel not continued to end date. here i attached my code.

i have attached image file also. please check and let me know.

  <telerik:RadScheduler ID="RadScheduler1" runat="server" DataKeyField="ID" DataSubjectField="Subject"
    DataStartField="StartDate" DataEndField="EndDate" SelectedView="MonthView"        
            Reminders-Enabled="true"  RowHeight="30px"
            AppointmentStyleMode="Default">

  </telerik:RadScheduler>

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      
        If Not IsPostBack Then
            Dim lst As New List(Of MyScedule)()
            Dim obj As New MyScedule()
            obj.ID = 1
            obj.Subject = "my Subject"
            obj.StartDate = Convert.ToDateTime("01-11-2012")
            obj.EndDate = Convert.ToDateTime("01-12-2012")
            lst.Add(obj)          

            RadScheduler1.DataSource = lst

            RadScheduler1.DataBind()
        End If

    End Sub

class file
------------
Public Class MyScedule

    Public Property ID() As Integer
        Get
            Return m_ID
        End Get
        Set(ByVal value As Integer)
            m_ID = value
        End Set
    End Property
    Private m_ID As Integer
    Public Property Subject() As String
        Get
            Return m_Subject
        End Get
        Set(ByVal value As String)
            m_Subject = Value
        End Set
    End Property
    Private m_Subject As String
    Public Property StartDate() As DateTime
        Get
            Return m_StartDate
        End Get
        Set(ByVal value As DateTime)
            m_StartDate = Value
        End Set
    End Property
    Private m_StartDate As DateTime
    Public Property EndDate() As DateTime
        Get
            Return m_EndDate
        End Get
        Set(ByVal value As DateTime)
            m_EndDate = Value
        End Set
    End Property
    Private m_EndDate As DateTime
End Class
Plamen
Telerik team
 answered on 12 Jan 2012
1 answer
78 views
Hi,

I have a problem with Hyperlink Manager in the RadEditor.
Consider looking at the following HTML snippet:
<a href="#test" shape="rect">test1<br /></a>
<a href="#test2" shape="rect">test2</a>

If you open properties of the second link (test2), make some changes and press OK, then Hyperlink Manager removes previous link (i.e. test1), and you receive the following HTML markup:
test1<br />
<a href="#test2" shape="rect" target="_blank">test2</a>

This problem is reproducible only in Microsoft Internet Explorer 8 and 9 in Compatibility Mode. Google Chrome and Mozilla Firefox work just fine.
We are using Telerik.Web.UI version 2010.2.826.35.

Could you please propose a workaround for this issue?

Thank you in advance,
Yuriy Bogomolov

Rumen
Telerik team
 answered on 12 Jan 2012
12 answers
174 views
In the menu below, the Support Menu is double-column. When the vertical height of the screen is 
reduced (not necessarily even reduced so far as to prevent the whole menu showing), the items in the 
double-column menu disappear. They do not just disappear visually--nothing happens when you click where 
they should be, either. Even if you make the screen bigger again, they do not reappear.

We are using the Q3 .NET 4 DLLs. We are in IE8, but I verified this also occurs in a current Chrome.

Any fix?

----------------------------------------------------------------

<%@ Page Language="C#" AutoEventWireup="false" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <style type="text/css">
        .ItemWithWrap
        {
            white-space: normal;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
    <telerik:RadMenu ID="OasisMenu" runat="server" Flow="Horizontal" Skin="Office2010Silver"
        Width="100%" EnableAutoScroll="True">
        <Items>
            <telerik:RadMenuItem Text="Home" ToolTip="Home" Value="" NavigateUrl="" />
            <telerik:RadMenuItem Text="Overseas Posts" ToolTip="Overseas Posts" NavigateUrl="" />
            <telerik:RadMenuItem Text="Personnel" ToolTip="Personnel" Value="" NavigateUrl="">
                <Items>
                </Items>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Support Tables" ToolTip="Support Tables" Value="" NavigateUrl="">
                <GroupSettings RepeatColumns="2" RepeatDirection="Vertical" Width="210" />
                <Items>
                    <telerik:RadMenuItem Text="Address Type" ToolTip="Address Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Agency" ToolTip="Agency" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Approvers List" ToolTip="Approvers List" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Authorization Status" ToolTip="Authorization Status" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Budget Category" ToolTip="Budget Category" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Building Type" ToolTip="Building Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Contract Type" ToolTip="Contract Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Country" ToolTip="Country" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Funding Source Type" ToolTip="Funding Source Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Location Type" ToolTip="Location Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Object Class" ToolTip="Object Class" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Ownership Type" ToolTip="Ownership Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Personal Travel Type" ToolTip="Personal Travel Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Post Communication Type" ToolTip="Post Communication Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Post Office Standards" ToolTip="Post Office Standards" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Post Type" ToolTip="Post Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Region" ToolTip="Region" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Relationship Type" ToolTip="Relationship Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Residence Assign Type" ToolTip="Residence Assign Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Residence Feature Type" ToolTip="Residence Feature Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Room Type" ToolTip="Room Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Shipping Vendor" ToolTip="Shipping Vendor" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Storage Vendor" ToolTip="Storage Vendor" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Title Type" ToolTip="Title Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Acquisition Location" ToolTip="Vehicle Acquisition Location" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Color Type" ToolTip="Vehicle Color Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Condition" ToolTip="Vehicle Condition" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Disposal Method" ToolTip="Vehicle Disposal Method" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Fuel Type" ToolTip="Vehicle Fuel Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Make Type" ToolTip="Vehicle Make Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Model Type" ToolTip="Vehicle Model Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle Style Type" ToolTip="Vehicle Style Type" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Web Keyword" ToolTip="Web Keyword" NavigateUrl="" />
                    <telerik:RadMenuItem IsSeparator="true" />
                    <telerik:RadMenuItem Text="Vehicle Size, Composition, and Annual Cost" ToolTip="Vehicle Size, Composition, and Annual Cost" NavigateUrl=""
                        CssClass="ItemWithWrap" />
                </Items>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Reports" ToolTip="Reports" Value="" NavigateUrl="">
                <GroupSettings Width="280" />
                <Items>
                    <telerik:RadMenuItem Text="Home-Cell Phone Contact List" ToolTip="Home-Cell Phone Contact List" NavigateUrl="" />
                    <telerik:RadMenuItem Text="FAS Available Pool" ToolTip="FAS Available Pool" NavigateUrl="" />
                    <telerik:RadMenuItem Text="FAS – Employee Promotion" ToolTip="FAS – Employee Promotion" NavigateUrl="" />
                    <telerik:RadMenuItem Text="FAS – Foreign Service Report" ToolTip="FAS – Foreign Service Report" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Projected Vacancies" ToolTip="Projected Vacancies" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle/Fleet Master" ToolTip="Vehicle/Fleet Master" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Vehicle/Size, Composition and Annual Cost" ToolTip="Vehicle/Size, Composition and Annual Cost" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Financial Plan Post Summary" ToolTip="Financial Plan Post Summary" NavigateUrl="" />
                    <telerik:RadMenuItem Text="OASIS Summary" ToolTip="OASIS Summary" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Overseas Assignments" ToolTip="Overseas Assignments" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Download Data for CRM" ToolTip="Download Data for CRM" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Overseas Staffing Roster" ToolTip="Overseas Staffing Roster" NavigateUrl="" />
                    <telerik:RadMenuItem Text="FTSS Communications" ToolTip="FTSS Communications" NavigateUrl="" />
                </Items>
            </telerik:RadMenuItem>
 
            <telerik:RadMenuItem Text="Help" ToolTip="Help" Value="" NavigateUrl="">
                <Items>
                    <telerik:RadMenuItem Text="About"
                        ToolTip="About" Value="" NavigateUrl="" />
                    <telerik:RadMenuItem Text="Samples" ToolTip="Samples">
                        <Items>
                            <telerik:RadMenuItem Text="Dropdowns Sample"
                                ToolTip="Dropdowns Sample" Value="" NavigateUrl="" />
                            <telerik:RadMenuItem Text="Data Access Sample"
                                ToolTip="Data Access Sample" Value="" NavigateUrl="" />
                            <telerik:RadMenuItem Text="JQuery Sample"
                                ToolTip="JQuery Sample" Value="" NavigateUrl="" />
                        </Items>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Tests" ToolTip="Tests">
                        <Items>
                            <telerik:RadMenuItem Text="Test Report - Posts"
                                ToolTip="Test Report - Posts" NavigateUrl="" />
                            <telerik:RadMenuItem Text="Test RadGrid"
                                ToolTip="Test RadGrid" NavigateUrl="" />
                        </Items>
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
    </div>
    </form>
</body>
</html>
Velma
Top achievements
Rank 1
 answered on 12 Jan 2012
2 answers
845 views

I currently have a page that dynamically loads a user control when a button click is executed.  The user control is placed on the page and loaded within a radajaxpanel.  I need to run a javascript function at the completion of the user control being loaded that accesses controls within that user control.  I have tried a few different ways to get this to happen, but I am unable to get it to work.

What does work is when I remove the radajaxpanel and then at the bottom of the ascx page I include the javascript function that I want to run followed by window.onload = functionToRun, but then I get the page reload etc. 

I have tried to register the script at prerender, and also tried the following in the Page_PreRender of the user control to run the desired function:

 

System.Web.UI.

 

Page page = (System.Web.UI.Page)this.Page;

 

 

 

MasterPage mp1 = (MasterPage)page.Master;

 

 

 

RadAjaxManager ajm = mp1.FindControl("RadAjaxManager1") as RadAjaxManager;

 

 

 

string script = String.Format("functionToRun();");

 

ajm.ResponseScripts.Add(script);

It finds the objects it needs within the codebehind, but then cannot find the functionToRun when it is time to run the client side function.

Is there a post or article that describes the best way to run a client side function once a dynamically loaded user control has finished loading within a RadAjaxPanel?

Thank you,

Aaron

Antonio Stoilkov
Telerik team
 answered on 12 Jan 2012
1 answer
189 views

Hi,

I'm getting the "A generic error occurred in GDI+" error message while using the following code:

using (System.Drawing.Image originalImage = System.Drawing.Image.FromStream(upload.UploadedFiles[0].InputStream))
{
//Create empty bitmap image of original size
Bitmap tempBmp = new Bitmap(originalImage.Width, originalImage.Height);
Graphics g = Graphics.FromImage(tempBmp);
//draw the original image on tempBmp
g.DrawImage(originalImage, 0, 0, originalImage.Width, originalImage.Height);
//dispose originalImage and Graphics so the file is now free
g.Dispose();
originalImage.Dispose();
Response.ContentType = "image/jpeg";
//Save the image file to original location
tempBmp.Save(Server.MapPath("~Products/General/Imgs/Menus/" + parentSysName + "/" + productID.ToString() + "_" + upload.UploadedFiles[0].FileName), System.Drawing.Imaging.ImageFormat.Jpeg);
}

Can you please help me how to solve this problem?
By the way, I looked on the internet, but I didn't found anything.

Regards,
Bader

Bader
Top achievements
Rank 1
 answered on 12 Jan 2012
7 answers
322 views
I have a large dataset that I am filling a combobox with via web service.  The dropdown and service work, but when I select an item from the dropdown I get "The server method MyMethod failed ", then the page processes and completes the request just like it should. Does anyone have any suggestions on how to stop the error box from popping up? or stop it from erroring at all. Any help would be great.
Thanks

    [WebMethod]
    public RadComboBoxData GetAltIdId(RadComboBoxContext context)
    {
        string sql = "SELECT  ALTID, ID FROM PEOPLE WHERE ID LIKE @text + '%'";
 
        SqlDataAdapter adapter = new SqlDataAdapter(sql,
            ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
        DataTable data = new DataTable();
 
        adapter.SelectCommand.Parameters.AddWithValue("@text", context.Text);
        adapter.Fill(data);
 
        List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(context.NumberOfItems);
        RadComboBoxData comboData = new RadComboBoxData();
        try
        {
 
            int itemsPerRequest = 10;
            int itemOffset = context.NumberOfItems;
            int endOffset = itemOffset + itemsPerRequest;
            if (endOffset > data.Rows.Count)
            {
                endOffset = data.Rows.Count;
            }
            if (endOffset == data.Rows.Count)
            {
                comboData.EndOfItems = true;
            }
            else
            {
                comboData.EndOfItems = false;
            }
            result = new List<RadComboBoxItemData>(endOffset - itemOffset);
            for (int i = itemOffset; i < endOffset; i++)
            {
                RadComboBoxItemData itemData = new RadComboBoxItemData();
                itemData.Text = data.Rows[i]["ID"].ToString();
                itemData.Value = data.Rows[i]["ALTID"].ToString();
 
                result.Add(itemData);
            }
 
            if (data.Rows.Count > 0)
            {
                comboData.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), data.Rows.Count.ToString());
            }
            else
            {
                comboData.Message = "No matches";
            }
        }
        catch (Exception e)
        {
            //comboData.Message = e.Message;
        }
 
        comboData.Items = result.ToArray();
        return comboData;
    }}
-----------------------------------------------
<script type="text/javascript">
    function OnClientItemsRequesting(sender, eventArgs) {
        var context = eventArgs.get_context();
        context["FilterString"] = eventArgs.get_text();
    }
 
</script>
<telerik:RadComboBox runat="server" ID="RadComboBox1" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"
    OnClientItemsRequesting="OnClientItemsRequesting" EnableLoadOnDemand="true" ItemsPerRequest="10"
    ShowMoreResultsBox="True" EnableVirtualScrolling="True" Filter="Contains" EmptyMessage="Enter A#"
    AppendDataBoundItems="true" AutoPostBack="true">
    <WebServiceSettings Method="GetAltIdId" Path="../PeopleSearch.asmx" />
</telerik:RadComboBox>
--------------------------------
    protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        string url = Path.GetFileName(Request.Path);
        url += "?HNUMBER=" + RadComboBox1.SelectedValue.ToString();
        Response.Redirect(url);
    }

Helen
Telerik team
 answered on 12 Jan 2012
3 answers
95 views
We are using Google like Filtering for the columns in a grid. The Filtering works fine for all the columns except for two columns which are displaying dates. The Format for the column in the Grid as well as the format for the date in the RadCombo(used for type ahead) is

"{0:dd-MMM-yyyy}".
Please suggest a solution.We are using a class file for this which is like your Demo File (CustomFilteringColumn.cs)

Tsvetina
Telerik team
 answered on 12 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?