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

Need Help choosing appropriate Grid Control

Hey guys,

I'm new to Syncfusion controls, I'm currently working on a project that requires Comboboxes, listBoxes, check boxes, datetime pickers etc to be embeded in a grid header. The end user uses these controls to filter the data viewed in the detail rows of the grid.

The users need to be able to change the position of the columns in the grid i.e drag some column to the left or right etc., they want to be ale to select multiple rows from the comboboxes and list boxes etc.

I have no idea which of the grid controls would be optimal for this, I see a GridListControl, GridDataBoundGrid, GridControl etc....

7 Replies

HA haneefm Syncfusion Team May 7, 2007 06:56 PM UTC

Hi Nedu,

We encourage you to use the GridGroupingControl. It supports OutLook-style grouping as well as true-nested hierarchical grids. It also supports the filtering and drag and drop functionality in a grid. Please use the GridGroupingControl and let me know if you need any further assistance.

Best regards,
Haneef


CH Chinedu May 7, 2007 07:20 PM UTC

Really appreciate the quick response. I'll use the gridgroupingcontrol and give feed back.

Thanks a million


CH Chinedu May 7, 2007 09:03 PM UTC

ok, I have successfully bound my custom collection object to the grid and it displays all the rows of data in the collection. I'm able to move columns around and sort descending or ascending....great so far.

I have a few questions.
1. How do i set the display order of the columns.

2. I noticed the grid gave me an empty row for adding new rows right below the headers, instead of the capability to add rows or in addition to this capability, can I add comboboxes, listboxes, checkboxes etc to that row or the one beneath it so the users can set filters from that row and have the grid restict it's displayed rows to the filter criteria


HA haneefm Syncfusion Team May 7, 2007 09:33 PM UTC

Hi Nedu,

1. How do i set the display order of the columns?
>>>>>>>>>>>>
To rearrange the columns of the grid, you need to use the VisibleColumns.Move(). The Move method moves the element within the visible column collection. Here is some code snippet

this.gridGroupingControl1.TableDescriptor.VisibleColumns.Move(1,3);

2)I noticed the grid gave me an empty row for adding new rows right below the headers, instead of the capability to add rows or in addition to this capability, can I add comboboxes, listboxes, checkboxes etc to that row or the one beneath it so the users can set filters from that row and have the grid restict it's displayed rows to the filter criteria

>>>>>>>>>>>>
This is a default behavior. If you want to remove the AddNewRow(Blank Row) in the top section of the group, you can set the ShowAddNewRecordBeforeDetails and ShowAddNewRecordAfterDetails property to false. Here is a code snippet

//For Main Groups
this.grid.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = false;

//For Main Groups
this.grid.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.NestedTableGroupOptions.ShowAddNewRecordAfterDetails = false;

//For Child Groups
this.grid.ChildGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.ChildGroupOptions.ShowAddNewRecordAfterDetails = false;

Filtering the Grid:
>>>>>>>

Filters can be set by setting the ShowFilterBar and allowFilter property. The AllowFilter can be set for the columns that require filter options.

Given below is the code to set the filter for all the columns in the main table.

// ShowFilterBar for the Main table......
this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = true;

//Change the appearance of the Filter Row....
this.gridGroupingControl1.TableDescriptor.Appearance.FilterBarCell.BackColor = Color.AliceBlue;

//Enable the filter for each columns
for(int i = 0 ; i< gridGroupingControl1.TableDescriptor.Columns.Count;i++ )
gridGroupingControl1.TableDescriptor.Columns[i].AllowFilter = true;

Best Regards,
Haneef


CH Chinedu May 8, 2007 01:51 PM UTC

Thank you so much man. I really appreciate your help.

I need some more help please.
I want to be able to change the behavior of some of the comboboxes in the filter row, if possible change one or two of them to Listboxes and make the comboboxes and listboxes allow for multiple selection within thier list

Also, for a row that contains dates, Is it possible to make the filter show a datetimePicker instead of a list of the available dates in string format.


CH Chinedu May 8, 2007 07:56 PM UTC

Here's what I really need to do.

I need a colapsible region right underneath the header column of the Grid.

in this region I need to insert multi select enabled comboboxes and listboxes for some columns, datetime pickers for date columns, textboxes for string columns etc.

I need to be able to populate these embeded controls with data from different datasources.

The end users would basically use this region to build queries or where clause statements.....and a search button that fills the rows in the lower section of the grid with the result of the query...


HA haneefm Syncfusion Team May 9, 2007 03:56 PM UTC

Hi Nedu,

Here is a forum thread that discuss with simillar issue.
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=60625

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon