<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
TimelineView-NumberOfSlots
=
"5"
Skin
=
"Web20"
EnableEmbeddedSkins
=
"true"
EnableEmbeddedBaseStylesheet
=
"false"
DataStartField
=
"Start"
DataEndField
=
"End"
DataSubjectField
=
"Subject"
DataKeyField
=
"ID"
EnableDescriptionField
=
"true"
GroupingDirection
=
"Vertical"
StartInsertingInAdvancedForm
=
"True"
AdvancedForm-Modal
=
"False"
OnAppointmentDelete
=
"RadScheduler1_AppointmentDelete"
OnAppointmentInsert
=
"RadScheduler1_AppointmentInsert"
OnAppointmentUpdate
=
"RadScheduler1_AppointmentUpdate"
OnFormCreating
=
"RadScheduler1_FormCreating"
OnFormCreated
=
"RadScheduler1_FormCreated"
OnAppointmentDataBound
=
"RadScheduler1_AppointmentDataBound"
OnDataBound
=
"RadScheduler1_OnDataBound"
OnNavigationComplete
=
"RadScheduler1_NavigationComplete"
>
<
WeekView
DayStartTime
=
"06:00:00"
DayEndTime
=
"23:59:00"
WorkDayStartTime
=
"08:00:00"
WorkDayEndTime
=
"18:00:00"
/>
<
DayView
DayStartTime
=
"06:00:00"
DayEndTime
=
"23:59:00"
WorkDayStartTime
=
"08:00:00"
WorkDayEndTime
=
"18:00:00"
/>
<
MonthView
VisibleAppointmentsPerDay
=
"20"
AdaptiveRowHeight
=
"true"
/>
<
TimelineView
SlotDuration
=
"12:00:00"
NumberOfSlots
=
"10"
TimeLabelSpan
=
"2"
ColumnHeaderDateFormat
=
"dddd, MMMM d"
/>
<
ResourceStyles
>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"Out of Office"
ApplyCssClass
=
"rsCategoryViolet"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"After Hours"
ApplyCssClass
=
"rsCategoryRed"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"Projects"
ApplyCssClass
=
"rsCategoryDarkGreen"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"MACs"
ApplyCssClass
=
"rsCategoryGreen"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"VNMS"
ApplyCssClass
=
"rsCategoryDarkBlue"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"IPT/Engineering"
ApplyCssClass
=
"rsCategoryDarkRed"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"Other"
ApplyCssClass
=
"rsCategoryOrange"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"Remote Day"
ApplyCssClass
=
"rsCategoryYellow"
/>
<
telerik:ResourceStyleMapping
Type
=
"Category"
Text
=
"Region Coverage"
ApplyCssClass
=
"rsCategoryPink"
/>
</
ResourceStyles
>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
/>
</
telerik:RadScheduler
>
protected
override
void
OnPreRender(EventArgs e)
{
RadScheduler1.OverflowBehavior = OverflowBehavior.Expand;
base
.OnPreRender(e);
}
<
telerik:RadListBox ID="rlbTag" runat="server" AutoPostBack="false" OnClientItemDoubleClicked="DeleteTags()" Width="250" EnableEmbeddedSkins="true" Height="80px" AllowAutomaticUpdates="true">
<ItemTemplate>
<table width="100%">
<tr>
<td align="left" ><asp:Label ID="lblTags" Text='<%# DataBinder.Eval(Container, "Text") %>' runat="server"></asp:Label></td>
<td align="right"><asp:ImageButton ImageUrl="~/images/Delete.gif" ID="btnDelete" Text="Delete" OnClientClick="return removeItem(event)" runat="server"/></td>
<%
--<asp:CheckBox id="cbUsers" runat="server" OnClick="checkboxReportClick(event);" Text='<%# DataBinder.Eval(Container, "Text") %>' />--%>
</tr>
</table>
</ItemTemplate>
</telerik:RadListBox>
</td>
Following is the implementation of removeItem method which will be triggered when user click on delete button in List Box item template
function
removeItem(e)
{
var RdListBox=$find("<%= rlbTag.ClientID %>");
var item = RdListBox.get_selectedItem();
RdListBox._selectedIndex = 0;
RdListBox.trackChanges();
RdListBox.get_items().remove(item);
RdListBox.commitChanges();
}
When first time user clicks delete button to remove an item, selected item is gettiung null. Seconmd time it gets deleted from the list.
Can anyone help me to acheive remove functionality on cleint side?