Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
83 views
How can I assign a time value (AdmitTime - retrieved from a database as a Time field) to the selecteddate property of a RadTimePicker control?

I don't know how to finish the below code retrieved successfully from a LINQ query:
radAdmitTime.SelectedDate = query.AdmitTime.

I am using version 2009.3.1314.35 of the Telerik tools.
Bill
Top achievements
Rank 2
 answered on 15 Jan 2011
2 answers
97 views
I have implemented a RadTagCloud and I would like to execute javascript code when a user hovers over one of the items in the cloud.

How can I add the onmouseover attribute to the individual items rendered in the RadTagCloud?
John Stewart
Top achievements
Rank 1
 answered on 15 Jan 2011
2 answers
68 views
Code :

Protected Sub RadToolTipmanager_AjaxUpdate(ByVal sender As Object, ByVal e As ToolTipUpdateEventArgs)
Dim roleName As String = e.Value
        Dim listOfUsersInToolTip As New RadListBox
        Dim label As New Label
        listOfUsersInToolTip.Width = 150
        listOfUsersInToolTip.Height = 200
        If IsUserRole(e.Value) Then
            Dim usersList As ArrayList = rc.GetUserRolesByRoleName(DNN.GetPMB(Me).PortalId, roleName)
            If usersList.Count <> 0 Then
                For Each user As DotNetNuke.Entities.Users.UserRoleInfo In usersList
                    listOfUsersInToolTip.Items.Add(New RadListBoxItem(user.FullName, user.UserID))
                Next
                listOfUsersInToolTip.Sort = RadListBoxSort.Ascending
                listOfUsersInToolTip.SortItems()
                RadToolTipManager.Width = "150"
                RadToolTipManager.Height = "200"
                e.UpdatePanel.ContentTemplateContainer.Controls.Add(listOfUsersInToolTip)




            End If
        Else
            For Each role As RadComboBoxItem In cmbRoleName.Items
                If FindUserInRole(role.Text, e.Value) Then
                    label.Text = e.Value & " belongs to " & role.Text
                    RadToolTipManager.Width = "160"
                    RadToolTipManager.Height = "50"




                    e.UpdatePanel.ContentTemplateContainer.Controls.Add(label)
                    Exit For
                End If
            Next


        End If

Error :

RadToolTipManager response error:
 Exception=Sys.WebForms.PageRequestManagerServerErrorException: An error has occurred because a control with id 'dnn$ctr426$View$ctl00$ctl01' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error.




Muhammad
Top achievements
Rank 1
 answered on 15 Jan 2011
2 answers
233 views
Hello,

I would like to be able to set one tooltip for all buttons in a GridButtonColumn. The ButtonType is set to "ImageButton" for this column. Any ideas would be appreciated.

Thanks, Craig
Craig
Top achievements
Rank 1
 answered on 14 Jan 2011
3 answers
112 views
Hi, I am using "RadControls for ASP.NET AJAX Q3 2009" version and on my form, I am using different Telerik controls like RadToolBar, RadGrid, RadMenu etc.

Now, I want to have the same font names to be applied through out my entire form. I am applying this CSS to my form.

body
{
      margin-left: 0;
      margin-top: 0;
      margin-right: 0;
      height: 100%;
      font-family:Times New Roman;
}

But the problem is that I am using different SKINs to different Telerik control and it is not applying this font.
So what happens is that on my textbox or lables and Tables, I have "Times New Roman" but the Telerik controls have their own fonts as per applied SKIN.
So How do I apply "Times New Roman" fonts to all of the telerik controls on my page, RadToolBar, RadMenu, RadGrid etc. , basically want to apply SKIN but want to override fonts.

Any suggestions ?

Thanks in advance,
Nirav
Top achievements
Rank 1
 answered on 14 Jan 2011
0 answers
71 views
Sorry for the post - turns out it was a compatibility mode issue.
Brian
Top achievements
Rank 1
 asked on 14 Jan 2011
