Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
181 views
Hi,

I have a RAD tree view where in i am loading only few levels of Hierarcy data. When i click on a parent node it gets the child nodes by making a call to the database. So basically Load on Demand works when i click on a parent node.

What i want to achieve is expand all parent nodes Programatically from Javascript i.e when i click expandALL it must load all parent nodes child nodes. Basically i want to trigger the onNodeExpand function (which executes on server) from javascript by looping thru all the parent nodes.


Thanks
-Sekhar
Hristo Valyavicharski
Telerik team
 answered on 13 Jan 2014
12 answers
280 views
Hi,
When I click on the Preview button and then again in the Design editor loses the cursor, I can write but can not see the cursor. I came to that as you click to a different place than the Iframe editor then it works and appears to back the cursor. I did also go to edit my own but it will not come. The error occurs in the latest Firefox, I checked the Opera is working properly. The same error is on your side in the demo.

aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadEditor ID="reEdytor" runat="server" EditModes="All"
            ContentFilters="MakeUrlsAbsolute" Width="100%" Height="93%" AutoResizeHeight="false"
            EnableResize="false" ToolsFile="~/Config/radeditor.xml">
        </telerik:RadEditor>
        <telerik:RadScriptBlock runat="server">
 
            <script type="text/javascript">
                Telerik.Web.UI.Editor.CommandList["FileEdit"] = function(commandName, editor, args) {
                    editor.set_mode(1);
                    setTimeout(function() {
                        editor.setFocus();
                    }, 10);
                }          
            </script>
 
        </telerik:RadScriptBlock>
    </div>
    </form>
</body>
</html>

Config/radeditor.xml

<root>
  <modules>
      <module name="RadEditorStatistics" dockingZone="Bottom" enabled="true" visible="true" dockable="true" />
      <module name="RadEditorDomInspector" dockingZone="Module" enabled="true" visible="true" dockable="true" />
      <module name="RadEditorNodeInspector" dockingZone="Module" enabled="true" visible="true" dockable="true" />
      <module name="RadEditorDiagnostics" dockingZone="Module" enabled="true" visible="true" dockable="true" />
      <module name="RadEditorHtmlInspector" dockingZone="Module" enabled="true" visible="false" dockable="true" />
  </modules>
    <tools enabled="true">
        <tool name="FileEdit"/>
         
    </tools>
 
    <links>
    </links>
     
    <snippets>
    </snippets>
 
    <symbols>
 
    </symbols>
    <fontNames>
    </fontNames>
    <fontSizes>
    </fontSizes>
 
    <colors>
    </colors>
    <classes>
    </classes>
 
    <paragraphs>
    </paragraphs>
 
    <dialogParameters>
    </dialogParameters>
    <languages>
    </languages>
</root>
Rakesh
Top achievements
Rank 1
 answered on 13 Jan 2014
