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

I have some question for GridGroupingControl.

First,I'm sorry for my terrible English.

1、I want set GridGroupingControl's BackgroundImage,
gridGroupingControl1.BackgroundImage = Image.FromFile(@"C:\aaa.jpg");
But it Cannot show the image in the GridGroupingControl.

2、I want to froze Mutiple rows in a GridGroupingControl without group.
this.gridGroupingControl1.TableModel.Model.Rows.FrozenCount = 4;
it cannot work.
but I use Cols.FrozenCount.
this.gridGroupingControl1.TableModel.Model.Cols.FrozenCount = 5;
It could work.Why?

3、I set a gridGroupingControl1's DataSource to a DataTable.
DataTable Table;
gridGroupingControl1.DataSource =Table;
I want to set  UserControl to a column's dropdowncell ,so that user can only use the UserControl to change the cell's value in the column,could anyone give me  some examples?

4、
I have many GridGroupingControl cells' rowindex and columnindex in the same column。
for example (4,5),(8,5),(10,5)..........
I click a button,I want to use these cell's rowindex and columnindex to change these cells's  backcolor and font into a new style,
GridTableCellStyleInfo style=this.gridGroupingControl1.Table.GetTableCellStyle(rowindex, columnindex),
How should I do next?
thanks!


3 Replies

AK Adhikesevan Kothandaraman Syncfusion Team September 15, 2015 12:41 PM UTC

Hi ligyste,

Thanks for contacting Syncfusion support.

Query 1
I want set GridGroupingControl's BackgroundImage,
To set the background image for the gridgroupingcontrol, use the BackgroundImage property.
KB Link:
http://www.syncfusion.com/kb/4490/How-to-set-an-image-as-a-background-for-a-cell-in-GridGroupingControl
Query 2
I want to froze Mutiple rows in a GridGroupingControl without group.
this.gridGroupingControl1.TableModel.Model.Rows.FrozenCount = 4;
it cannot work.
but I use Cols.FrozenCount.
this.gridGroupingControl1.TableModel.Model.Cols.FrozenCount = 5;
It could work.Why?

It’s the default architectural behavior for GridGroupingControl. We cannot provide frozen rows because child groups doesn’t have the scrolling.
Query 3
I set a gridGroupingControl1's DataSource to a DataTable.
DataTable Table;
gridGroupingControl1.DataSource =Table;
I want to set  UserControl to a column's dropdowncell ,so that user can only use the UserControl to change the cell's value in the column,could anyone give me  some examples?

To place the custom control for the cell, use the Custom cell models and renderer. Refer to the below KB document to add the custom control in the column header cell.
 KB Link:
https://www.syncfusion.com/kb/704/how-can-i-place-a-usercontrol-in-the-header-cell-of-gridgroupingcontrol
Query 4
I click a button,I want to use these cell's rowindex and columnindex to change these cells's  backcolor and font into a new style,
GridTableCellStyleInfo style=this.gridGroupingControl1.Table.GetTableCellStyle(rowindex, columnindex),
How should I do next?

Please refer to the below KB document to set the CellValue and Font style for the GridGroupingControl.
KB Link:
https://www.syncfusion.com/kb/640/how-do-i-conditionally-set-the-format-of-a-single-cell-in-the-gridgroupingcontrol

Regards,
Adhi.


LI ligyste September 16, 2015 12:19 AM UTC

Thank you very much!


RP Ranjani Prabhakaran Syncfusion Team September 16, 2015 05:40 AM UTC

Hi Ligyste,
 
Thanks for the update.
 
Please let us know if you have any query.
 
Regards,
 
Ranjani

Loader.
Live Chat Icon For mobile
Up arrow icon