We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting error when trying to set the dropdownrows in Grouping Grid.

Thread ID:





16982 Jul 28,2004 01:45 PM UTC Jul 29,2004 02:39 PM UTC WinForms 3
Tags: Grouping
Bhandhavi Sangaru
Asked On July 28, 2004 01:45 PM UTC

Private Sub myGroupingGrid_TableControlCurrentCellShowingDropDown(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs) Handles myGroupingGrid.TableControlCurrentCellShowingDropDown Dim grid As GridControlBase = CType(sender, GridControlBase) Dim cc As GridCurrentCell = CType(grid.CurrentCell, GridCurrentCell) Dim cr As GridDropDownGridListControlCellRenderer = CType(cc.Renderer, GridDropDownGridListControlCellRenderer) CType(cr.ListControlPart, GridDropDownGridListControlPart).DropDownRows = 10 End Sub I am using the above code to set the number of dropdownrows of my GridListControl in a GroupingGrid. I used the same code for GridListControl in GridDataboundGrid and it worked. I am getting an invalid Cast at line Dim grid As GridControlBase = CType(sender, GridControlBase) Please help! Thanks, Bhandhavi.

Administrator [Syncfusion]
Replied On July 29, 2004 12:47 PM UTC

Hi Bhandhavi, the sender will be of type GridGroupingControl. Use Dim grid As GridControlBase = e.Inner.TableControl instead. Stefan

Administrator [Syncfusion]
Replied On July 29, 2004 01:31 PM UTC

I meant Dim grid As GridControlBase = e.TableControl Stefan

Bhandhavi Sangaru
Replied On July 29, 2004 02:39 PM UTC

Stefen, Thanks a lot. It worked perfectly. Bhandhavi.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon