Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
515 views

Hello,

I'm trying to write a custom filtering for the RadDropDownTree however i'm faced some performance issues. Here is my JS code :

function OnHierarchicalClientLoad_<%= ClientID %>(sender, eventArgs) {
            var dropDownTree = $find("<%= RadDropDownTree.ClientID %>");
 
            var typingTimer;                //timer identifier
            var doneTypingInterval = 1000;  //time in ms, 5 second for example
 
            $input = $("<input type=\"search\" class=\"search-field\" name=\"the_search\">");
 
            $input.on('keyup', function () {
                clearTimeout(typingTimer);
                typingTimer = setTimeout(function () {
                    $value = $input.val();
                    var tree = dropDownTree.get_embeddedTree();
                    tree.trackChanges();
                    var nodes = tree.get_nodes();
                    for (var i = 0; i < nodes.get_count() ; i++) {
                        var node = nodes.getNode(i);
                        SetHierarchicalComboBoxItemVisibility(node, $value);
                    }
                    tree.commitChanges();
                }, doneTypingInterval);
            });
 
            $input.on('keydown', function () {
                clearTimeout(typingTimer);
            });
 
            $("#<%= RadDropDownTree.ClientID %> .rddtHeader").append($input);
                
        }  
 
         function SetHierarchicalComboBoxItemVisibility(node, filter) {
             var isVisible = false;
             var allNodes = node.get_allNodes();
             for (var i = 0; i < allNodes.length; i++) {
                 var childNode = allNodes[i];
                 isVisible = SetHierarchicalComboBoxItemVisibility(childNode, filter);
             }
             isVisible = (isVisible || filter == "" || node.get_text().toLowerCase().indexOf(filter.toLowerCase()) != -1);
             node.get_element().style.display = isVisible ? "" : "none"; //Workaround
             //node.set_visible(isVisible); //performance too slow
             return isVisible;
         }

 

As you can see I used a workaround because the set_visible() function is too slow when there is a bit amount of nodes (some thousands). It seems that it use some functions that do some css stuffs on sibling node as ensureAppearance().

So I have two questions :

- Is there a way to optimise the use of set_visible() function on a huge amount of nodes ?

- Else, is my workaround may cause problems?

 

Thank you,

Veselin Tsvetanov
Telerik team
 answered on 22 Nov 2016
1 answer
200 views

We interested your radgant product but we don't achive to show taski in grand.Also we tried every thing explained in telerik demo cenrter.

In this case how can help you to us.

I have attached the test project.

thanks.

 

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI.Gantt" tagprefix="cc1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns='http://www.w3.org/1999/xhtml'>
<head id="Head1" runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" />
 
    <div class="demo-container no-bg">
        <telerik:RadGantt RenderMode="Lightweight" ID="RadGantt1" 
            runat="server" 
             DataSourceID="SqlDataSource1"  
             DependenciesDataSourceID="SqlDataSource2"          
            ReadOnly="true" 
            SelectedView="WeekView">
            <DataBindings>
                <TasksDataBindings IdField="ID" ParentIdField="ParentID" StartField="Start" OrderIdField="OrderID" SummaryField="Summary" ExpandedField="Expanded" EndField="End" TitleField="Title"
                    PercentCompleteField="PercentComplete" />
                <DependenciesDataBindings TypeField="Type" IdField="ID" PredecessorIdField="PredecessorID" SuccessorIdField="SuccessorID" />
            </DataBindings>
        </telerik:RadGantt>
    </div>
 
    <asp:SqlDataSource runat="server" ID="SqlDataSource1" SelectCommand="SELECT * FROM [GanttTasks]" ConnectionString="<%$ ConnectionStrings:FLOWPOTAConnectionString %>"/>
    <asp:SqlDataSource runat="server" ID="SqlDataSource2" SelectCommand="SELECT * FROM [GanttDependencies]" ConnectionString="<%$ ConnectionStrings:FLOWPOTAConnectionString %>"/>
   

    </form>
</body>
</html>

 

 

Anton
Telerik team
 answered on 22 Nov 2016
2 answers
413 views

Hi,

I have created a template column and bound it to a RadGrid.

However, I would like to implement drop down filtering on the column as you describe here:

http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx

Can you clarify if this is possible to achieve using a grid template column?

I raised a support ticket about this back in Feb 2016 and got the following response:

Hello Richard,

Thank you for contacting us.

You can add a RadComboBox control as a filter item of the TemplateColumn the same way as you did with a BoundColumn. Generally you need to implement a FilterItemTemplate and use pretty much the same approach as the one from the demo.

I hope this information helps. 

Regards,
Kostadin 
Telerik

I have tried this approach and I get problems. Could you please show me an example or post some code here?

Here is the definition of my Template column:

            GridTemplateColumn templateColumn = new GridTemplateColumn();
            templateColumn.ItemTemplate = new GenericGridLinkedItemTemplateColumn(columnName, displayName, listName, lookupType, ActiveColumnName, ItemActiveValue, popoverUrl, itemType, headerText.Replace(" ", string.Empty), genericGridUrl, tab);
            templateColumn.UniqueName = columnName;
            templateColumn.HeaderText = headerText;
            templateColumn.AllowFiltering = true;
            templateColumn.CurrentFilterFunction = GridKnownFunction.Contains;
            templateColumn.AutoPostBackOnFilter = true;
            templateColumn.ShowFilterIcon = false;
            templateColumn.DataField = columnName;

At the moment it renders a text box to filter by, I would like to change it to a dropdown list.
Eyup
Telerik team
 answered on 22 Nov 2016
3 answers
135 views

How do I remove the slider header (where the title 'More Options' and 'X' is being displayed in my code below)?

 

