Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
63 views
Hii

 I  don't want to save the appointment or lesson less than today date. If today date is 27/3/2011 and if i select 13/3/2011 then dont want to save the record less than today date.

And one more question How disable rad scheduler control on page load event ?....

Thanks
Regards
Rahul mahajan
Veronica
Telerik team
 answered on 31 Mar 2011
1 answer
39 views
Ok  here goes... I have a RadGrid on my page.  When the Grid gets rendered each item has alternating backcolors.  So the items backcolor is gray, white, gray, white... and so forth.  This is set by the skin.  I did not configure anything specifically regarding the alternating item style.

Now the grid also contains a template column that contains a RadListBox control.  I wrote code that puts listitems in that ListBox.  Here's the problem though... the backcolor of the ListBox is white.  So whether the griditem's backcolor is white or gray, the listbox backcolor is still white.  No problem on the white griditems, but on a gray griditems, its doesnt look good.  I want the backcolor of the Listbox to be the same as the backcolor for the particular griditem its in.  So if the griditem's backcolor is gray, then I want the ListBox to have a gray backcolor.  If the griditem's backcolor is white, then I want the ListBox to stay with a white backcolor.  I am trying to get a look where the user doesn't see a Listbox, but thinks its just part of the data on that griditem.

Any suggestions.
DB
Galin
Telerik team
 answered on 31 Mar 2011
11 answers
244 views

Hello,

I have a radGrid that populates with groups collapsed by default.  The group header displays the group header title and aggregate count as expected.  When a header is dragged to the GridGroupPanel, the new subgroup still has a header title, but the aggregate is lost for the new sub-group. 

Here is a sample of my initial grouping:

 

 

 

 

Dim expression As GridGroupByExpression = New GridGroupByExpression
            Dim gridGroupByField As GridGroupByField = New GridGroupByField
  
            gridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "DGDesc"
            gridGroupByField.HeaderText = " "
            gridGroupByField.HeaderValueSeparator = " "
            gridGroupByField.FormatString = " <strong>{0}</strong> "
            expression.SelectFields.Add(gridGroupByField)
  
            expression.GroupByFields.Add(gridGroupByField)
  
  
            gridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "ProspectusLnNo"
            gridGroupByField.HeaderText = " "
            gridGroupByField.HeaderValueSeparator = " "
            gridGroupByField.FormatString = " (Records: {0})"
            gridGroupByField.Aggregate = GridAggregateFunction.Count
            expression.SelectFields.Add(gridGroupByField)
  
            radGridDocuments.MasterTableView.GroupByExpressions.Add(expression)

I had to add the GroupByFields first before adding the SelectField with the aggregate function or it would not work.  Anyway:

When I try to modify the GroupsChanging event, the best I get is a blank subgroup:


If e.Action = GridGroupsChangingAction.Group Then
      If e.Expression.GroupByFields(0).FieldName <> "ImgSRC" Then
             If Not IsGroupedByImgSRC(radGridDocuments.MasterTableView.GroupByExpressions) Then
                 Dim customerGroupField As GridGroupByField = New GridGroupByField()
                 customerGroupField.FieldName = "ImgSRC"
                 customerGroupField.HeaderText = " "
                 customerGroupField.HeaderValueSeparator = " "
                 customerGroupField.FormatString = " (Records: {0})"
                 customerGroupField.Aggregate = GridAggregateFunction.Count
                 e.Expression.SelectFields.Add(customerGroupField)
                 'e.Expression.GroupByFields.Insert(1, customerGroupField)
                 radGridDocuments.MasterTableView.GroupByExpressions.Add(e.Expression)
             End If
         End If
     End If

 

 

 

 

 

Thank you for any assistance.

Tsvetina
Telerik team
 answered on 31 Mar 2011
2 answers
66 views
Hi,
RadEditor (Q1 2007) does not work with IE9. After loading a page that has RadEditor, every click with the mouse produces an error:
Microsoft JScript runtime error: Unable to get value of the property 'width': object is null or undefined.

In some cases the control is 'locked', or at least nothing can be edited.

