Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
48 views
I have a strange one here.  I'm using a combobox which is dynamically created on the server and added to my form.  I'm using loadondemand.  I check the length of a text field for one of the items I added server side prior to the call to the remote method and the length of my text value is 7 characters.  After I click on the dropdown and it goes out to retrieve more items and returns to my OnitemsRequested javascript routine, I check the length of the same item and it is now 8 characters.  So essentially a space is being added to the end of the string.  My remote method does not alter existing items in the combobox and only adds new items.  Any known issues?
Kalina
Telerik team
 answered on 16 Apr 2010
1 answer
98 views
Hello,

I have a radGrid inside an AjaxPanel,
if i select for example rows 2 and 3, and use the command item to delete the selected items, it does delete the 2nd and 3rd rows, but when it gets back, i get rows 4 and 5 selected instead!!!!!

i tried clearing selection but to no avail, if i disable view state of the AjaxPanel, i cannot use the selectedItems collection.

Please help

Pavel
Telerik team
 answered on 16 Apr 2010
5 answers
270 views
Hello Telerik and Everyone Else!

I've tried very hard to look for a similar question that has already been answered but unfortunately I couldn't find one. So please bear with me.

As you know there is demo about ajaxifying the timer here: 
http://demos.telerik.com/aspnet-ajax/ajax/examples/common/ajaxifytimer/defaultvb.aspx

This demo updates the whole RadGrid every interval of the timer.

What if instead of updating the whole RadGrid every interval of the timer, each of the datagrid row gets updated at different times - say the 1st row get's updated every 5 seconds, the 2nd row at 10 seconds, the 3rd row at 8 seconds, the 4th row at 30 seconds, and so on and so forth.

I guess what I want is that each datagrid row will have its own separate dynamically created timer running at different intervals. How can RadAjaxManager handle that kind of a scenario? Below are some code snippets of my failed attempt:

Public Class TCSTimer  
    Inherits System.Timers.Timer  
 
    Private mstrTag As Object 
    Private mstrName As String 
 
    Public Property Tag() As Object 
        Get 
            Return mstrTag  
        End Get 
        Set(ByVal value As Object)  
            mstrTag = value  
        End Set 
    End Property 
 
    Public Property Name() As String 
        Get 
            Return mstrName  
        End Get 
        Set(ByVal value As String)  
            mstrName = value  
        End Set 
    End Property 
 
    Public Sub New()  
        MyBase.New()  
    End Sub 
 
    Public Sub New(ByRef sTag As ObjectByVal sName As String)  
        mstrTag = sTag  
        mstrName = sName  
    End Sub 
End Class 
 
