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

RadScrollBarElement.set_Value Exception when Databinding

7 Answers 136 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Russell Groover
Top achievements
Rank 1
Russell Groover asked on 25 Mar 2008, 07:45 PM
I'm binding to a grid and I'm getting a weird error when I try to bind a datasource:

This is the statement that causes the error:
RootBindingSource.DataSource = _model;

This is the error:

Value of '1' is not valid for 'Value'. 'Value' must be between 'Minimum' and 'Maximum'.
Parameter name: Value

at Telerik.WinControls.UI.RadScrollBarElement.set_Value(Int32 value)\r\n  
at Telerik.WinControls.UI.GridTableElement.EnsureRowVisible(GridViewRowInfo rowInfo)\r\n  
at Telerik.WinControls.UI.GridTableElement.UpdateCurrentPosition()\r\n  
at Telerik.WinControls.UI.GridViewInfo.SetCurrentRow(GridViewRowInfo row, Boolean setPosition, Boolean shift, Boolean control)\r\n  
at Telerik.WinControls.UI.GridViewTemplate.SetCurrentRow(GridViewRowInfo rowInfo)\r\n  
at Telerik.WinControls.Data.DataAccessComponent.InitDataGrid()\r\n  
at Telerik.WinControls.Data.DataAccessComponent.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.SetList(IList list, Boolean metaDataChanged, Boolean applySortAndFilter)\r\n  
at System.Windows.Forms.BindingSource.ResetList()\r\n  
at System.Windows.Forms.BindingSource.ParentCurrencyManager_MetaDataChanged(Object sender, EventArgs e)\r\n  
at System.EventHandler.Invoke(Object sender, EventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.OnMetaDataChanged(EventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.SetList(IList list, Boolean metaDataChanged, Boolean applySortAndFilter)\r\n  
at System.Windows.Forms.BindingSource.ResetList()\r\n   at System.Windows.Forms.BindingSource.set_DataSource(Object value)\r\n  

 
I can't figure out what is wrong based on the error description.

7 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 26 Mar 2008, 08:56 AM
Hello Russell Groover,

Thank you for reporting this issue.

We confirm that there is an issue related with the scrollbars in RadGridView. We will address the issue in our upcoming release Q1 2008. If this is a showstopper for you, please send us your application. We will try to find a workaround for you.

Do not hesitate to write me, if you have other questions.

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Russell Groover
Top achievements
Rank 1
answered on 26 Mar 2008, 03:52 PM
I added the following statement and it no longer throws the exception:

GridView.MasterGridViewTemplate.AddNewRowPosition = Telerik.WinControls.UI.
PinnedRowPosition.Bottom;

0
Jack
Telerik team
answered on 26 Mar 2008, 04:48 PM
Hi Russell,

I am glad to hear that the issue is now resolved. Do not hesitate to write me, if I can assist you further.


Best wishes,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Russell Groover
Top achievements
Rank 1
answered on 26 Mar 2008, 06:08 PM
The above is a workaround / hack so it's not really resolved.  I would hope this would go into your defect list to be fixed before the release of Q1.

Also, if I have a read only grid and only have one item in my bindinglist it throws an exception when I bind to the grid.  I have to set AllowAddNewRow to true, bind the grid, then set AllowAddNewRow to false for bindinglists / grids with only one item.
0
Jack
Telerik team
answered on 27 Mar 2008, 12:26 PM
Hello Russell,

Thank you again for your suggestions.

You are right, that this is just a workaround. We added the issues reported by you in our TODO list and they will be addressed in the official Q1 2008 release. We don't have plans to release a second beta before the official release as we're too close to the release date.

Don't hesitate to write me, if you have other questions.

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Horst
Top achievements
Rank 1
answered on 05 Jul 2011, 08:38 PM
Hello,

I've got the same problem using the current release.
I'm getting this error while populating the Gridview through DataReader.
0
Jack
Telerik team
answered on 06 Jul 2011, 12:12 PM
Hello Horst,

Thank you for contacting us.

This thread is quite old and we believe that this issue has been addressed a long time ago. Could you please send us your application, so that we can test it and locate the issue? We will try to find a proper solution in your scenario. Thank you in advance.

Please note that you have to open a new support ticket in order to be able to attach your files.

I am looking forward to your reply.
 
Kind regards,
Jack
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
GridView
Asked by
Russell Groover
Top achievements
Rank 1
Answers by
Jack
Telerik team
Russell Groover
Top achievements
Rank 1
Horst
Top achievements
Rank 1
Share this question
or