This is a migrated thread and some comments may be shown as answers.

Problems with server-side changes

10 Answers 70 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
FEST
Top achievements
Rank 1
FEST asked on 01 Sep 2011, 01:09 PM
Hi forum!

I'm trying to change the minutesperrow property throught a combobox. Whenever i change the selected index of the combo it goes to server side code (vb.net) and do RadScheduler1.MinutesPerRow = RadComboBox2.SelectedValue but nothing happens. can anyone help me please?

radcombo code:
<telerik:RadComboBox ID="RadComboBox2" runat="server" AutoPostBack="True">
<Items>
<telerik:RadComboBoxItem Text="10min" Value="10" />
<telerik:RadComboBoxItem Text="20min" Value="20" />
<telerik:RadComboBoxItem Text="30min" Value="30" />
<telerik:RadComboBoxItem Text="40min" Value="40" />
<%--<telerik:RadComboBoxItem Text="50min" Value="50" />
<telerik:RadComboBoxItem Text="60min" Value="60" />
<telerik:RadComboBoxItem Text="90min" Value="90" />
<telerik:RadComboBoxItem Text="120min" Value="120" />--%>
</Items>

radscheduler code:
<telerik:RadScheduler ID="RadScheduler1" runat="server" 
    Culture="Portuguese (Portugal)" DataEndField="Data_Consulta" 
    DataKeyField="Consulta_id" DataSourceID="SqlDataSource1" 
    DataStartField="Data_Consulta" DataSubjectField="Boletim_id" 
    DayEndTime="20:00:00" ShowFullTime="True" Skin="Windows7" 
    StartInsertingInAdvancedForm="True" WorkDayEndTime="20:00:00" 
    DayView-DayEndTime="20:00:00" DayView-WorkDayEndTime="20:00:00" 
    WeekView-WorkDayEndTime="20:00:00" WeekView-DayEndTime="20:00:00" 
    MultiDayView-WorkDayEndTime="20:00:00" MultiDayView-DayEndTime="20:00:00" 
    MinutesPerRow="10">
    <TimelineView StartTime="08:00:00" />
    <WeekView DayEndTime="20:00:00" WorkDayEndTime="20:00:00" />
    <MultiDayView DayEndTime="20:00:00" NumberOfDays="7" UserSelectable="True" 
        WorkDayEndTime="20:00:00" />
    <DayView DayEndTime="20:00:00" WorkDayEndTime="20:00:00" />
</telerik:RadScheduler>
server-side code:
Protected Sub RadComboBox2_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBox2.SelectedIndexChanged
    RadScheduler1.MinutesPerRow = RadComboBox2.SelectedValue
    'RadScheduler1.GetCallbackResult()
End Sub
 Many Thanks, FEST

10 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 01 Sep 2011, 01:26 PM
Hi Fest,

This demo shows how to change the MinutesPerRow property of the RadScheduler via a RadComboBox.

Best wishes,
Veronica Milcheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
FEST
Top achievements
Rank 1
answered on 01 Sep 2011, 02:00 PM
Im sorry but i dont see the link
0
Veronica
Telerik team
answered on 01 Sep 2011, 02:13 PM
Hi Fest,

Please accept my apologies for missing the link url. Here is it: http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx

Regards,
Veronica Milcheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
FEST
Top achievements
Rank 1
answered on 01 Sep 2011, 02:47 PM
Hi Veronica, dont worry it happens.

My problems continues. I saw the demo you gave to me, there the radscheduler.MinutesPerRow is setted by doing
RadScheduler1.MinutesPerRow = Integer.Parse(MinutesPerRow.SelectedValue)
where i had
RadScheduler1.MinutesPerRow = RadComboBox2.SelectedValue
so i changed and added the integer.parse, thing is...in my combo i have the 10, 20, 30 and 40 minutes per row otpions. When i select the first time nothing happens, but the following selections make the scheduler to set the minutesPerRow equally to the value that i selected before, example:
1º selection : i select 40min nothing happens and radscheduler stays with the default value that was setted in the ide
2º selection : i select 10min and this time the MinutesPerRow are setted to 40 instead of 10
3º selection : i select 20min and the MinutesPerRow are setted to 10 instead of 20 and so on to the other selections
NOTE: when im in debug the radcombobox2.selectedValue is correct being equal to the selected value and that same value is passes correctly to the radscheduler1.MinutesPerRow. My telerik version is 2011.2.712.35

Many Thanks FEST
0
Veronica
Telerik team
answered on 01 Sep 2011, 02:55 PM
Hello Fest,

Thank you for the detailed information provided.

I just wonder in which event do you set the MinutesPerRow property of the RadScheduler from the RadComboBox. Pay attention to the demo again as there it is done in the OnPreRender event. 

Best wishes,
Veronica Milcheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
FEST
Top achievements
Rank 1
answered on 01 Sep 2011, 03:09 PM
Protected Overloads Overrides Sub OnPreRender(ByVal e As EventArgs)
    MyBase.OnPreRender(e)
    RadScheduler1.MinutesPerRow = Integer.Parse(RadComboBox2.SelectedItem.Value)
End Sub
HI Veronica.

I did not saw the onprerender, sorry. I was doing the changes in the radcombobox.click event, even so the problem persists. i now have like this (code blok above).
the only time it appears to be doing it right is when is first loads the page.

Many thanks FEST
0
FEST
Top achievements
Rank 1
answered on 01 Sep 2011, 03:46 PM
HI
Is there a way to force the radscheduler o render?
0
Veronica
Telerik team
answered on 03 Sep 2011, 09:37 AM
Hi Fest,

Have you set the AutoPostBack property of the RadComboBox to "true"?

Greetings,
Veronica Milcheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
FEST
Top achievements
Rank 1
answered on 08 Sep 2011, 06:23 PM
Hi Veronica

Im sorry for taking so long (im sure you'll read this again have you not read it already ^^). I did had the autopostback as true in the radcombobox, i also tried with a asp dropdownlist and putted the autopostback to true and the problem neverewent away. I'll try to send as soon as possible aworking example to you but, forgive me, i might take a while cause i m not with the working example i had. even so, if you think of anything else i can try or i might had forgot please tell me so in the right time i try it before sending the working project to you

Many Thanks
FEST
0
Veronica
Telerik team
answered on 11 Sep 2011, 12:43 PM
Hi Fest,

Unfortunately I can not think of anything that could "reveal the mist" in your case. The fact is that the demo is working so with sure it is something on your side that causes problems. I am waiting for the sample project from your side.

Greetings,
Veronica Milcheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Scheduler
Asked by
FEST
Top achievements
Rank 1
Answers by
Veronica
Telerik team
FEST
Top achievements
Rank 1
Share this question
or