<telerik:RadSplitter RenderMode="Lightweight" ID="RadSplitter1" Width="100%" BorderStyle="None" BackColor="#353535" runat="server" Orientation="Horizontal">
                    <telerik:RadPane ID="RadPane1" runat="server" Width="100%" Height="25px">
                        <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" Width="100%" SlideDirection="Top">
                            <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="More Options" Width="100%" EnableDock="false" Height="100px">
                                <div class="table">
                                    <telerik:RadPushButton ID="btnReassign" runat="server" ToolTip="Click to change the assignment of this request" Text="Reassign" Skin="Bootstrap"></telerik:RadPushButton>
                                    <telerik:RadPushButton ID="btnUpdate" runat="server" ToolTip="Click to update this request" Text="Update" Skin="Bootstrap"></telerik:RadPushButton>
                                    <telerik:RadPushButton ID="btnComplaint" runat="server" ToolTip="Click to flag this request as a complaint" Text="Complaint" Skin="Bootstrap"></telerik:RadPushButton>
                                    <telerik:RadPushButton ID="btnClose" runat="server" ToolTip="Click to complete this request" Text="Complete" Skin="Bootstrap"></telerik:RadPushButton>
                                    <telerik:RadPushButton ID="btnLogs" runat="server" ToolTip="Click to view the logs for this request" Text="Logs" Skin="Bootstrap"></telerik:RadPushButton>
                                </div>
                            </telerik:RadSlidingPane>
                        </telerik:RadSlidingZone>
                    </telerik:RadPane>
                </telerik:RadSplitter>

Marin Bratanov
Telerik team
 answered on 22 Nov 2016
2 answers
337 views

Hi,

Whenever my page posts back all data in the spreadsheet is lost - is this expected behaviour?

I haven't tried this by loading a file but assume it will work the same way as I am doing it ie. populating data manually into cells.

Ivan Danchev
Telerik team
 answered on 22 Nov 2016
0 answers
139 views
We have implemented Radcombobox for multiselect drop-down. I really need help to implement cascading drop-down on Radcombobox multiselect through client side functionality. Any help or suggestion or reference would be really helpful??
Bala
Top achievements
Rank 1
 asked on 22 Nov 2016
2 answers
1.2K+ views

 I have added my RadDateTimePicker to a asp:Repeater. on first load the data binding will be empty and this cause the error Value of '1/1/0001 12:00:00 AM' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'

i would like to know how to i set the selecteddate to empty string or null value.

i have tried to set the selecteddate to current datetime, but it screw up the timepicker format and the interval setting

 

i tried doing  DateTime.Now.ToString("dd/MM/yyy HH:mm") and got the error

System.FormatException: String was not recognized as a valid DateTime

 

my markup

01.<asp:Repeater ID="rptReplyDate" runat="server" OnItemDataBound="rptReplyDate_ItemDataBound">
02.    <HeaderTemplate>
03.        <table cellpadding="0px" cellspacing="0px" class="mainTable">
04.    </HeaderTemplate>
05.    <FooterTemplate>
06.        </table>
07.    </FooterTemplate>
08.    <ItemTemplate>
09.        <tr>
10.            <td style="padding: 1em 1em;">
11.                <table cellpadding="0px" cellspacing="0px" class="repeaterTable">
12.                    <tr>
13.                        <td>
14.                            <telerik:RadDateTimePicker ID="txtReplayDate" runat="server" SelectedDate='<%# Convert.ToDateTime( DataBinder.Eval(Container.DataItem, "completetion")) %>'>
15.                                <TimeView TimeFormat="HH:mm:ss" runat="server">
16.                                </TimeView>
17.                                <DateInput DisplayDateFormat="dd/MM/yyyy HH:mm" runat="server">
18.                                </DateInput>
19.                            </telerik:RadDateTimePicker>
20.                        </td>
21.                    </tr>
22.                     
23.                </table>
24.            </td>
25.        </tr>
26.    </ItemTemplate>
27.</asp:Repeater>

my code

01.protected void Page_Load(object sender, EventArgs e)
02.        {
03.            if (!Page.IsPostBack)
04.            {
05.                List<ReplayDate> col = new List<ReplayDate>();
06.                ReplayDate newData = new ReplayDate();
07.                newData.completetion = DateTime.Now.ToString();
08.                newData.id = 0;
09.                col.Add(newData);
10.                rptReplyDate.DataSource = col;
11.                rptReplyDate.DataBind();
12. 
13.             }
14.}
15.    public class ReplayDate
16.    {
17.        public int id { get; set; }
18.        public string completetion { get; set; }
19.    }
Benjamin
Top achievements
Rank 1
 answered on 22 Nov 2016
0 answers
123 views

I'm trying to access the InnerText for a header on the website I am testing, but I'm not able to get the string.  It keeps telling me that there isn't a definition for InnerText. I previously used InnerText to get the text from a Span - is there another keyword or, rather, how would i go about doing this??

 

Thank you,

 

M

Maxwell
Top achievements
Rank 1
 asked on 21 Nov 2016
2 answers
193 views

Hi,

I had a page that uses radmenu and it works just fine with the metro theme. As soon as I add a RadSpreadsheet control to my form then the styling of the menu goes haywire (colour is different, text is black instead of white), remove the spreadsheet control and all is back to normal again. What could cause this?

Magdalena
Telerik team
 answered on 21 Nov 2016
5 answers
435 views
Hello,

    I have two application. In one application i am using rad control version of 2007 and in another application i am using rad control 2008. My problem is when i enter text in rad editor in 2008 version which contents single line space between paragraphs. and save it in the database with rad control version 2008 and when i open the same text in radeditor version of 2007 it gives me three line space between paragraph. Can you help in this issue which is very Urgently required.

Thanks & Regards,
R. Vikram Goud
Rumen
Telerik team
 answered on 21 Nov 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?