There are some problems with RadAjaxManager and RadEditor under Firefox and Chrome, but these problems are solvable.
I know that Q12007 is a very old version, but it has worked great. Until now :-(

With the exception of the standard response to upgrade version, is there any solution?

Best Regards
Ivajlo
Ivajlo Tchobanov
Top achievements
Rank 1
 answered on 31 Mar 2011
1 answer
60 views
Hi,

I am using a DataPager inside a ListView and I've also tried outside a ListView.  The problem I have is that when the DataPager first loads I am dynamically checking the number of pages I have within the ListView and if it's one page, I hide the DataPager.  When I tried putting the DataPager inside the ListView I use the "Container.PageCount" trick to either make it visible or hidden.

While that works fine, the problem arises when the DataPager is hidden initially and then after an asynchronous postback, the DataPager loses all its CSS.  The next and previous buttons, for example, are just tiny squares with no text and no style.  If, however, the DataPager is not hidden on page load and then I perform a callback, the style is just fine.  So this only happens if the DataPager is hidden initially AND the browser is IE.  I've tested this on IE 8.0 with standard and compatibility mode and also IE 9.0

My application has multiple playlists and when I click a playlist various items will appear that sometimes has more than one page. So I want to be sure to only show the DataPager when the page exceeds one.  I've tried putting everything in an updatepanel and I also tried using the RadAjaxManager, both having the same result.

Any idea as to why this happens?  Thanks!
Galin
Telerik team
 answered on 31 Mar 2011
1 answer
93 views
So I've written some javascript code that should display a button when the listbox's OnClientTransferred event fires. It works fine in Chrome and Firefox but not IE (big surprise). I am using an asp:update panel so I'll post THE JavaScript and all of the relevant markup in case that matters.

function showButton(){
     var btn = document.getElementById('<%=btnClientCont.ClientID%>');
     btn.style.display = "inherit";
}

and the markup

<div>
<asp:UpdatePanel ID="updatepanel" runat="server"><ContentTemplate>
<table><tr><td>
<telerik:RadListBox runat="server" ID="lstBox" OnClientTransferred="showButton">
</telerik:RadListBox>
</td></tr>
<tr><td><telerik:RadListBox></telerik:RadListBox></td>
<tr><td><asp:Button ID="btnReset" OnClick="rebindAll"/></td></tr>
</ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="btnReset" EventName="Click"/>
<asp:PostBackTrigger ControlID="btnClientCont"/></Triggers></asp:UpdatePanel></div>
<div><input type="submit" runat="server" onservercick="btnContinue_Click" id="btnClientCont"/></div>

Again, this works in both Chrome and Firefox, but the button won't appear in IE (tested on both 8 and 9).
Dimitar Terziev
Telerik team
 answered on 31 Mar 2011
4 answers
163 views
I am getting an error when trying to bind a timeslot view over multiple days. Sometimes it works, sometimes it doesn't. I've traced it down to the "NumberOfSlots" variable. When I bind certain data, it won't go over 250. However, with some data it works fine with a value of 2500. I've pasted below a code snippet of a page that return the error. Any ideas as what could be causing this?

 Specified argument was out of the range of valid values. 
Parameter name: value 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. 
Parameter name: value 
 
Source Error: 
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
 
Stack Trace: 
 
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values. 
Parameter name: value] 
   System.Web.UI.WebControls.Unit..ctor(Double value, UnitType type) +8670187 
   System.Web.UI.WebControls.Unit.Percentage(Double n) +38 
   Telerik.Web.UI.AllDayAppointmentControl.GetWidth() +75 
   Telerik.Web.UI.AppointmentControl.CalculateSize() +75 
   Telerik.Web.UI.Scheduler.Views.AllDayLayout.CreateAppointmentControls(IEnumerable`1 slots, Boolean registerAppointmentControls) +1338 
   Telerik.Web.UI.Scheduler.Views.AllDayLayout..ctor(IEnumerable`1 slots, Boolean registerAppointmentControls, IComparer`1 appointmentComparer) +103 
   Telerik.Web.UI.Scheduler.Views.Timeline.TimelineLayout..ctor(IEnumerable`1 slots, Boolean registerAppointmentControls, IComparer`1 appointmentComparer) +45 
   Telerik.Web.UI.Scheduler.Views.Timeline.TimelineLayout..ctor(IEnumerable`1 slots, IComparer`1 appointmentComparer) +42 
   Telerik.Web.UI.Scheduler.Views.Timeline.RendererBase.CreateLayout(List`1 timeSlots) +83 
   Telerik.Web.UI.Scheduler.Views.Timeline.RendererBase.CreateInnerContentTable(Control container, IList`1 allTimeLineSlots) +332 
   Telerik.Web.UI.Scheduler.Views.Timeline.GroupedByResource.Renderer.CreateVerticalContent(SchedulerTopTable topTable) +404 
   Telerik.Web.UI.Scheduler.Views.Timeline.GroupedByResource.Renderer.GetInnerContent() +310 
   Telerik.Web.UI.Scheduler.Views.Timeline.GroupedByResource.Renderer.GetContent() +88 
   Telerik.Web.UI.RadScheduler.CreateContent() +221 
   Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +190 
   Telerik.Web.UI.RadScheduler.CreateChildControls() +33 
   System.Web.UI.Control.EnsureChildControls() +87 
   System.Web.UI.Control.PreRenderRecursiveInternal() +44 
   System.Web.UI.Control.PreRenderRecursiveInternal() +171 
   System.Web.UI.Control.PreRenderRecursiveInternal() +171 
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842 
 

<telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedView="TimelineView" 
            OnAppointmentDataBound="RadScheduler1_OnAppointmentDataBound" TimelineView-HeaderDateFormat="D" 
            DataSourceID="dsEventsDataSource" Skin="Office2007" GroupBy="Room" GroupingDirection="Vertical" 
            DayStartTime="08:00:00" DayEndTime="23:30:00" TimeZoneOffset="03:00:00" DataKeyField="Conf_ID" 
            DataSubjectField="Conference_Name" DataStartField="Start" DataEndField="End" 
            OverflowBehavior="Expand" ShowViewTabs="false" ColumnWidth="10px" Width="950px" 
            Height="400px" CustomAttributeNames="Conf_ID" OnAppointmentCommand="RadScheduler1_OnAppointmentCommand" 
            OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated" RowHeight="40px" 
            MultiDayView-NumberOfDays="2" RowHeaderWidth="100px" EnableDatePicker="false" 
            ShowNavigationPane="false" AllowInsert="false" AllowEdit="false" AllowDelete="false"
            <advancedform modal="true" /> 
            <timelineview numberofslots="192" slotduration="0:15" columnheaderdateformat="h tt" 
                timelabelspan="4" showinsertarea="false" /> 
            <resourcetypes> 
                <telerik:ResourceType KeyField="VideoEndPointId" Name="Room" TextField="Name" ForeignKeyField="VideoEndPointId" 
                    DataSourceID="dsRoomsDataSource" /> 
            </resourcetypes> 
            <resourceheadertemplate> 
                <asp:LinkButton ID="btnRemove" runat="server" Text="X" CommandName="RemoveResource" 
                    CausesValidation="false" CssClass="ui-icon ui-icon-trash" Style="float: left" 
                    OnClientClick="return confirm('Are you sure you want to remove this room?')" />&nbsp; 
                <asp:Label ID="ResourceLabel" runat="server" /> 
            </resourceheadertemplate> 
        </telerik:RadScheduler> 
        <asp:LinqDataSource ID="dsEventsDataSource" runat="server" OnSelecting="dsEventsDataSource_OnSelecting"
        </asp:LinqDataSource> 
        <asp:LinqDataSource ID="dsRoomsDataSource" runat="server" OnSelecting="dsRoomsDataSource_OnSelecting"
        </asp:LinqDataSource> 

public partial class Test4 : System.Web.UI.Page 
    public List<Glowpoint.VNOC.BusinessLayer.Room> Rooms { get { return (List<Glowpoint.VNOC.BusinessLayer.Room>)ViewState["Rooms"]; } set { ViewState["Rooms"] = value; } } 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
 
 
            RadScheduler1.SelectedDate = DateTime.Parse("10/15/2009"); 
            TimeSpan daySpan = DateTime.Parse("10/19/2009 6:30:00 AM") - RadScheduler1.SelectedDate; 
            RadScheduler1.TimelineView.NumberOfSlots = (daySpan.Days + 1) * 96; 
             
            Rooms = new List<Glowpoint.VNOC.BusinessLayer.Room>() 
            {  
                new Glowpoint.VNOC.BusinessLayer.Room() { 
                    VideoEndPointId = new Guid("95d15340-a38b-4c06-970e-290019f2d7fb"), 
                    Name = "test1"
                    Schedules = new List<RoomSchedule>() { new RoomSchedule() { Conference_Name = "TPX 2.0 Upgrade", PreTestTime = DateTime.Parse("10/15/2009 6:45:00 AM"), Start = DateTime.Parse("10/15/2009 7:00:00 AM"), End = DateTime.Parse("10/19/2009 6:30:00 AM"), Conf_ID = 158062, VideoEndPointId = new Guid("95d15340-a38b-4c06-970e-290019f2d7fb") } } 
                } 
            }; 
        } 
    } 
 
    protected void RadScheduler1_OnAppointmentCommand(object sender, AppointmentCommandEventArgs e) 
    { 
        if (e.CommandName == "RemoveResource"
        { 
            Guid roomId = new Guid(e.CommandArgument.ToString()); 
            Rooms.Remove(Rooms.Single(r => r.VideoEndPointTypeId == roomId)); 
            RadScheduler1.Rebind(); 
            System.Web.UI.ScriptManager.RegisterStartupScript(thisthis.GetType(), """RemoveRoom('" + roomId + "');"true); 
        } 
    } 
 
    protected void RadScheduler1_ResourceHeaderCreated(object sender, Telerik.Web.UI.ResourceHeaderCreatedEventArgs e) 
    { 
        ((Label)e.Container.FindControl("ResourceLabel")).Text = e.Container.Resource.Text; 
        ((LinkButton)e.Container.FindControl("btnRemove")).CommandArgument = e.Container.Resource.Key.ToString(); 
    } 
 
    protected void dsEventsDataSource_OnSelecting(object sender, LinqDataSourceSelectEventArgs e) 
    { 
        List<RoomSchedule> schedules = new List<RoomSchedule>(); 
        foreach (var room in Rooms) { schedules.AddRange(room.Schedules); } 
        e.Result = schedules; 
    } 
 
    protected void RadScheduler1_OnAppointmentDataBound(object sender, SchedulerEventArgs e) 
    { 
        if (e.Appointment.Subject == String.Empty) e.Appointment.BackColor = System.Drawing.Color.Red; 
    } 
 
    protected void dsRoomsDataSource_OnSelecting(object sender, LinqDataSourceSelectEventArgs e) 
    { 
        e.Result = Rooms; 
    } 

Veronica
Telerik team
 answered on 31 Mar 2011
3 answers
86 views
I am trying to get two RadDocks to take up all the vertical space in a RadDockZone and can accomplish this by using percentages where one dock height is 30% and the other is 70%. This takes up all the vertical space but the content in the dock with 30% hieght dock disappears in a div that is height 0.

It would appear that the div that takes the <ContentTemplate></ContentTemplate> area is getting a size set to it. Is there any way to keep this behavior from happening?
Pero
Telerik team
 answered on 31 Mar 2011
1 answer
68 views
Hi,

I have a couple of pages with standard asp.net validation controls such as RequiredFieldValidator etc inside my RadAjaxPanel.

As soon as I navigate to another tab in my RadTabStrip the page seems to force validation errors and pretty much "locks" the page even though non of the fields was selected to enter data.

Only once all the required fields was entered the page seems to release the "lock" and only then am I able to navigate to another tab / page without even submitting the page.

Any idea what might be causing the "lock" and forced validation errors on the page?

Thanks
Shinu
Top achievements
Rank 2
 answered on 31 Mar 2011
4 answers
132 views
The alignment box on the image editor doesn't seem to be working in my rad editor the popup appear but clicking on it has no effect. The control in the set image properties button seems to work fine though.

I get a Javascript error this.getPopupVisibilityController() is null or not an object on lines 2383, 2179 (several times each) which I assume may be part of the problem.

Any ideas?

Jon

Rumen
Telerik team
 answered on 31 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?