This is a migrated thread and some comments may be shown as answers.

Horizontally scrolling goes beyond count of columns

1 Answer 47 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Severin
Top achievements
Rank 1
Severin asked on 04 Apr 2017, 08:20 PM

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.

1 Answer, 1 is accepted

Sort by
0
Severin
Top achievements
Rank 1
answered on 04 Apr 2017, 10:36 PM

I found that the rssScroller.rssViewSize width was "1.04888e+06px". The horizontal scrollbar works as expected if I override width to 2000px (using Chrome Developer Tools).

I also noticed that _refresh() is called many times, each time increasing the total (which is used to calculate the width), until presumably it grows to 10488843.

The call stack is:

_refresh

value

fromJSON

(anonymous)

batch

fromJSON

insertSheet

fromJSON

init

init

(anonymous)

each

each

b.fn.(anonymous function)

initializeWidget

...

 

SB

Tags
Spreadsheet
Asked by
Severin
Top achievements
Rank 1
Answers by
Severin
Top achievements
Rank 1
Share this question
or