Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
411 views
Dear Sir,

I am using Rad Scheduler Control. I have given right Click Contect menu Facility in Given Appointment For Edit.
Also i have given new appointment Contect Menu in blank time Slot.

Its Working Fine.

But i want to hide these menu condition wise.

Like When Appointment status is DEACTIVE Then there is no Option of right click means there is no option when i r do right click.

Same as in case of New Appointment. i want 5 to 6 o'clock no option of right click and other time right click is working.

How can i achive. Please help me.

My Aspx File Code:-
 

 

 

 

<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 

Nencho
Telerik team
 answered on 16 Oct 2015
3 answers
162 views

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.

 

Nencho
Telerik team
 answered on 16 Oct 2015
7 answers
175 views

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

Ianko
Telerik team
 answered on 16 Oct 2015
4 answers
287 views
Hi, 

I'm trying to apply a CSS class to the <p> tag using the "Apply CSS Class".
In the latest version of Chrome the RADEditor adds a new <span> tag around text instead than adding the CSS class to the <p> tag.
Example:  <p><span class="someClass">Text</span></p>

The Firefox correctly handles applying a CSS class to an element selected via the DOM Inspector.
Example:  <p class="someClass">Text</p>

Best regards,
Andrey
Ianko
Telerik team
 answered on 16 Oct 2015
2 answers
50 views
I am very new to telerik, so sorry if you didn't understand my question​,  i'll try my best to explain

I have three links in the rrbmenugroup. see the screen1

if i click on Archive link and follow up it with alert popup, the first one still shows up (it doenst go away). see screen2

Am i missing something in css?

my QA raised the issue that it should go away, any help will be appreciated.
Sajad
Top achievements
Rank 1
 answered on 15 Oct 2015
1 answer
83 views

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

​

Gregory
Top achievements
Rank 2
 answered on 15 Oct 2015
1 answer
398 views

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

Simon
Top achievements
Rank 1
 answered on 15 Oct 2015
9 answers
249 views
Hi,

The documentation and demos don't seem to show much in the way of client-side functionality is this true or can you supply more information?

Essentially I'm looking for a control that can support a multi-level hierarchy where nodes can be dragged on or off the chart. Therefore lets say you have a list of people down one side and you wish to organise them by dragging and dropping them onto the OrgChart. From the looks of it I can't see any client-side functionality for creating/removing nodes. Do you think the functionality I ask is possible to implement (or extend) with this control?

Thanks,
Shane
Vinh
Top achievements
Rank 1
 answered on 15 Oct 2015
1 answer
38 views

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.

Viktor Tachev
Telerik team
 answered on 15 Oct 2015
5 answers
190 views
I am trying to use rad menu for the top navigation in sharepoint custom master page. I noticed that it shows the home tab and every thing under that as a dropdown (2nd level) menu. Is there a way to display it from the second level, so that i see the second levels as the top level.
The hierarchy of my site is -
Home
    - Client
    - Admin
    - Research
I want to see the Client, Admin and Research items as the top level navigation.
Here is the code I have
<telerik:RadMenu ID="TopNavigationMenu" runat="server" DataSourceID="topSiteMap" EnableViewState="false" />
<asp:SiteMapDataSource
     ShowStartingNode="False"
     SiteMapProvider="SPNavigationProvider"
     id="topSiteMap"
     runat="server"
       StartingNodeUrl="sid:1002"
       StartFromCurrentNode="true"
       StartingNodeOffset="0"
       />
GACA
Top achievements
Rank 2
 answered on 15 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?