Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
287 views

Hello,

I have a web page which is using RadTreeView. It works well, now we want to support WCAG 2.0 after set EnableAriaSupport = True the RadTreeView doesn't work as before it causes the page scrolls back to the top because the tree jumps to the previous selected node when expand/select nodes at very last of the tree. 

See attached files for details

You also find this issue on the page https://demos.telerik.com/aspnet-ajax/treeview/examples/accessibility/defaultcs.aspx. 

Could you please advise how to keep the tree doesn't jump back to previous selected node

 

Thanks

 

Peter Milchev
Telerik team
 answered on 05 Aug 2019
10 answers
1.8K+ views
Hello,

I have a RadTreeView that has nodes that use NodeExpandMode.ServerSide and I need to have the web page focus on the selected node after post back. I found the following code from these forums to do that:

ScriptManager.RegisterStartupScript(
this, GetType(), ClientID,
string.Format("Sys.Application.add_load(function(){{$find('{0}').get_element().focus();}}, 0);", AppTreeView.ClientID), 
true);

Unfortunately, this project was made in Visual Studio 2005 which only has the .NET version of 2.0 which doesn't have the ScriptManager class.

I was wondering if RadScriptManager would be able to provide this functionality, and if so, could I be provided with an example on how to do this?

Thanks,
Matt
Rumen
Telerik team
 answered on 05 Aug 2019
1 answer
79 views

We have been using the ASP.NET AJAX UI product for a client since 2012. I have had 8 staff members working on it full time since 2012 so as you can imagine, this is a gigantic application. Over the years the client has requested more and more features and the most important page in the application is now very heavy and taking a minute and a half to load out in the field on a tablet. The frustration level is at a breaking point. We absolutely must improve performance.

1. Do you think upgrading to the latest version would give us a significant performance boost?

2. If we upgrade are we going to introduce a whole host of new issues?

3. What are the best tips/tricks for optimising pages heavey with telerik grids, tabs and dropdowns?

-Lance Keene

Rumen
Telerik team
 answered on 05 Aug 2019
3 answers
181 views

I increased font on the legend, but stick color marker didn't increase accordingly.

Is there a way to access this through css or otherwise.

Attached current and desired pics

Thank you

 

Vessy
Telerik team
 answered on 02 Aug 2019
10 answers
1.1K+ views
Hi,
I have paging enabled in my radgrid and a pageindexchanged event defined.But on clicking on the next page button the pageindex doesn't change and the pageindexchaged event doesn't get fired.
Eyup
Telerik team
 answered on 02 Aug 2019
1 answer
241 views

Good morning.

I have a problem with Chrome for Android and RadComboBox in RadGrid.
When I click on the combo nothing happens. Using Chrome dekstop and DevTools to simulate a Nexus 7 I can read this error:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See <URL>

https://www.chromestatus.com/features/5093566007214080

 

The error comes from Telerik.Web.UI.WebResource.axd 

preventDefault @ Telerik.Web.UI.WebRe…289%3aed16cbdc:1133
_cancelEvents @ Telerik.Web.UI.WebRe…289%3aed16cbdc:4652
_compositeDragger @ Telerik.Web.UI.WebRe…289%3aed16cbdc:4604
i @ Telerik.Web.UI.WebRe…289%3aed16cbdc:1133
dispatch @ Telerik.Web.UI.WebRe…289%3aed16cbdc:1133
v.handle @ Telerik.Web.UI.WebRe…289%3aed16cbdc:1133

 

I use Telerik with 2013.1.417.40 version.

I can solve this problem? In dekstop I do not find this problem.

Vessy
Telerik team
 answered on 02 Aug 2019
4 answers
493 views

I am trying to disable cell drag and drop between rows

Here is my grid setup

 

  <telerik:RadGrid ID="grdResourceGrid" runat="server" 
                            AllowMultiRowEdit="true"  AllowAutomaticUpdates="true" 
                            OnNeedDataSource="OnNeedDataSource" 
                            OnItemUpdated="grdResourceGrid_ItemUpdated" 
                            OnUpdateCommand="grdResourceGrid_UpdateCommand"
                            OnItemDataBound="grdResourceGrid_ItemDataBound"
                            OnItemCreated="grdResourceGrid_ItemCreated" 
                            onclick="gridFocus(event)"                            
                            style="margin-top:0px;" 
                            ShowFooter="True"    
                            Skin="WebBlue" ShowGroupPanel="false" ShowStatusBar="True" GroupsDefaultExpanded="False" 
                            AllowSorting="false" AllowPaging="false" AllowFilteringByColumn="false" 
                            GridLines="None" AutoGenerateColumns="False">  
                <GroupingSettings CaseSensitive="false"  />
                <HeaderStyle BackColor="#6D8DAD" ForeColor="White" HorizontalAlign="Center" /> 

                <ClientSettings AllowRowsDragDrop="false" AllowDragToGroup="false" Selecting-EnableDragToSelectRows="false">
                    <ClientEvents OnKeyPress="grdResourceGrid_OnKeyPress" /> 
                </ClientSettings>              
                
                <MasterTableView DataKeyNames="Period" 
                                 EditMode="InPlace" CommandItemDisplay="Top"
                                 GroupLoadMode="Client"  GroupsDefaultExpanded="False"  
                                 AutoGenerateColumns="False">  

