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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Basic Grid help (hiding cols bolding cols)

Thread ID:





43264 Apr 19,2006 01:54 PM UTC Apr 20,2006 01:53 PM UTC WinForms 1
Tags: Tools
Craig Glencross
Asked On April 19, 2006 01:54 PM UTC

If I have a GridGroup and have assigned a dataset to it how can I hide and unhide rows? Also when I doubleclick on a row the DoubleClick event does not fire. Do I have to set some setting to allow for this? Finally how can I find what row is selected and what cell of that row is selected? Thanks. With grdMain .ResetAppearance() .DataSource = dv .TableDescriptor.AllowNew = False .TableDescriptor.AllowEdit = False .TopLevelGroupOptions.ShowCaption = False .TopLevelGroupOptions.ShowColumnHeaders = True end with

Administrator [Syncfusion]
Replied On April 20, 2006 01:53 PM UTC

Hi, Issue 1:Hide/Show a row Could you try this code to hide/show a row in grouping grid.Here is a code snippet. //For hide the 5 th row this.gridGroupingControl1.TableControl.Model.Rows.Hidden[5] = true; //For show the 5 th row this.gridGroupingControl1.TableControl.Model.Rows.Hidden[5] = false; Issue 2:Double click You need to handle the TableControlCurrentCellControlDoubleClick event to catch double click on a cell in grouping grid.try this code private void gridGroupingControl1_TableControlCurrentCellControlDoubleClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlControlEventArgs e) { System.Diagnostics.Trace.WriteLine("Double Clcik fired"); } Issue 3: Selection By default, clicking a cell does not select it (ie. add it to the grid.TableControl.Model.Selections collection). But clicking a cell does fire the event to clear any selections if they were present. So, that is why you did not see any CurrentCell rowIndex/ColIndex in SelectionChanged Event If you want to the currentcell to be treated as a selection (& added to the grid.TableControl.Model.Selections collection), then you can set thegridGroupingControl1.TableControl.Model.Options.ExcelLikeCurrentCell = true. This will always make the currentcell be selected. //to set the ExcelLikeCurrentCell Selection gridGroupingControl1.TableControl.Model.Options.ExcelLikeCurrentCell = true; private void TableModel_SelectionChanged(object sender, GridSelectionChangedEventArgs e) { if(e.Reason == GridSelectionReason.SetCurrentCell ) { GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; Console.WriteLine("Selected (row, column) = ("+ cc.RowIndex + ", " + cc.ColIndex + ")" ) ; } } Here is a sample for implementing it. SelectionTypes_CS.zip Please refer to the KnowledgeBase link below for more details http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=344 Let me know if this helps. Thanks for choosing Syncfusion Products. Regards, Haneef


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