Telerik Forums
UI for ASP.NET AJAX Forum
17 answers
891 views
Hello,

I am working on a project with a RadGrid.

The project requires that when a user clicks on a button, the RadGrid resets the scroll position.

My code: 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
  
                function ResetGridPosition() {
                    var grd = document.getElementById('RadGrid1');
                    var grd1 = $find("<%= RadGrid1.ClientID%>");
                      var master = grd1.get_masterTableView().get_element().parentNode;
                      master.scrollLeft = 0;
                      master.scrollTop = 0;
                  }
  
  
            </script>
        </telerik:RadCodeBlock>
 
  
 <telerik:RadAjaxManager runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadButton1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
 <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both" AllowSorting="true" AllowPaging="true" PageSize="30" Width="900px">
                        <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" ></Scrolling>
            </ClientSettings>
                    </telerik:RadGrid>
 
 <telerik:RadButton ID="RadButton1" runat="server" Text="Reset Grid Position" OnClientClicked="ResetGridPosition">

It seems this code really resets the scroll position, but after the postback the
grid scroll position returns to the previous position. [See Video

How do I solve this?

Thanks,
Daniel.
Konstantin Dikov
Telerik team
 answered on 05 Apr 2017
1 answer
216 views

Hello,

 

I am using a Telerik RadSpreadsheet (Telerik.Web.Spreadsheet.dll v. 2016.3.1024.40) in our application. I am testing with Chrome v. 57.

 

The spreadsheet is configured with a ColumnCount of 29 (i.e., A through AC) and these are displaying correctly.

 

However:

  • It is possible to horizontally scroll past the end of the columns.
  • The horizontal scrollbar slider is not resized according to the ratio of visible columns versus total columns (e.g., like the vertical scrollbar slider).
  • Dragging the slider left or right scrolls quickly past the end of the columns and is therefore not usable. (Clicking the right and left buttons scrolls about 1 column at a time and is usable.)

 

I am using the following code to load and populate the spreadsheet server-side:

        // set template spreadsheet
        protected void Page_Init(object sender, EventArgs e)
        {
            // get provider instance
            FTSpreadsheetDocumentProvider provider;
            provider = new FTSpreadsheetDocumentProvider(Server.MapPath(SPREADSHEET_VIRTUAL_PATH), this);
            RadSpreadsheet1.Provider = provider;
        }

 

        // bind template spreadsheet
        protected void RadSpreadsheet1_DataBinding(object sender, EventArgs e)
        {
            RadSpreadsheet1.ColumnsCount = SPREADSHEET_COLUMNS_COUNT; // =29
            RadSpreadsheet1.RowsCount = SPREADSHEET_ROWS_COUNT; // =21
        }

        // populate the data
        protected void RadSpreadsheet1_DataBound(object sender, EventArgs e)
        {
            var sheet = RadSpreadsheet1.Sheets[0];
            sheet.FrozenColumns = 2;
            sheet.Rows[0].Cells[0].Value = ...

 

The attached screenshot shows the page with the horizontal slider about halfway across, which is well past the end of the columns (except for the 2 frozen columns). (PS It's not much better without the frozen columns.)

 

Can you please let me know how to get the horizontal scrollbar working correctly?

 

Thanks,
Severin B.

Severin
Top achievements
Rank 1
 answered on 04 Apr 2017
4 answers
1.0K+ views
I am working on adding some excel export functionality to all of the grids in my application. I have played around with numerous options but I can't seem to get the results I need.

I have grids that use calculated columns and aggregates. When using the ExportDataOnly = true and Format="ExcelML" the calculated columns and aggregates do not appear on the export. Also, any formatting applied to data is lost.

When I set ExportDataOnly = false and use HTML format the column names are linked inside of excel, the filter fields appear, and all hell breaks loose when you have a detail table.

I've tried using the GridExporting event like this:

        protected void RadGridSearch_GridExporting(object source, GridExportingArgs e) 
        { 
            RadGridSearch.AllowSorting = false
            RadGridSearch.AllowFilteringByColumn = false
        } 

It does not seem to change the export behavior.

I need to be able to do one of 2 things, either have my aggregated data and calculated columns show up on data only exports, or be able to trim out all the extra garbage when using HTML format.

Any suggestions?


Josef Rogovsky
Top achievements
Rank 2
 answered on 04 Apr 2017
1 answer
176 views

 

Hi,

I want to increase the font size of the text "Select a document to upload". How do i change it? Having the size in CSSClass does not work. Any other way?

I also the following in CSS which did not help
 RadUpload .ruBrowse
   {
          font-size:30px !important;
          font-style:italic;
   }
 
.wizInternalLabels
    {
        color:#00008B;
        font-size:x-large;
    }

 

<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions="pdf,jpg,jpeg,txt"
                                     MultipleFileSelection="Automatic"  CssClass="wizInternalLabels" dir="rtl"
                                     PostbackTriggers="btnCustomFinish">
                                     <Localization Select=" Select a document to upload "   />
                                 </telerik:RadAsyncUpload>

 

 

Thanks in Advance
Rumen
Telerik team
 answered on 04 Apr 2017
4 answers
526 views

Hi i am using 2015.1.401.40 version.

and i am trying to show product summary chart but the height 100% is not working(please see attached screen shot).

And how do i set Totals/Counts always show on the bottom(if user scrolls then only products section move)

here is my code 

<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="100%" Height="100%"
       Skin="Bootstrap">
       <ChartTitle Text="Product Summary">
       </ChartTitle>
       <PlotArea>
           <Series>
               <telerik:BarSeries Name="Total" DataFieldY="Total">
                   <TooltipsAppearance>
                       <ClientTemplate>
                            #=dataItem.Productname# Total Counts: <b>#=dataItem.Total#</b
                       </ClientTemplate>
                   </TooltipsAppearance>
                   <LabelsAppearance Visible="false">
                   </LabelsAppearance>
               </telerik:BarSeries>
           </Series>
           <XAxis DataLabelsField="productname">
               <MinorGridLines Visible="false"></MinorGridLines>
               <MajorGridLines Visible="false"></MajorGridLines>
           </XAxis>
           <YAxis>
               <LabelsAppearance DataFormatString="{0}" Mirror="true">
               </LabelsAppearance>
               <MinorGridLines Visible="false"></MinorGridLines>
           </YAxis>
       </PlotArea>
       <Legend>
           <Appearance Visible="false">
           </Appearance>
       </Legend>
   </telerik:RadHtmlChart>

Goce
Top achievements
Rank 1
 answered on 04 Apr 2017
18 answers
699 views

Hi everyone,

I've been using Telerik released in Q1 2015. I tried the simplest export to pdf code as follow but it doesn't work once I used Client Export Manager.

My code is just like this:

<div id="foo">Just for testing</div>
<telerik:RadClientExportManager runat="server" ID="RadClientExportManager1">
    <PdfSettings FileName="Myfile.pdf" />
</telerik:RadClientExportManager>
<input type="button" onclick="exportPdf()" value="export" />
<script type="text/javascript">
function exportPdf() {
var exp = $find("<%= RadClientExportManager1.ClientID %>");
exp.exportPDF($telerik.$("#foo"));
}
</script>

When button was clicked, no error had been found but no pdf file was generated. Have I missed anything? Appriciate your help!

Rahul
Top achievements
Rank 1
 answered on 04 Apr 2017
0 answers
365 views

A client of ours runs a security scanner daily on a website.  One page on the site has the RadDatePicker control.  When the scanner runs, it brings up t

Inner Exception Type: System.ArgumentException
Inner Exception
Invalid JSON primitive: ;WAITFOR DELAY '00:00:28'-- .
 
Inner Source:
System.Web.Extensions
 
Inner Stack Trace:
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
at Telerik.Web.UI.RadDatePicker.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

I looked at the scanner form input data and found this:

ContentPlaceHolder1_applicationManager1_sessionsearchresults1_Criteria1_radTo_ClientState: 1';WAITFOR DELAY '00:00:28'--

I know this value is not valid JSON, but I'm unsure how to proceed.  I tried to reproduce this problem on the form itself but have been unable to.  Has anyone experienced this problem?

Jutas Arthasarnprasit
Top achievements
Rank 1
 asked on 04 Apr 2017
0 answers
108 views

hi friends i have a radgrid control and i need to export grid content into zipped csv, how can i achieve this functionality, can somebody help me???

Thanks for your help in advance.

Regards,

Azhar.

azhar
Top achievements
Rank 1
 asked on 04 Apr 2017
0 answers
69 views

 

Look at the picture i have attached why does internet explorer react in a different way? Is there a problem on there end?

<telerik:RadEditor

OnClientCommandExecuting="OnClientCommandExecuting"

Width="100%"

EnableResize="true"

Height="100%"

ID="editor1"

OnClientLoad="OnClientLoad"

Runat="server"

ToolsFile="**" >

<ImageManager ViewPaths="*****" SearchPatterns="*.jpeg,*.jpg,*.png,*.gif,*.bmp"/>

</telerik:RadEditor>

Robel
Top achievements
Rank 1
 asked on 04 Apr 2017
0 answers
67 views

T<telerik:RadEditor

           OnClientCommandExecuting="OnClientCommandExecuting"

      Width="100%"

EnableResize="true"

Height="100%"

ID="editor1"

OnClientLoad="OnClientLoad"

Runat="server"

ToolsFile="/_layouts/telerik/EditorInWindowToolsFile.xml" >

<ImageManager ViewPaths="/_layouts/images" SearchPatterns="*.jpeg,*.jpg,*.png,*.gif,*.bmp"/>

</telerik:RadEditor>

Robel
Top achievements
Rank 1
 asked on 04 Apr 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?