Please help

Thank you

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 31 Jul 2019
1 answer
283 views
I love treelist. I have a web app needs to be viewed in mobile screens. To do so I need to hide some columns so treelist fits the screen. I did some experimets but none of them was successful.Lets say I have 10 columns and I need to hide 7 of them. I managed to hide them but rest of the columns nevert expanded to fill the screen. There always remain a white space at the left of treelist as if there's something occupies the space.


Can anyone please show me howto completely hide columns of threelist with CSS mediaquery please ? I've spent one week for this but no luck.

Best.
Eyup
Telerik team
 answered on 31 Jul 2019
3 answers
1.9K+ views

I am experiencing an issue and I am not sure it is a bug or just is an expected behavior from MS Excel.

I have a Telerik RadGrid, and there is a date column on the grid layout. The date format I am using to display date values is "dd/MM/yyyy". Then, I export that grid data to Excel file with GridExcelExportFormat.Biff type. The problem here is when I open the newly exported Excel file, the date format is changed to "MM/dd/yyyy". I think MS Excel did re-apply the default date format for my date column (?)

 

I want to keep displaying my date format "dd/MM/yyyy" in the Excel file after exporting the grid data, is there a way to do that?

 

Here is my code.

Default.aspx

01.<asp:LinkButton ID="linkBtnExportToExcel" runat="server" OnClick="linkBtnExportToExcel_Click">Export to Excel</asp:LinkButton>
02. 
03.  <telerik:RadGrid AutoGenerateColumns="false" ID="rgInvoices"
04.      AllowFilteringByColumn="false" AllowSorting="True"
05.      EnableLinqExpressions="false"
06.      ClientSettings-EnableAlternatingItems="false"
07.      GroupingSettings-CaseSensitive="false"
08.      AllowPaging="true" AllowCustomPaging="true" PageSize="20" runat="server"
09. 
10.      OnNeedDataSource="rgInvoices_NeedDataSource"
11.      OnItemDataBound="rgInvoices_ItemDataBound"
12.      OnItemCommand="rgInvoices_ItemCommand"
13.      OnSortCommand="rgInvoices_SortCommand">
14. 
15.      <GroupingSettings CaseSensitive="false"></GroupingSettings>
16.      <ClientSettings EnableRowHoverStyle="true"></ClientSettings>
17. 
18.      <MasterTableView AutoGenerateColumns="false" AllowFilteringByColumn="false" ShowFooter="false" DataKeyNames="EmployeeID,HiredDate,Employee">
19. 
20.          <Columns>
21.              <telerik:GridBoundColumn UniqueName="Employee" DataField="Employee" HeaderText="Employee" ShowFilterIcon="false" AllowFiltering="false" AutoPostBackOnFilter="true" DataFormatString="{0:@}">
22. 
23.              </telerik:GridBoundColumn>
24.              <telerik:GridBoundColumn UniqueName="HiredDate" DataField="HiredDate" HeaderText="Hired Date"
25.                  DataFormatString="{0:dd/MM/yyyy}" ShowFilterIcon="false" AllowFiltering="false" AutoPostBackOnFilter="true">
26.              </telerik:GridBoundColumn> 
27.          </Columns>
28. 
29.          <HeaderStyle CssClass="RadGrid-HeaderStyle" Font-Bold="true" />
30.          <ItemStyle CssClass="RadGrid-ItemStyle" />
31.          <AlternatingItemStyle CssClass="RadGrid-AlternatingItemStyle" />
32.      </MasterTableView>
33.  </telerik:RadGrid>

 

And Default.aspx.vb