0 answers
41 views
Hi all,

If I have a static item such as:

<Items>
<telerik:RadListBoxItem Text="Test" />
</Items>

I see this item in e.SourceDragItems when this function is called:

protected void RadListBox_Dropped(object sender, RadListBoxDroppedEventArgs e)
{
    foreach( RadListBoxItem item in e.SourceDragItems)
    {
        RadDock dock = CreateRadDock();
        dock.Tag = item.Text;
        dock.Title = dock.Tag + CurrentDockStates.Count.ToString();
        LoadContent(dock);
        RadDockZone1.Controls.Add(dock);
    }
}

But, if I add an item to the ListBox at run time:

protected void LoadHistoricalReports( ReportServicesProxy.HistoricalReport[] historicalReports )
{
    RadListBox2.Items.Clear();
 
    foreach( var report in historicalReports )
    {
        RadListBoxItem currentItem = new RadListBoxItem(report.Name);
        RadListBox2.Items.Add(currentItem);
    }
}

I see currentItem in my RadListBox, but when I drag the item it says that SourceDragItems is 0. How can I fix this?

Sean

EDIT: It seems if I add to the list box during Page_Init then they show up.
Sean
Top achievements
Rank 2
 asked on 14 Jan 2011
4 answers
96 views
I have an object type called a CalendarEvent (it's a Linq2SQL object) that I'm trying to use to populate a Telerik Schedule control (2010.2.292.35). But in spite of everything appearing to work in the code, the schedule control still renders as not having any events at all.

My scenario involves the the events being matches between two sports teams. The user enters an abbreviation(s) for their team in a text box (comma delimited) and I display the games matching the team(s) entered. At the moment I only have two records in the database with the same team code, in this case SW600. So I'm just searching for all events that match that team. My Linq2SQL DAL returns two results as expected and all the values are populated correctly as well. I am using the Linq method ToList() to return the collection as a list since every example I can find for the schedule control using generics uses a List.

Here's the pertinent code as far as I can tell.
Public ReadOnly Property TeamsCodes As String()
    Get
        Return txtTeams.Text.Trim().Replace(" ", "").Split(",")
    End Get
End Property
 
Public ReadOnly Property CalendarEvents() As IList(Of CalendarEvent)
    Get
        If _calendarEvents Is Nothing Then
            _calendarEvents = _dataContext.CalendarEvents.Where(Function(g) g.StartDate.Month = DateTime.Now.Month And TeamsCodes.Contains(g.TeamCode)).ToList()
        End If
        Return _calendarEvents
    End Get
End Property
 
Protected Sub btnBuildCalendar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBuildCalendar.Click
    If (Not String.IsNullOrEmpty(txtTeams.Text)) Then
        rsCalendarEvents.DataSource = CalendarEvents
    End If
End Sub

The aspx code for the control is as follows
<telerik:RadScheduler ID="rsCalendarEvents" runat="server" readonly="true"
    DataKeyField="CalendarEventId" DataSubjectField="EventName" DataDescriptionField="EventDescription"
    DataStartField="StartDate" DataEndField="EndDate" Height="600px">
</telerik:RadScheduler>

Is there something that I'm missing that would explain why this doesn't work for me?
Nick
Top achievements
Rank 1
 answered on 14 Jan 2011
2 answers
74 views
Hi

I have a Country radcombo in a page. I have a anchor link to open a new window where we can a new country.
On close of  the window the newly added country should present in the radcombo and it should be in selected state.
Can you please a small sample to achieve this?

Thanks
Sreedhar Ambati
Jonx
Top achievements
Rank 2
 answered on 14 Jan 2011
1 answer
62 views
I have my grid being bound on the client side and everything is working correctly except when I attempt to sort in IE.  When I click on a column it is performing a postback even though I have args.set_cancel(true) in the OnClientCommand function.  When I run this in either Firefox or Chrome it behaves as expected and does not perform a postback.
Pavlina
Telerik team
 answered on 14 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?