Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
166 views

Hi,

I have a grid where the user will click a column and I want to handle that column-click server-side. I tried handling OnSelectedCellChanged (with EnablePostBackOnRowClick="true") but that only works when clicking cells, not columns headers. How can I achieve this?

Konstantin Dikov
Telerik team
 answered on 20 Jul 2015
2 answers
252 views

Hello,

We are using Telerik Grid control and having performance issues with the PDF export.
The details:

  • Grid control is used in a webpart under SharePoint 2013
  • Datasource is a SQL table, but accessing via ORM (LLBLGen Pro framework)
  • It is a Master-Detail view (details are closed by default and not exported to PDF) - source code attached below
  • It takes 60 seconds to generate a PDF from ~7000rows (it will be a ~24Mb PDF file, ~700pages)

I did some profiling from the C# webpart side and from the DB side too.
As you can see in the attachments there is only one SQL query which takes less than a second (381ms) to get the data.

 

1.EventClass  StartTime   EndTime Duration (ms)   TextData    Reads   Writes  RowCounts
2.Trace Start 2015-07-14  15:15:33.577                       
3.SQL:BatchCompleted  2015-07-14  15:15:33.577    2015-07-14  15:15:33.957    381 SELECT xx   1023    0   7632
4.Trace Stop  2015-07-14 15:15:33.957                    

But the other attachment is about the hot path in the code and it clearly shows that the Grid's internal methods are working hard for 60 seconds (!) to produce the PDF.

  • Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode
  • Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExportInternal

These two methods are running 98% percent of the time.

I've created an excel file with MS Excel 2010 on my local machine with the same data and saved it as a PDF. It took less then 10 seconds to generate and save the file.

Is it possible to increase the export's performance and decrease the necessary time to ~15 seconds?
What can cause this long rendering time? Maybe the master-detail view?

Thanks for your tips in advance!

 

<telerik:RadGrid ID="RadGrid_BoatGrid" runat="server"
    Skin="Metro"
    OnNeedDataSource="RadGrid_BoatGrid_OnNeedDataSource"
    AllowPaging="True"
    OnDetailTableDataBind="RadGrid_BoatGrid_OnDetailTableDataBind"
    EnableLinqExpressions="True">
    <ExportSettings IgnorePaging="True" OpenInNewWindow="True" HideStructureColumns="True">
        <Pdf DefaultFontFamily="Arial" PageWidth="297mm" PageHeight="210mm" PageTitle="Boats" PaperSize="A4"></Pdf>
    </ExportSettings>
    <MasterTableView AutoGenerateColumns="False"
        NoMasterRecordsText="There are no Boats."
        AllowSorting="True"
        DataKeyNames="Id">
        <DetailTables>
            <telerik:GridTableView runat="server" Name="Actions" DataKeyNames="Id" Width="100%" AutoGenerateColumns="False"
                NoDetailRecordsText="There are no Actions associated with this Boat.">
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="ActionNumber"
                        HeaderText="Number"
                        DataField="Id">
                        <ItemTemplate>
                            ................
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    ..............
                    <telerik:GridBoundColumn HeaderText="% Complete" DataField="PercentComplete">
                    </telerik:GridBoundColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
           .......
            <telerik:GridBoundColumn UniqueName="Title"
                HeaderText="Title"
                DataField="Title"
                SortExpression="Title">
                <HeaderStyle Width="160px"></HeaderStyle>
            </telerik:GridBoundColumn>
            .......
 
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Caroline
Top achievements
Rank 1
 answered on 20 Jul 2015
2 answers
230 views

Is is possible to set SearchBox Datasource only one time(when page is not postback)?

Because i have to populate 10,000 Names in SearchBox each time if my page get post back

here is my code

protected void Page_Load(object sender, EventArgs e)
{

            radSearchEmployeeName.DataSource = GetEmployeeNameList();
            radSearchEmployeeName.DataTextField = "LeadFullName";
            radSearchEmployeeName.DataValueField = "LeadID";
            radSearchEmployeeName.DataBind();

}

I am getting  "DataSource not set" error for below code

if (!IsPostBack)
 {

           radSearchEmployeeName.DataSource = GetEmployeeNameList();
            radSearchEmployeeName.DataTextField = "LeadFullName";
            radSearchEmployeeName.DataValueField = "LeadID";
            radSearchEmployeeName.DataBind();

}

 

 

BiBongNet
Top achievements
Rank 2
 answered on 19 Jul 2015
14 answers
292 views

I need to color some of US counties with specific colors.