3 answers
444 views
When a user changes the layout of the grid (e.g., by column resize or reorder), I set value that's read on page_load.  If the value is 1, I save the grid settings.  This works fine for column resize, but not for column reorder, the value doesn't get updated (it remains 0).  I have the column order client events pointing to the same event as column resize (as you can see below), but the method is never called.  (I put a breakpoint on the client function and it's only called on column resize, not reorder).

Here's the grid definition:

<telerik:RadGrid
    ID="grdHistory"
    runat="server"
    OnItemCreated="grdHistory_ItemCreated"
    OnItemDataBound="grdHistory_ItemDataBound"
    OnNeedDataSource="grdHistory_NeedDataSource"
    OnPreRender="grdHistory_PreRender"
    OnSortCommand="grdHistory_SortCommand"
    OnPageSizeChanged="grdHistory_SaveSettingsOnClose"
    AutoGenerateColumns="true"
    SkinID="worklist"
    AllowCustomPaging="true"
    AllowPaging="true"
    AllowFilteringByColumn="false"
    Width="99%" >
    <HeaderContextMenu
        OnClientItemClicking="GridHeaderContextMenuOnClientItemClicking">
    </HeaderContextMenu>
    <ClientSettings
        ColumnsReorderMethod="Reorder"
        EnablePostBackOnRowClick="false"
        ReorderColumnsOnClient="False"
        AllowColumnsReorder="True"
        AllowKeyboardNavigation="True">
        <Scrolling AllowScroll="true"
            SaveScrollPosition="true"
            UseStaticHeaders="true" />
        <Resizing ResizeGridOnColumnResize="false"
            AllowColumnResize="true"
            EnableRealTimeResize="false"
            AllowResizeToFit="true" />
        <ClientEvents
            OnColumnShown="SaveSettingsOnClose"
            OnColumnHidden="SaveSettingsOnClose"
            OnColumnResized="SaveSettingsOnClose"
            OnColumnClick="SaveSettingsOnClose"
            OnColumnSwapped="SaveSettingsOnClose"
            OnColumnMovingToLeft="SaveSettingsOnClose"
            OnColumnMovingToRight="SaveSettingsOnClose"
            OnColumnMovedToLeft="SaveSettingsOnClose"
            OnColumnMovedToRight="SaveSettingsOnClose"
            OnMasterTableViewCreated="MasterTableViewCreated"
            OnKeyPress="preventInlineEditing" />
    </ClientSettings>
    <MasterTableView
        commanditemdisplay="None"
        enablecolumnsviewstate="false"
        AllowPaging="True"
        AllowSorting="True"
        Width="100%">
        <HeaderStyle Width="200px" />
        <RowIndicatorColumn Visible="False">
        </RowIndicatorColumn>
    </MasterTableView>
</telerik:RadGrid>

And the method definition:

function SaveSettingsOnClose(sender, eventArgs) {
    triggerIsPostBack = true;
    document.getElementById('<%=hSaveSettingsOnClose.ClientID %>').value = "1";
}

Why isn't the SaveSettingsOnClose method being called when I reorder or sort the columns on the grid?

The second issue has to do with Column sort.  When I sort a column, the server OnSortCommand is called, but when I step through the code and check the grid sort expression count, it's always 0 (even though the visual state of the grid shows the proper sort method).  Here's the OnSortCommand and followon StoreSettings methods:

protected void grdHistory_SortCommand(object sender, GridSortCommandEventArgs e)
{
    StoreLastSort();
 
}


private void StoreLastSort()
{
    if (grdHistory.MasterTableView.SortExpressions.Count > 0)
    {
        //Store the column sorted on for when we reload
        foreach (GridSortExpression gse in grdHistory.MasterTableView.SortExpressions)
        {
            string direction = (gse.SortOrder == GridSortOrder.Ascending) ? "ASC" : "DESC";
            UserSettingHelper.SetUserSetting(SortSettingKey, gse.FieldName + "," + direction);
        }
    }
    else
    {
        UserSettingHelper.DeleteUserSetting(SortSettingKey);
    }
}

Why is the .SortExpressions.Count set to 0 even though the grid appears to be sorted properly when looking at it?
Konstantin Dikov
Telerik team
 answered on 13 Jan 2014
10 answers
289 views
Just want to make sure I'm not missing any options.

I have a screen with an html table and I need to put in multiple rows and columns with many radcombo boxes.  
I'm currently running Version 2012.2.607.40.  For 'political' reasons I can't upgrade at this time.

Is there any way at all to set the labels so that the labels and the dropdowns themselves all line up vertically?
(Other than blanking out the dropdown labels and using separate label controls in separate cells?)

Would upgrading to the latest Telerik control set offer any new options?
Boris
Top achievements
Rank 1
 answered on 13 Jan 2014
1 answer
179 views
Hi,

I am having the error while opening up certain pages:

"Error while executing filter ConvertFontToSpanFilter - InvalidCharacterError: The string contains invalid characters."

I know that I can disable the RadEditor filter and it works fine. But what I would like to know is do I have an option to disable showing this message instead of disabling the filter all together?


Thank you,
Ali.
Ianko
Telerik team
 answered on 13 Jan 2014
3 answers
215 views
Hello Forum,

My Name is Lukas, I am new to the Telerik Controls. First i want to say that these controls helped me a lot an you musst keep up your nice work!

So now to my Problem:

I got a Grid on my aspx.net Site filled with an EntityDataSource. The Data for this comes from an SQL-Server. On the Top of this Site there is an DropDownList filled with some example companys.

So when i change the company of the DropDownList i want to apply a Filter to the "CompanyID"-Row in the Grid-View with the Index of the selected Item in the DropDownList.

I got the Event from the DropDownList and the only thing i want to know is how i can filter the "CompanyID"-Row from the Grid to the selected Index of the DropDownList. So that the Grid only shows the data where "CompanyID" is for example 4.

Is this possibly and can you give me an example how to do that? I searched a lot in this forum but haven´t found an simple answer for this case.

Kind regards
Lukas
Lukas
Top achievements
Rank 1
 answered on 13 Jan 2014
2 answers
154 views

I would like to disable my menu item based on the Active directory login.

I am using SQL data source, My ASPX page and Menu control look like this

<telerik:RadMenu ID="RadMenu1" Runat="server" DataFieldID="ID"

    DataFieldParentID="Parent" DataNavigateUrlField="Url"

    DataSourceID="SqlDataSource1" DataTextField="Title" Skin="Glow"

         EnableRoundedCorners="true" style="z-index: 100000; left: 0px; top: 52px; position: absolute">

        <DefaultGroupSettings ExpandDirection="Down" RepeatDirection="Horizontal" />

</telerik:RadMenu>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

    ConnectionString="<%$ ConnectionStrings:PROJECT_STATUS %>"

    SelectCommand="PRS_GetWebSiteSiteMap" SelectCommandType="StoredProcedure">

</asp:SqlDataSource>

 I have another table which tell me the user login ID and pageID he has access to. So What I want based on the User login I would like to enable the menu pages.

So User Chris with domain\Chris only access to page 1,3,5. The menu control of page 1,3,5 are enabled and remaining all the of the menu control will be disabled.

I hope someone will be able to help me out

Thanks

Syed

Kate
Telerik team
 answered on 13 Jan 2014
3 answers
170 views
Hi,

I have a rad scheduler to show appointments and i have recently modified it to use web service binding. I have few client side events on it and one of it is OnClientAppointmentClick. When i click on an appointment, i want a new rad panel to show up adjacent to the scheduler. For this i use a dummy button to post back on the OnClientAppointmentClick event. The issue is that after modifying  the scheduler to web service binding, the OnClientAppointmentClick event seems to take for ever to load and it is affecting the performance. I am not sure if this is caused because post back is causing a conflict to the web service or not.

<telerik:RadScheduler runat="server"  ID="rsTicketsSchedule"
                                    OnResourcesPopulating="rsTicketsSchedule_ResourcesPopulating"
                                    SelectedView="TimelineView"
                                    OnTimeSlotCreated="rsTicketsSchedule_TimeSlotCreated"
                                    OnClientAppointmentsPopulated="OnClientAppointmentsPopulated"
                                          OnClientAppointmentsPopulating="OnClientAppointmentsPopulating"
                                    OnClientResourcesPopulating="OnClientResourcesPopulating"
                                    AppointmentStyleMode="Default"
                                    OnClientAppointmentClick="singleClick"
                                    OnClientAppointmentCreated="OnAppointmentCreated"
                                    OnClientAppointmentDoubleClick="rsClientAppointmentDoubleClick"
                                    OnClientAppointmentMoveEnd="AppointmentMoved"
                                    OnClientAppointmentResizeStart="OnAppointmentResizeStart"
                                    OnClientAppointmentResizeEnd="OnAppointmentResizeEnd"
                                    OnClientAppointmentWebServiceDeleting="OnAppointmentDeleting"
                                    OnClientAppointmentWebServiceUpdating="OnAppointmentUpdating"
                                    OnClientRequestSuccess="OnClientRequestSuccess"
                                    OnClientRequestFailed="OnClientRequestFailed"
                                    OnClientAppointmentMoveStart="StopTimer"
                                    OnClientAppointmentDataBound="OnClientAppointmentDataBound"
                                    OnClientDataBound="onSchedulerDataBound"
                                    AllowInsert ="False"
                                    DisplayDeleteConfirmation="True"
                                    Localization-HeaderToday="Today"
                                    EnableCustomAttributeEditing="True"
                                    EnableDescriptionField="True"
                                    Height="100%"
                                    EnableExactTimeRendering="true"
                                    EnableViewState="true"
                                    OverflowBehavior="Scroll"
                                    ShowAllDayRow ="false"  
                                    OnClientAppointmentContextMenu ="OnClientAppointmentContextMenu"
                                    OnClientAppointmentContextMenuItemClicked="handleClick"
                                    OnClientNavigationComplete = "OnClientNavigationComplete"
                                    OnClientNavigationCommand  = "OnClientNavigationCommand"
                                >
                                
                                <DayView UserSelectable="True" GroupBy="TechName" GroupingDirection="Horizontal" />
                                <WeekView UserSelectable="True" GroupBy="TechName" GroupingDirection="Vertical"  />
                                <MonthView UserSelectable="True" GroupBy="TechName" GroupingDirection="Vertical"  />
 
                                <TimelineView 
                                    GroupBy="TechName"
                                    ColumnHeaderDateFormat="h:mm tt"
                                    GroupingDirection="Vertical"
                                    HeaderDateFormat="MM/dd/yyyy h:mm tt"
                                    NumberOfSlots ="21" 
                                    SlotDuration="00:30:00"
                                    StartTime="08:00:00"  />
 
                                      <WebServiceSettings   Path="WorkforceServices/M4SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" />
 
                                <AppointmentContextMenus >
                                    <telerik:RadSchedulerContextMenu ID="RsTicketsScheduleContextMenu" runat="server"   > </telerik:RadSchedulerContextMenu>
                                </AppointmentContextMenus>
 
                                <ResourceTypes>
                                    <telerik:ResourceType Name="TechName" />
                                    <telerik:ResourceType Name="TicketState" />
                                </ResourceTypes>
 
                      </telerik:RadScheduler>

This is the client side event I have the issue with:

OnClientAppointmentClick="singleClick"

function singleClick(sender, eventArgs) {
    var apptID1 = eventArgs.get_appointment().get_id();
    apptIDInfo = "ShowRadTabStrip|" + apptID1 + "|ApptID";
    __doPostBack("TestPanel1UpdBtn", apptIDInfo);  //Causes Postback to show RadTabstrip for TicketInfo
    return false;
}

Is there any way I can improve this?

Thanks,

Meera
Boyan Dimitrov
Telerik team
 answered on 13 Jan 2014
3 answers
54 views
Hi,

When using the scheduler in the week view (mo - fr) (what most of us do), it's difficult to see which timeslot you have selected when mo - th is completely full with appointments (see attachment).

Is there a way to show the hours column also on the right side of the scheduler?
If not, how can we easily show the user the time of the timeslot he is using (tooltip or indicator on the hourscolumn or ????)

Thanks and best regards,
Egbert
Nencho
Telerik team
 answered on 13 Jan 2014
3 answers
254 views
Chrome 31 causes (some of) the RadEditor dialogs to break - they become very small and unusable when the content is received: http://screencast.com/t/XYWdPxSYloE.

This seems to be a browser issue and it does not manifest with the next official beta. The investigation is ongoing and if the problem is not fixed in the next official Chrome release fixes will be considered in our source code.

In the meantime, there are two possible workarounds:

1) force a resizing of the dialog when the command is executed:
<telerik:RadEditor runat="server" ID="RadEditor1"
    OnClientCommandExecuted="editorCommandExecuted">
</telerik:RadEditor>
<script type="text/javascript">
    function editorCommandExecuted(editor, args) {
        if (!$telerik.isChrome)
            return;
        var dialogName = args.get_commandName();
        var dialogWin = editor.get_dialogOpener()._dialogContainers[dialogName];
        if (dialogWin) {
            var cellEl = dialogWin.get_contentElement() || dialogWin.ui.contentCell || dialogWin.ui.content,
            frame = dialogWin.get_contentFrame();
            frame.onload = function () {
                cellEl.style.cssText = "";
                dialogWin.autoSize();
            }
        }
    }
</script>


OR

2) use browser windows instead of RadWindows for the dialogs:
<asp:ScriptManager runat="server" />
<telerik:RadEditor runat="server" ID="RadEditor1"
    OnClientLoad="OnClientLoad">
</telerik:RadEditor>
<script type="text/javascript">
    function OnClientLoad(editor) {
        if ($telerik.isChrome)
            editor.set_useClassicDialogs(true);
    }
</script>

MailUp Dev
Top achievements
Rank 1
 answered on 13 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?