Partial Class _Default  
    Inherits System.Web.UI.Page  
 
    Protected Sub RadGrid1_ItemDataBound(ByVal sender As ObjectByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If TypeOf e.Item Is GridDataItem Then 
            Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)  
            Dim item As GridDataItem = TryCast(e.Item, GridDataItem)  
            Dim hlLink As HyperLink = item.FindControl("hlFPP")  
            hlLink.NavigateUrl = "Default.aspx?panel=SubGrid&f=" & dataItem("FPP").Text.Split("-")(0).Trim & "&prog=" & dataItem("FPP").Text.Split("-")(1).Trim & _  
                                 "&prod=" & dataItem("FPP").Text.Split("-")(2).Trim & "&status=" & dataItem("Status").Text & _  
                                 "&message=" & dataItem("Message").Text  
            hlLink.Text = dataItem("FPP").Text  
            Dim lblTC As Label = item.FindControl("lblTC")  
            lblTC.Text = Now().ToLongTimeString  
            Dim lblCtr As Label = item.FindControl("lblCtr")  
            lblCtr.Text = Now().ToLongTimeString  
 
            If "/WP/".Contains("/" & dataItem("Status").Text.Trim.ToUpper & "/"Then 
                item.BackColor = Color.DarkRed  
                item.ForeColor = Color.Yellow  
                hlLink.ForeColor = Color.White  
            End If 
            If "/B/M/".Contains("/" & dataItem("Status").Text.Trim.ToUpper & "/"Then 
                item.BackColor = Color.Yellow  
                item.ForeColor = Color.Blue  
            End If 
 
 
            Dim tmrGridTimer As TCSTimer = New TCSTimer(dataItem, hlLink.Text)  
            tmrGridTimer.Interval = 1000  
            AddHandler tmrGridTimer.Elapsed, AddressOf tmrGridTimer_Elapsed  
            Dim rajaxs As Telerik.Web.UI.AjaxSetting = New Telerik.Web.UI.AjaxSetting  
            rajaxs.AjaxControlID = tmrGridTimer.Name  
            Dim rajaxsupdctrl As Telerik.Web.UI.AjaxUpdatedControl = New Telerik.Web.UI.AjaxUpdatedControl  
            rajaxsupdctrl.ControlID = "RadGrid1" 
            rajaxs.UpdatedControls.Add(rajaxsupdctrl)  
            rajaxsupdctrl.ControlID = lblTaktClock.ID  
            rajaxs.UpdatedControls.Add(rajaxsupdctrl)  
            rajaxsupdctrl.ControlID = lblCounter.ID  
            rajaxs.UpdatedControls.Add(rajaxsupdctrl)  
            rajaxsupdctrl.LoadingPanelID = "LoadingPanel1" 
            rajaxs.UpdatedControls.Add(rajaxsupdctrl)  
            RadAjaxManager1.AjaxSettings.Add(rajaxs)  
            tmrGridTimer.Start()  
 
        End If 
    End Sub 
 
    Public Sub tmrGridTimer_Elapsed(ByVal sender As ObjectByVal e As System.Timers.ElapsedEventArgs)  
        Dim itmTC As Label = CType(CType(sender, TCSTimer).Tag, GridDataItem).FindControl("lblTC")  
        Dim itmCtr As Label = CType(CType(sender, TCSTimer).Tag, GridDataItem).FindControl("lblCtr")  
 
        Dim r As New Random()  
        Dim t1, a1 As Integer 
 
        t1 = r.Next(1, 100)  
        a1 = r.Next(1, 100)  
 
        itmTC.Text = t1  
        itmCtr.Text = a1  
 
        t1 = Nothing 
        a1 = Nothing 
    End Sub 
 
End Class 


Thanks in advance!

Mira
Telerik team
 answered on 16 Apr 2010
1 answer
114 views
Hello,
I have successfully created a grid and it's columns in the code behind and everything is working swimmingly, however now I need to support nullable dates in the pop-up grid editor.  For example:  Start date is required while end date is optional and often will not be populated.  Currently if you edit the grid or want to insert a new record and do not specify a value for the end date, technically the pop-up editor thinks some kind of invalid datetime exception occured.

Now that i have provided the backup, I have two questions that I hope you can help to answer:
  1. How can you create a grid column programatically that accepts null for date values (System.Date...does not work for this) when in edit/insert mode?
  2. How can you use a built-in column editor for date values but have this values formatted as MM/YY when the column is defined programmatically ({0:d} works for 4/1/2010 but {0:MM/yy} in the dataformat for the column does not seem to work)?

 

Thank you!

Martin
Telerik team
 answered on 16 Apr 2010
2 answers
171 views
Hello,

I have always an error when for first time, i choose a file with AsynUpload Control... And the error also occurs from time to time when i have already chosen a file and there's the elements uploaded

Image: error.jpg

The AsynUpload despite try to load the file, but it stay loading file and i cannot know when it has finished!

Image: uploading.jpg

The same error occurs when i'm gonna delete the file

Some ideas???

The code:

<telerik:RadAsyncUpload ID="RadUploadAttachs" runat="server" 
                    InitialFileInputsCount="1" 
                    Localization-Add="<%$ Resources:_Client, UploadPopUp_RadUpload_Add %>" 
                    Localization-Delete="<%$ Resources:_Client, UploadPopUp_RadUpload_Delete %>" 
                    Localization-Remove="<%$ Resources:_Client, UploadPopUp_RadUpload_Remove %>" 
                    Localization-Select="<%$ Resources:_Client, UploadPopUp_RadUpload_Select %>"
</telerik:RadAsyncUpload> 


Thanks,
Daniel Botero Correa
Daniel Botero Correa
Top achievements
Rank 1
 answered on 16 Apr 2010
7 answers
108 views
You can localize all of the RadSchedulers in a project but just changing the RadScheduler.Main.resx file.  Is there a similar option for the RadGrid?  I have bunch of grids in a project.
Sebastian
Telerik team
 answered on 16 Apr 2010
5 answers
150 views
I have the following javascript that is being called in the OnClientReordered event. I am trying to change the text of the items in the list when they are reordered. What I am seeing is the item does not update the first time the event fires. The second time the event fires the text gets rendered correctly. (The text is being changed properly, as I can put a watch on the values, and the text is correct. It is just not being rendered) Is there something I am doing incorrectly here? I could find no information from the documentation on the API.



function SetcontentorderNumber() { 
        reg = new RegExp("\\[\\d*\\]") 
        var list = $find("<%= foo.ClientID %>"); 
        var length = list.get_items().get_count(); 
 
        list.trackChanges(); 
        for (var i = 0; i < length; i++) { 
            var text = list.getItem(i).get_text(); 
            if (reg.test(text)) { 
                texttext = text.replace(reg, "[" + (i + 1) + "] "); 
                list.getItem(i).set_text(text); 
            } 
            else { 
                text = "[" + (i + 1) + "] " + text; 
                list.getItem(i).set_text(text); 
            } 
        } 
        list.commitChanges(); 
    } 

Veronica
Telerik team
 answered on 16 Apr 2010
1 answer
161 views
Currently the hyperlink configuration allows for "open in a new window".  My business users would like another option to "open in a new tab".   Would this be coming in a subsequent release? 
Stanimir
Telerik team
 answered on 16 Apr 2010
1 answer
140 views
If you set HideEvent to "LeaveTargetAndToolTIp", and if you place your mouse over the target (let's say an image), the tooltip displays and after a few seconds it hides. If you set the HideEvent to "LeaveTootip", the tooltip doesn't hide in the same scenario. I am fine with using "LeaveTooltip" to create a persistant tooltip which doesn't hide unless the user moves their mouse off the target, however, it doesn't seem to match up with the avaialble HideEvent options. Shouldn't "LeaveTargetAndTooltip" be the one which persists the tooltip when the user is hovering over the target?
Svetlina Anati
Telerik team
 answered on 16 Apr 2010
3 answers
108 views
I just loaded up the newest version of Telerik.Web.UI Q1 2010 and my style overrides seem to be only partially working?  Did the styles change again?
Iana Tsolova
Telerik team
 answered on 16 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?