Ideally some kind of "heat map" (meaning different tints of the same color depending on the number supplied. Bigger number results in deeper color tint).

Not sure how to approach this task.

Thank you

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 17 Jul 2015
9 answers
400 views

Hi there,

I am building an App which reads data from a table and populates using a heirarchicaldataset class.

This works fine in the standard Ajax Treeview but I am struggling with the limitations of this control.

The data populates perfectly ok, but I need to conditionally add up to 5 icons to the node text on the LHS and even one or two on the RHS. I will need to have these potentially firing off functions in Javascript and/or code behind.

But I do not want to have to manage the node population in code, once I have populated my datasource I want the treeview to display with a minimal amount of fuss. I want to set up indicators in my data structure to say which icons appear and also to have checkbox for selection on the LHS.

The documentation/demo online does not seem to happily or simply support population from a dataset directly which is why I chose to use the standard asp treeview.

Does RadTreeview support node population via a heirarchicaldataset (recursive dataset) method and does it support a templated node layout?

I was thinking of a layout with a number of TD's ..

I can't see examples of this sort of thing on the demos pages.

jON

Ivan Danchev
Telerik team
 answered on 17 Jul 2015
21 answers
92 views

I would like to add pie-chart to one of the sub levels. Ideally i would like to add tab control with multiple charts.

i tried bunch of stuff with no luck

Please take a look at the current state (before.jpg) and desired (after.png)

 

Thank you

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 17 Jul 2015
3 answers
55 views


Using the image manager control on the telerik radeditor does not seem to function correctly in a web farm enviroment. It sometimes works and other times (most of the times) returns with the following error message:
 'You don't have permission to access this page or your cookie has expired!Please, refresh the page! "

However when adding a host entry on a client machine, the upload manager works gracefully.

Is there a setting or property on the radEditor such us there is on the spell check that passes all the data it needs via the HTTP Get querystring? If not how do you suggest we can resolve this issue without resolving to using 'sticky sessions'?

We are currently using an older version of the telerik control, we are using version 5.6. Does this issue also exists in the new versions of the telerik RadControls? If not we may consider purchasing a the newer version if there is no available fix with the current version.

Thanks you very much for any assistance.


Vessy
Telerik team
 answered on 17 Jul 2015
1 answer
176 views

I am simply trying to display a value from asp.net label control, the value is setting from the code behind. But I could not find any good example. Either telerik told me that this is not possible or give me a good example. Please note that if I set the text in the markup it works but setting its value from the code behind does not work.

I am opening a popup from jquery to display the label control.

 <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Resize, Close"
                                Modal="True" ShowContentDuringLoad="False" VisibleStatusbar="False" AutoSize="False"
                                Width="455" ReloadOnShow="True" Height="260" Title="Opening Balance">
                                <ContentTemplate>

 <asp:Panel ID="Panel​1" runat="server">
                                                                <table class="margin-all-10">
                                                                    <tr>
                                                                        <td class="label">
                                                                            Bank: <asp:Label ID="lblLabel1"  Text="" runat="server"></asp:Label>
                                 .....                                       

 Protected Sub AddBegBalance_Command(ByVal sender As Object, ByVal e As CommandEventArgs)

            lblLabel1.Text = "Some Text"
       
    ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType, "alert1", "Display();", True)

    End Sub​

  <script language="javascript" type="text/javascript">

function ShowModifyAddBalan() {
           
           var _wndwAddOpenBalan = $find("<%= RadWindow1.ClientID %>");
           _wndwAddOpenBalan.show();
       }​

</script>

Vessy
Telerik team
 answered on 17 Jul 2015
7 answers
257 views

 

Hi!

   I use <telerik:RadGrid>, <BatchEditingSettings EditType="Row" OpenEditingEvent="DblClick" /> for data editing,

My problem is when the saveChanges button being clicked, It triggered - BatchEditCommand(object sender, Telerik.Web.UI.GridBatchEditingEventArgs e) event, however, (I referenced from searched samples) when trying to loop through and get data within the grid:

foreach (GridBatchEditingCommand gridBECmd in e.Commands)

{}

the e.Commands.count is always 0, therefore, I couldn't get data to save. 

Can anyone give any advises?

thanks!

Sharon

Viktor Tachev
Telerik team
 answered on 17 Jul 2015
0 answers
70 views

Hi,

 We would like to enable the spell check in the textboxes. But, we want to have only spell check as menu, while right click on the word.

 

We dont want any other options like - cut, copy, paste, Inspect element, etc.

 

Please let me know, how to do this.

Nallan Krishnan
Top achievements
Rank 1
 asked on 17 Jul 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?