Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
        public ICollection<Employe> Data
        {
            set
            {
                this.RadTreeView.DataSource = value;
                this.RadTreeView.DataBind();
                this.RadTreeView.ExpandAllNodes();
}
}

Tree view nodes are not expanded. Is there another way to do this?
Plamen
Telerik team
 answered on 25 Jun 2012
1 answer
72 views
I just started testing a web app in preparation for moving to IE 9 and found that the track changes dialog in the editor does not work. A blank screen comes up. It works fine in compatability mode. Has anyone seen this yet?
Rumen
Telerik team
 answered on 25 Jun 2012
7 answers
579 views
On the server-side, I would like to save any changes made in the ImageEditor.  How can this be done?  I've messed with SaveEditableImage but am unable to get it to save correctly.  I have a button on the page:

<div class="BadgePopup">
    <telerik:RadUpload runat="server" ID="_upload" FocusOnLoad="True"
        MaxFileInputsCount="1" ControlObjectsVisibility="None" Skin="Forest"
        TargetFolder="~/BadgePhotos" Width="240px"></telerik:RadUpload>
    <telerik:RadButton runat="server" ID="_submit" Text="Upload" onclick="_submit_Click" Skin="Forest"></telerik:RadButton>     
    <telerik:RadButton ID="_finished" runat="server" Text="Save" onclick="_photo_Finished" Skin="Forest" /><br /><br />
 
    <telerik:RadImageEditor ID="_image" runat="server" Skin="Forest" Width="400px" Height="213px"
        AllowedSavingLocation="Server" ToolsFile="~/BadgePhotos/Dialogs.xml" >
    </telerik:RadImageEditor>
</div>

And then the codebehind:
protected void _photo_Finished(object sender, EventArgs e)
{
    using (DAL.KeeleyBarcodeDataContext dal = new DAL.KeeleyBarcodeDataContext())
    {
        DAL.Employee emp = (from n in dal.Employees where n.EmployeeID == new Guid(EmployeeID) select n).First();
        emp.PicturePath = Path.GetFileName(_image.ImageUrl);
 
        _image.SaveEditableImage(emp.PicturePath, true);
        dal.SaveChanges();
    }
}

If I do a simple resize of the image and click "Save" (my save, not the save on the toolbar), the SaveEditableImage code runs without an exception, yet the image is not saved with the new resized dimensions.  I am implementing this Save method because my users don't like to click on the Save on the toolbar and then yet another Save so I can update the DB.









Dobromir
Telerik team
 answered on 25 Jun 2012
1 answer
131 views
Hello,

I am looking for a sample code where in radtreeview, under each radtreenode there will be a radgrid depending on the grouping.
I created a radtreeview where I am adding the radtreenodes dynamically and then creating nodetemplate dynamically where I am creating a radgrid control. I have a editcommandcolumn as one of the column on the radgrid. The problem I am facing is binding the radgrid datasource in needdatasouce event. So if I have 3 nodes and under that 3 radgrids then needdatasource is firing 3 times attaching the last datasource results to all the 3 radgrids. Please provide me a sample code where needdatasource is handled for hierarchy of radgrids.

Thanks
Swarup
Top achievements
Rank 1
 answered on 25 Jun 2012
1 answer
53 views
I  selected a recurring appointment and chosen option edit this occurence(single occurence) and saved the detail,  it is throwing following error. 

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Web.UI
  StackTrace:
       at Telerik.Web.UI.Scheduling.AppointmentController.AttachRecurrenceException(Appointment parent, Appointment exceptionAppointment, DateTime explicitExceptionDate, ISchedulerInfo schedulerInfo)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateException(Appointment modifiedAppointment, Appointment originalAppointment, ISchedulerInfo schedulerInfo)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment)
       at Telerik.Web.UI.WebServiceAppointmentController.CreateRecurrenceException[T](ISchedulerInfo schedulerInfo, T recurrenceExceptionData)
       at Telerik.Web.UI.WebServiceAppointmentController.CreateRecurrenceException(ISchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData)
       at CalendarTest.SchedulerWebService.CreateRecurrenceException(MySchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData) in D:\dotnet Practice\CalendarTest\SchedulerWebService.asmx.cs:line 77
  InnerException: 

Not sure what is causing problem. The line number 77 is referring to following code:

return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData);



Plamen
Telerik team
 answered on 25 Jun 2012
1 answer
225 views

I am not sure of the best way to describe my question, as the title doesn't even make sense to me!

What I am doing is calling a WCF Service and I get an Object back, within this object are a selection of elements and some arrays.

So the object would be something like...(I would be passed the Person)

    public class Person
   
{
       
string firstName;
       
string lastName;
       
Address[] addressDetails;
   
}
   
public class Address
   
{
       
string address1;
       
string address2;
       
string postcode;
   
}

So then on my page, I would like to display not only firstName and lastName. But the details of the address. If you can imagine this page to be a profile view. So all the fields in a list and the ability to edit them.

Currently I can access any element that is "top level" i.e. not within an array. I do that on the ascx page using the following code within a Telerik RadListView...

<tr>
 
<td>
 
<asp:Label ID="firstNameLabel" runat="server"
   
AssociatedControlID="firstNameTextBox" Text="firstName"></asp:Label>
 
</td>
 
<td>
   
<asp:TextBox ID="firstNameTextBox" runat="server" CssClass="rlvInput"
   
Text='<%# Bind("firstName") %>' />
 
</td>
</tr>

So I guess what I am asking is; how do I display 'address1' on the page.

Hope somebody can help me out! Thanks

Tsvetina
Telerik team
 answered on 25 Jun 2012
1 answer
116 views

I am using radtree having around 1000 nodes with different hierarchy.

I have added this tree under rad splitter and set pan height according to contain.

There is only 1 root node under root node all the nodes are getting added.

I have referred  http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/contextmenu/defaultcs.aspx

demo to add context menu for adding nodes in the tree.

Whenever I add the node in between of the tree nodes focus of the screen redirected to newly created node.

But when I am adding node in root node the focus is not going at the end of the screen on newly created node.

So to name it I have to scroll down to that node & have to rename it.

Can you please let me know why it is behaving this way?

Is there any fix for it?
Thanks in advance

Plamen
Telerik team
 answered on 25 Jun 2012
2 answers
183 views
What I'm trying to do is perhaps pretty simple:

  • Allow the user to select several configuration options from a drop down list.
  • Each configuration option has a user control associated with it and when the user selects the option, the User Control with the configuration details must display allowing the user to capture some info.
  • The user can select any number of configuration options, and this in itself might result in a very loooong form as more configuration choices are selected.

I'm hoping RadPanelBar can help prevent the form growing too long by allowing collapseing behaviour in the configuration section for me.

I keep track of the choices which the user has selected (in a hidden form variable) , and with each choice, the specific user control which must be loaded. The problem I'm currently facing is that the RadPanelBar only displays the very last item on PostBack, losing the controls from all previous choices. I reload the controls in the Page_Init event.
Private Property MyUsedControls As Dictionary(Of Long, MyUsedControl)
 
Private Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
 
    MyUsedControls = MyUsedControl.DeserializeReportList(Request.Form(HiddenField1.UniqueID))
 
    'Recreate the controls. At this stage, the RadPanelBar1.Items collection is empty
    For i As Integer = 0 To MyUsedControls.Count - 1
 
        Dim ctrl As MyUsedControl = MyUsedControls(i)
        AddConfigurationControl(ctrl.ControlPath)
 
    Next
 
End Sub
 
Private Sub AddConfigurationControl(ByVal cPath As String)
 
    Dim p As New RadPanelItem("Control No. " & RadPanelBar1.Items.Count)
    Dim uc As Control = LoadControl(cPath)
 
    Dim content As New RadPanelItem()
    content.Controls.Add(uc)
 
    p.Items.Add(content)
 
    RadPanelBar1.Items.Add(p)
 
End Sub
 
Protected Sub RadComboBox1_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBox1.SelectedIndexChanged
 
    'Here we add the control to our "memory" of what controls we have so far used
    'This is persisted into a hidden form variable without any problems
    MyUsedControls.Add(
        MyUsedControls.Count,
        New MyUsedControl With {
            .ID = RadPanelBar1.Items.Count,
            .ControlPath = RadComboBox1.SelectedValue
        }
    )
 
    AddConfigurationControl(RadComboBox1.SelectedValue)
 
    RadComboBox1.ClearSelection()
 
End Sub

You can download a copy of the source code here: Sample Code: RadControlsWebApp1 (link expires 19 August 2012)
Tamayi
Top achievements
Rank 1
 answered on 25 Jun 2012
8 answers
137 views
Hi,

I am working on customizing the Telerik styles by registering a new skin completely as per the steps given in the Telerik skin registration tutorial. I have updated the style sheets and copied the Telerik folder from the Skin folder to my projects folder and updated the web config files app settings section to make my custom style work.

The issue is : When I updated the CSS of Telerik.Web.UI version 2011_1_519 the controls are not showing up properly, where as if I use the CSS of Telerik.Web.UI of some older version then the styles are appearing correctly.

Please help me with this issue, any help is greatly appreciated.

Thanks,
Mohammed Asif
Bozhidar
Telerik team
 answered on 25 Jun 2012
1 answer
274 views
Hi,

what's the deal about the new Telerik.ScriptManager.EnableEmbeddedjQuery feature? I look at the js produced and I can only see one difference:

/* START Telerik.Web.UI.Common.jQueryExternal.js */
if(typeof $telerik.$==="undefined"){$telerik.$=window.jQuery;
}
/* END Telerik.Web.UI.Common.jQueryExternal.js */
/* START Telerik.Web.UI.Calendar.RadDatePicker.js */

The jQueryExternal.js is embedded in front of the RadDatePicker.js.. it actually solved a $telerik.$ not defined problem I had with the RadDatePicker on some pages. And on some pages the above code wasn't injected in the js.

What's the correct way to use this new feature? Is the above the only difference this feature is gonna make and is it only for RadDatePicker?

By the way, I am adding my own "Telerik.Web.UI.Common.jQuery.js" and "Telerik.Web.UI.Common.jQueryInclude.js" in the code through RadScriptManager.
Dimitar Terziev
Telerik team
 answered on 25 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?