Hello,
I have a Server binded Scheduler with a Timeline View set to group by but it does not work.
My ASPX code:
<telerik:RadScheduler runat="server" ID="RadScheduler1" EnableAdvancedForm="false" AllowDelete="false"
AllowEdit="false" AllowInsert="false" CssClass="test" ShowFooter="false"
SelectedView="TimelineView" Height="500"
onappointmentdatabound="RadScheduler1_AppointmentDataBound"
OnResourcesPopulating="RadScheduler1_ResourcesPopulating" >
<WebServiceSettings Path="~/Controllers/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" />
<TimelineView GroupingDirection="Vertical" NumberOfSlots="31"
ColumnHeaderDateFormat="dd" GroupBy="Car" />
<AdvancedForm Modal="false" />
<MultiDayView UserSelectable="false" />
<MonthView UserSelectable="true" />
<WeekView UserSelectable="true" />
<DayView UserSelectable="true" />
My code behind code:
protected void Page_Load(object sender, EventArgs e)
{
List<Model> list = facade.List();
foreach (Model obj in list)
{
RadScheduler1.Resources.Add(new Resource("Car",
obj.Id, obj.BuyDate.ToString("dd/MM/yyyy")));
}
}
in the Web Service code I have implemented the GetAppointments and the GetResources methods. The GetAppointments returns a list of AppointmentData objects which are created in this way:
AppointmentData appointment = new AppointmentData();
appointment.ID = obj.ID;
ResourceData rd= new ResourceData();
rd.Key=appointment.ID;
appointment.Resources.Add(rd);
appointment.Subject = obj.ID;
appointment.Start = obj.Visit;
appointment.End = appointment.Start.AddHours(8);
appointments.Add(appointment);
What I'm getting with this code is a Scheduler with the added resources in the first column but it does not show the appointments.
Please hellp me with this control. Thanks.
<telerik
:GridTemplateColumn HeaderText="Male" UniqueName="Gender"> <ItemTemplate>
<asp:RadioButton ID="RadioButtonMaleItem" runat="server" GroupName="" Enabled="false"/>
</ItemTemplate>
<EditItemTemplate>
<asp:RadioButton ID="RadioButtonMaleEditItem" runat="server" GroupName="MF" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Female" UniqueName="Female">
<ItemTemplate>
<asp:RadioButton ID="RadioButtonFemaleItem" runat="server" GroupName="MF" Enabled="false" />
</ItemTemplate>
<EditItemTemplate>
<asp:RadioButton ID="RadioButtonFemaleItem" runat="server" GroupName="MF" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
When I switch to EditMode the radiobuttons on the editrow are both unchecked how come? And how can I read the new checked value and update the database (similar to OnItemDataBound, but then the other way around)
regards martin
Hello,
I installed the trial version and started to fit your all kinds of controls but the controls are without formatting and I do not know where to download or installed on my computer where the style / skin of each control.
Is there a way to open a project in VS and in all Hsteilim DLL will already be built in the project?
I have a combo with load on demand and I refresh via javascript. What I want is the combo to populate items and then go and selected item that matches a value id. So for example:
OlinCA.loadStates =
function
(country, selectedState) {
var
rcbContactState = $find(
"<%= rcbContactState.ClientID %>"
);
rcbContactState.set_text(
"Loading..."
);
rcbContactState.clearSelection();
rcbContactState.requestItems((country +
'~'
+ selectedState),
false
);
rcbContactState.findItemByValue(selectedState).select();
}
As you see I am passing a value to populate the combo by a selected country and then select a matching state. Well every time I call that findItemByValue I get an error because that line fires before the list is populated. I need somehow to have the load request finish first. I tried to select a value via the server side code, but nothing gets selected. What is the way I can do the selection like I need to?
I have a problem with the RadScheduler control. When I move an appointment, sometime, the new start time is false…
I test with args.get_newStartTime() (client side) and e.ModifiedAppointment.Start (server side) and the twice send me the same value.
<
telerik:RadScriptBlock
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function onAppointmentMoveEnd(sender, args)
{
alert(args.get_newStartTime());
}
</
script
>
</
telerik:RadScriptBlock
>
<
div
>
<
telerik:RadScheduler
OnClientAppointmentMoveEnd
=
"onAppointmentMoveEnd"
runat
=
"server"
ID
=
"schPlanning"
DataKeyField
=
"Libelle"
DataSubjectField
=
"SujetEvenement"
DataDescriptionField
=
"Libelle"
DataStartField
=
"Debut"
DataEndField
=
"Fin"
Height
=
"1000px"
>
</
telerik:RadScheduler
>
</
div
>
public
partial
class
Calendrier : Page
{
private
void
schPlanning_AppointmentUpdate(
object
sender, AppointmentUpdateEventArgs e)
{
DateTime newStartTime = e.ModifiedAppointment.Start;
// Alert(newStartTime)
}
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
schPlanning.AppointmentUpdate +=
new
AppointmentUpdateEventHandler(schPlanning_AppointmentUpdate);
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
List<Evenement> evenements =
new
List<Evenement>();
evenements.Add(
new
Evenement(
"Sujet"
,
"Libelle"
, DateTime.Now.Date.AddHours(15), DateTime.Now.Date.AddHours(17)));
schPlanning.DataSource = evenements;
}
}
}
public
class
Evenement
{
public
string
SujetEvenement {
get
;
set
; }
public
string
Libelle {
get
;
set
; }
public
DateTime Debut {
get
;
set
; }
public
DateTime Fin {
get
;
set
; }
public
Evenement(
string
sujetEvenement,
string
libelle, DateTime debut, DateTime fin)
{
SujetEvenement = sujetEvenement;
Libelle = libelle;
Debut = debut;
Fin = fin;
}
}
I join a screenshot when I have the error.
Information:
- Telerik 2013.2.717.35
- Internet Explorer 9.0.8112.16421
Sorry for my approximate English, I’m French.
Jérémy