<telerik:RadScheduler AllowInsert="false" HoursPanelTimeFormat="hh:mm tt" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
OnAppointmentCreated="RadScheduler1_AppointmentCreated" runat="server" ID="RadScheduler1"
Skin="Office2007" Height="545px" CustomAttributeNames="StatusId" Width="690px"
ShowFooter="false" SelectedDate="2010-03-18" DayStartTime="07:00:00" DayEndTime="21:00:00"
FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableDescriptionField="true"
ShowNavigationPane="false" OnAppointmentDelete="RadScheduler1_AppointmentDelete"
DataSubjectField="Subject" DataStartField="FromTime" DataEndField="ToTime" ShowAllDayRow="false"
AllowEdit="false" DataKeyField="AppointmentId" DataDescriptionField="StatusColor" OnTimeSlotContextMenuItemClicked="RadScheduler1_TimeSlotContextMenuItemClicked"
AllowDelete="false" OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"
OnNavigationCommand="RadScheduler1_NavigationCommand" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated">
<AppointmentContextMenuSettings EnableDefault="false" />
<TimelineView UserSelectable="false" />
<AppointmentTemplate>
<%
# Eval("Subject")%>
<br />
<asp:Label runat="server" ID="Teacher" />
<br />
<asp:Label runat="server" ID="Students" />
</AppointmentTemplate>
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" DataTextField="Status" DataValueField="StatusId"
ID="SchedulerAppointmentContextMenu" AppendDataBoundItems="true">
<Items>
<telerik:RadMenuItem Text="Copy" Value="Copy" />
<telerik:RadMenuItem IsSeparator="True" />
<telerik:RadMenuItem Text="Edit" Value="Edit" />
<telerik:RadMenuItem IsSeparator="True" />
</Items>
</telerik:RadSchedulerContextMenu>
</AppointmentContextMenus>
<TimeSlotContextMenus>
<telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
<Items>
<telerik:RadMenuItem Text="New Appointment" Value="New" />
<telerik:RadMenuItem IsSeparator="true" />
<telerik:RadMenuItem Text="Paste" Value="Paste" />
</Items>
</telerik:RadSchedulerContextMenu>
</TimeSlotContextMenus>
<TimeSlotContextMenuSettings EnableDefault="False" />
</telerik:RadScheduler>
My Cs Page Code:-
Page Load ()
{
if
(ds.Tables[0].Rows.Count > 0)
{
RadScheduler1.SelectedDate = CalApp.SelectedDate;
RadScheduler1.DayStartTime =
TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[0].ToString());
RadScheduler1.DayEndTime =
TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[1].ToString());
RadScheduler1.MinutesPerRow =
int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());
RadScheduler1.TimeLabelRowSpan = 60 /
int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());
RadScheduler1.DataKeyField =
"AppointmentId";
RadScheduler1.DataStartField =
"FromTime";
RadScheduler1.DataEndField =
"ToTime";
RadScheduler1.DataSubjectField =
"Subject";
RadScheduler1.GroupBy =
"Resource";
RadScheduler1.ResourceTypes.Clear();
ResourceType rt = new ResourceType("Resource");
rt.DataSource = ds.Tables[2];
rt.KeyField =
"ResourceId";
if (ddlFacility.SelectedValue == "0")
{
rt.ForeignKeyField =
"FacilityId";
}
else
{
rt.ForeignKeyField =
"DoctorId";
}
rt.TextField =
"ResourceName";
RadScheduler1.ResourceTypes.Add(rt);
RadScheduler1.DataSource = ds.Tables[1];
RadScheduler1.DataBind();
lblFacility.Text = ddlFacility.SelectedItem.Text;
}
else
{
Alert.ShowAjaxMsg("There is no time define in selected provider and facility.", Page);
}
DataSet
Statusdt = new DataSet();
Statusdt = GetAppointmentStatus();
SchedulerAppointmentContextMenu.DataSource = Statusdt;
SchedulerAppointmentContextMenu.DataBind();
}
DataSet
GetAppointmentStatus()
{
DataSet ds = new DataSet();
Hashtable HashIn = new Hashtable();
DAL.
DAL dl = new DAL.DAL(DAL.DAL.DBType.SqlServer, sConString);
DataSet Reasondt = new DataSet();
Reasondt = dl.FillDataSet(
CommandType.Text, "Select * From AppointmentStatus(" + Session["HospitalLocationID"] + ")" );
return Reasondt;
}
Thanks
Chandan
As showed on the piece of code bellow, I have a TabStrip with a multipage. When the page first loads, a grid is loaded. When the user clicks a row from the grid, a new tab opens with the details of that row.
If I put the RadPageView to 100% height the grid is cut off as it's not adapting to the height of the grid. If I put a static value, it doesn't adapt to different window sizes.
I tried to correct this issue using the javascript posted bellow. While it works when I resize the window, when the page first loads, it's not resizing. If you check the line 9. of the JS, you can see that on the (document).ready I try to force the new size but nothing happens.
You can see what is happening on the 2 files I attached. Is there anyway I can resolve this issue?
<
telerik:RadTabStrip
ID
=
"tabContactsList"
runat
=
"server"
MultiPageID
=
"ContactsPagesViews"
Orientation
=
"HorizontalTop"
SelectedIndex
=
"0"
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"ContactsPagesViews"
ScrollBars
=
"Auto"
Height
=
"100%"
RenderMode
=
"Lightweight"
runat
=
"server"
OnPageViewCreated
=
"ContactsPagesViews_PageViewCreated"
SelectedIndex
=
"0"
>
<
telerik:RadPageView
ID
=
"RadPageView1"
runat
=
"server"
Height
=
"100%"
>
<
telerik:RadGrid
runat
=
"server"
ID
=
"RadGrid1"
DataSourceID
=
"dtContactsList"
AllowFilteringByColumn
=
"True"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
Height
=
"100%"
BorderWidth
=
"0px"
AllowSorting
=
"True"
Style
=
"outline: none"
EnableLinqExpressions
=
"False"
ShowGroupPanel
=
"true"
FilterMenu-Enabled
=
"true"
FilterType
=
"Classic"
OnItemCommand
=
"RadGrid1_ItemCommand"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
>
<
ExportSettings
><
Pdf
PageWidth
=
""
></
Pdf
></
ExportSettings
>
<
ClientSettings
Scrolling-AllowScroll
=
"false"
Scrolling-UseStaticHeaders
=
"true"
Selecting-AllowRowSelect
=
"true"
EnablePostBackOnRowClick
=
"true"
AllowDragToGroup
=
"true"
EnableRowHoverStyle
=
"true"
>
<
Selecting
AllowRowSelect
=
"True"
/>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
SaveScrollPosition
=
"true"
FrozenColumnsCount
=
"2"
></
Scrolling
>
</
ClientSettings
>
<
PagerStyle
Mode
=
"NumericPages"
PageSizeControlType
=
"None"
></
PagerStyle
>
<
MasterTableView
TableLayout
=
"Fixed"
Width
=
"100%"
ClientDataKeyNames
=
"ID"
PageSize
=
"16"
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"CheckBoxTemplateColumn"
AllowFiltering
=
"false"
>
<
ItemStyle
Width
=
"40px"
/>
<
HeaderStyle
Width
=
"40px"
/>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"CheckBox1"
runat
=
"server"
OnCheckedChanged
=
"ToggleRowSelection"
AutoPostBack
=
"True"
/>
</
ItemTemplate
>
<
HeaderTemplate
>
<
asp:CheckBox
ID
=
"headerChkbox"
runat
=
"server"
OnCheckedChanged
=
"ToggleSelectedState"
AutoPostBack
=
"True"
/>
</
HeaderTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"Id"
DataType
=
"System.Int32"
HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerId_HeaderText %>" AllowFiltering="false" UniqueName="Id" Display="false" HeaderStyle-Width="25px">
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Name"
FilterControlAltText
=
"Filter Name column"
HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerName_HeaderText %>" SortExpression="Name" UniqueName="Name" DataType="System.String">
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"City"
DataType
=
"System.String"
FilterControlAltText
=
"Filter City column"
HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerCity_HeaderText %>" SortExpression="City" UniqueName="City" ItemStyle-Width="15%" HeaderStyle-Width="15%">
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Country.Name"
DataType
=
"System.String"
FilterControlAltText
=
"Filter Country column"
HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerCountry_HeaderText %>" SortExpression="Country" UniqueName="Country" ItemStyle-Width="15%" HeaderStyle-Width="15%">
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Address"
FilterControlAltText
=
"Filter Address column"
HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerAddress_HeaderText %>" SortExpression="Address" UniqueName="Address" DataType="System.String" ItemStyle-Width="25%" HeaderStyle-Width="25%">
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Phone"
DataType
=
"System.String"
FilterControlAltText
=
"Filter Phone column"
HeaderText="<%$ Resources:ContactManager.aspx, lblContactManagerPhone_HeaderText %>" SortExpression="Phone" UniqueName="Phone" ItemStyle-Width="10%" HeaderStyle-Width="10%">
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
FilterMenu
CssClass
=
"RadFilterMenu_CheckList"
>
</
FilterMenu
>
</
telerik:RadGrid
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
<
asp:ObjectDataSource
ID
=
"dtContactsList"
runat
=
"server"
DeleteMethod
=
"DeleteContact"
SelectMethod
=
"GetAllContacts"
TypeName
=
"LCG.Web.IAMS.AWA.Pages.ContactManager"
>
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"ctl00$ContentPlaceHolder1$RadTreeView1"
Name
=
"priorityId"
PropertyName
=
"SelectedValue"
Type
=
"Int32"
/>
</
SelectParameters
>
</
asp:ObjectDataSource
>
<telerik:RadScriptBlock runat=
"server"
ID=
"RadScriptBlock1"
>
<script type=
"text/javascript"
>
$(document).ready(
function
() {
$(window).resize(
function
() {
ResizePage($find(
'<%= ContactsPagesViews.ClientID %>'
))
});
ResizePage($find(
'<%= ContactsPagesViews.ClientID %>'
))
});
function
ResizePage(multiPage) {
for
(i = 0; i < multiPage.get_pageViews().get_count() ; i++) {
var
pageView = multiPage.get_pageViews().getPageView(i);
pageView.get_element().style.height = ($(window).height() - 80) +
'px'
;
}
}
</script>
</telerik:RadScriptBlock>
Thank you.
Hi,
I have a problem with Editor. When I copy content from word and paste it in the Editor (Ctrl+V) in our website line height automatically changes even if I set the StripFormattingOptions property to ‘NoneSupressCleanMessage’.
I have also tried this on telerik’s demo site and the issue occurs there as well:
http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx
See the snapshot of the original document and the content
after pasting in the radeditor
You can see that in the html mode the line height is being
set to 115%. The line height should have been identical to that in MS Word
Please I need this issue to be solved ASAP.
I have attached the snapshots of the site and word file
Hello,
I have a radGrid where I create the columns dynamically (according to the settings of the user, they decide which column to view). I have have a NestedViewTemplate not created dynamically.
After the grid is loaded, I look at the structure of the html code of the grid and I do not see the invisible row corresponding to the nested template.
I am not sure if I should add something to relate the NestedViewTemplate when creating dynamically the columns?
<
telerik:RadGrid
ID
=
"rgRate"
runat
=
"server"
OnNeedDataSource
=
"rgRate_NeedDataSource"
OnItemDataBound
=
"rgRate_ItemDataBound"
OnItemCreated
=
"rgRate_ItemCreated"
OnSortCommand
=
"rgRate_SortCommand"
OnItemCommand
=
"rgRate_ItemCommand"
Skin
=
"Investor1"
EnableEmbeddedSkins
=
"false"
ClientSettings-EnablePostBackOnRowClick
=
"false"
AllowSorting
=
"true"
AllowPaging
=
"true"
AutoGenerateColumns
=
"false"
AllowMultiRowSelection
=
"false"
PagerStyle-Mode
=
"NumericPages"
PagerStyle-AlwaysVisible
=
"true"
ShowFooter
=
"false"
MasterTableView-NoMasterRecordsText
=
"No Records found."
SortingSettings-EnableSkinSortStyles
=
"true"
>
<
ExportSettings
>
<
Csv
ColumnDelimiter
=
"Tab"
RowDelimiter
=
"NewLine"
FileExtension
=
"TXT"
/>
</
ExportSettings
>
<
ClientSettings
EnableRowHoverStyle
=
"true"
AllowColumnsReorder
=
"false"
EnablePostBackOnRowClick
=
"false"
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
Resizing
AllowColumnResize
=
"false"
EnableRealTimeResize
=
"false"
/>
<
ClientEvents
OnGridCreated
=
"radGrid_onGridCreated"
/>
</
ClientSettings
>
<
MasterTableView
ShowHeadersWhenNoRecords
=
"true"
TableLayout
=
"fixed"
Width
=
"100%"
ExpandCollapseColumn-Visible
=
"false"
AllowNaturalSort
=
"false"
DataKeyNames
=
"key1, key2, ..."
CommandItemDisplay
=
"Top"
>
<
CommandItemTemplate
>
.....
</
CommandItemTemplate
>
<
NestedViewTemplate
>
<
div
>...</
div
>
</
NestedViewTemplate
>
<
PagerTemplate
>
<
div
>
...
</
div
>
</
PagerTemplate
>
</
MasterTableView
>
</
telerik:RadGrid
>
Thank you
Gregory
​
I have a RadButton on an ASPX page and I am trying to enable a disabled button in the code behind page.
I have no problem enabling ​on ​the client side (via set_enabled method), is there a magic trick to doing it in C# on the server side?
Code is:
void fileList_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
btnSave.Enabled = true;
}
Thank you,
SM
I have created a large form which I wanted to implement Ajax on some parts. I am very new to Ajax and ASP.NET and was wondering how I should go about it.
The questions are mostly "yes" or "no" RadComboBox selections except one with the "other" option. There is one part of the form where if the user selects "yes" then a checkbox will appear. If the user selects "no" then the checkbox will not be visible to them. In another part if the user selects "yes" there is another question that will appear right below, and if they select no then it will stay hidden.In the last part of the form that needs implementation if the user selects "yes" a textbox will appear, if they select "no" a checkbox will appear, and if they select "other" a different textbox will appear.