01.Public Class _Default
02.    Inherits System.Web.UI.Page
03.    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
04. 
05.    End Sub
06. 
07.    Protected Sub rgInvoices_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
08.        rgInvoices.DataSource = GetGridSource()
09.    End Sub
10. 
11.    Protected Sub rgInvoices_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs)
12. 
13.    End Sub
14. 
15.    Protected Sub rgInvoices_ItemCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs)
16. 
17.    End Sub
18. 
19.    Protected Sub rgInvoices_SortCommand(sender As Object, e As Telerik.Web.UI.GridSortCommandEventArgs)
20. 
21.    End Sub
22. 
23.    Protected Sub linkBtnExportToExcel_Click(sender As Object, e As EventArgs)
24.        Me.rgInvoices.ExportSettings.Excel.Format = GridExcelExportFormat.Biff
25.        Me.rgInvoices.ExportSettings.IgnorePaging = True
26.        Me.rgInvoices.ExportSettings.ExportOnlyData = True
27.        Me.rgInvoices.ExportSettings.OpenInNewWindow = True
28.        Me.rgInvoices.ExportSettings.FileName = "ExportExcelDemo"
29.        Me.rgInvoices.MasterTableView.ExportToExcel()
30.    End Sub
31. 
32.    Private Function GetGridSource() As DataTable
33.        Dim dataTable As DataTable = New DataTable()
34. 
35.        Dim column As DataColumn = New DataColumn()
36.        column.DataType = Type.[GetType]("System.Int32")
37.        column.ColumnName = "EmployeeID"
38.        dataTable.Columns.Add(column)
39. 
40.        column = New DataColumn()
41.        column.DataType = Type.[GetType]("System.DateTime")
42.        column.ColumnName = "HiredDate"
43.        dataTable.Columns.Add(column)
44. 
45.        column = New DataColumn()
46.        column.DataType = Type.[GetType]("System.String")
47.        column.ColumnName = "Employee"
48.        dataTable.Columns.Add(column)
49. 
50.        Dim PrimaryKeyColumns As DataColumn() = New DataColumn(0) {}
51.        PrimaryKeyColumns(0) = dataTable.Columns("EmployeeID")
52.        dataTable.PrimaryKey = PrimaryKeyColumns
53. 
54. 
55.        Dim row As DataRow = dataTable.NewRow()
56.        row("EmployeeID") = 2
57.        row("HiredDate") = New Date(2019, 7, 1)
58.        row("Employee") = "Tina Bush"
59.        dataTable.Rows.Add(row)
60. 
61.        Return dataTable
62.    End Function
63. 
64.End Class

 

Thanks for your support!

Eyup
Telerik team
 answered on 30 Jul 2019
2 answers
195 views

Hello,

We have this issue in our developpement on WebForms ASP.NET 4.5.2 (VS2015 Update 3) with last version 2019.2 with this configuration  :

In master.page :

        <script> 
            function RadPan_ItemClicking(sender, eventArgs)
            {
                var oItem = eventArgs.get_item();
                if (oItem.get_expanded()) {
                    oItem.collapse();
                }
                else
                    oItem.expand();
                var sUrl = "";
                var aAttributes = oItem._attributes;
                if (aAttributes.get_count())
                    sUrl = aAttributes.getAttribute("URL");
                if (IsDefined(sUrl)) 
                {
                    if (sUrl!="")
                    {
                        var oPanelBar = oItem.get_panelBar();
                        oPanelBar._postback();
                        eventArgs.set_cancel(false);
                        return;
                    }
                }
                eventArgs.set_cancel(true);
            }
        </script>

<telerik:RadPanelBar runat="server" ID="RadPan" ExpandMode="SingleExpandedItem" PersistStateInCookie="True"
                                    onclientitemclicking="RadPan_ItemClicking"
                                    ViewStateMode="Enabled"> 
                                    <CollapseAnimation Duration="100" Type="None" />
                                    <ExpandAnimation Duration="100" Type="None" />
</telerik:RadPanelBar>

--------------------------

It's a manual binding with 3 level of RadPanelItem, 

We don't use NavigateUrl property but we use OnItemClick event to check data in session before redirect

All RadPanelItems have URL Attribute that is read from OnItemClick  event

The behind Code IS NOT in master page BUT in child Page named BasePage (it's inherit WebPage for all pages of project)

Sample of BasePage.aspx.cs

protected override void OnLoad(EventArgs e)
{

_masterPage = Master as MyMaster;

RadPanelBar oRadPan = _masterPage.FindControl("RadPan") as RadPanelBar;

..... (Manual Binding without datasource)

}

To solve this issue temporarely, we use this Javascript code below BUT it's not clean :

$(function () {

       if (Telerik.Web.Browser.edge) {
            with (window)
                if (!location.href.contains("#") && !location.href.contains("?")) {
                    open(location.href + "?", "_blank");
                    close();
                }
        }
        else {
            if (sPathname.contains("index.aspx"))
                with (window.location)
                    if (!href.contains("#")) {
                        replace(href + "#");
                        reload();
                    }
        }
 });

 

Peter Milchev
Telerik team
 answered on 29 Jul 2019
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?