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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl and GridListControl

Thread ID:





35280 Sep 27,2005 03:34 PM UTC Sep 28,2005 06:41 PM UTC WinForms 2
Tags: GridControl
Ross Prestmo
Asked On September 27, 2005 03:34 PM UTC

Hi. I''ve looked through all of the posts on the GridListControl, and the examples, but cannot seem to get this to work. I have a grid grouping control with a GridListControl cell. The grid list will display fine, but I cannot seem to get at the values of the the row that was selected. The DataRowView object that is returned always seems to be null. Please see my event handler below, and see if you can see where I''m going wrong. Thanks. private void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e) { GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; GridDropDownGridListControlCellRenderer cr = cc.Renderer as GridDropDownGridListControlCellRenderer; if (cr != null) { DataRowView drv = ((GridDropDownGridListControlPart)cr.ListControlPart).SelectedItem as DataRowView; if (drv == null) { MessageBox.Show("DRV is null"); } else { MessageBox.Show("DRV is not null"); } } }

Administrator [Syncfusion]
Replied On September 27, 2005 07:58 PM UTC

Here is a minimal sample showing this working using version 3.3. http://www.syncfusion.com/Support/user/uploads/GGC_GLC_a847ab43.zip Are you setting the Displaymember, ValueMember and DataSource properties?

Ross Prestmo
Replied On September 28, 2005 06:41 PM UTC

Clay, Thanks for your help. My problem was that I was not setting the ValueMember property. What I am actually trying to do is to populate multiple cells in the current row based on the selection from the GridListControl. I''ve put the following code in the trigger that I pasted above, to try to do this, and it seems to work, except that the value doesn''t show up in the grid until I move to a different cell. int i = this.gridGroupingControl1.TableControl.Model.NameToColIndex("REASONID"); this.gridGroupingControl1.TableControl.Model[cc.RowIndex,i].Text = drv[1].ToString(); I can get it to show up immediately if I call : this.Validate(); ... but I don''t know if that is the best way to acheive this. If you could let me know if there is a better way, that would be great. Thanks. Ross.


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