Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views
Hi,

How can I have a rad numeric textbox which allow to enter only from 1 to 100. And it should be 0 if user enters a number greater than 100.

Thanks & regards,
Aneesh Daniel
Princy
Top achievements
Rank 2
 answered on 25 Jun 2012
3 answers
160 views
We have dynamically created tabs using RadTabStrip.
We have also set the following  RAdTabStrip Properties

<telerik:RadTabStrip ID="RadTabStrip1" runat="server"   SelectedIndex="0" OnTabClick="RadTabStrip1_TabClick" ScrollChildren="true" PerTabScrolling="true"  ScrollButtonsPosition="Middle" Orientation="HorizontalTop" Width="1340px">
  <Tabs ></Tabs>
</telerik:RadTabStrip>

Tabs are generated dynamically and the scroll also appears but the tab Tab at the Last Index is shown in the next line.
 I tried reducing the number of tabs by 1 but the problem still persists.

I think the width of the tab and the text length in each tab is creating a problem. But due to my requirement i have to mention a fixed width to the tab strip.

I have attached the image of the tabstrip.

Thanks in Advance.


Peter
Telerik team
 answered on 25 Jun 2012
1 answer
111 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
77 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
601 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
139 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
57 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
242 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
136 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
195 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?