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.
Unfortunately, activation email could not send to your email. Please try again.

How to pin/freeze a specific row?

Thread ID:

Created:

Updated:

Platform:

Replies:

107003 Feb 6,2013 01:23 PM Mar 13,2013 06:15 AM Windows Forms 6
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On February 6, 2013 01:23 PM

I need to freeze the first row of my grid while I scroll, is it possible? Ie, I want my first row always visible even if my scroll is in the end.

Vinish Kumar K [Syncfusion]
Replied On February 6, 2013 01:54 PM

Hi Cristiano,

 

Thank you for your interest in Syncfusion products.

 

Query

Make first row always visible

We have analyzed your query ‘ pin the first row always visible’. We have an property to make the row always visible. You can handle his behavior using the FrozenCount property. Please refer the following codes.

 

 

this.gridControl1.RowHeights.SetRange(1,0,0);

this.gridControl1.ColWidths.SetRange(1,0,0);

 

//Freeze the rows and columns with respect to current cell

this.gridControl1.Model.Rows.FrozenCount = row;

this.gridControl1.Model.Cols.FrozenCount = col;

this.gridControl1.Focus();

 

We have an sample in our dashboard. We hope this sample will helps you to get  an better experience about this query. Please refer the sample from following path

 

<install location>\Syncfusion\EssentialStudio\<Version>\Windows\Grid.Windows\Samples\2.0\MS Excel-Style Features\Freeze Pane Demo\

 

 

Please let me know if you have further concerns.

 

Regards,

Vinish.


Administrator [Syncfusion]
Replied On February 7, 2013 12:27 PM

Hello, I'm using grid grouping control, not grid control.

Vinish Kumar K [Syncfusion]
Replied On February 8, 2013 05:59 AM

Hi Cristiano,

 

Thanks for your update.

 

You can Froze the top rows in gridGrpoupingControl using the FrozenCount. Please refer the following codes which is used to freeze the top row.

 

int toprow = this.gridGroupingControl1.Table.Records[0].GetRowIndex() ;

            this.gridGroupingControl1.TableModel.Rows.FrozenCount = toprow;

 

Please refer our dashboard sample for your reference <installed_Folder>\Syncfusion\EssentialStudio\<Version>\Windows\Grid.Grouping.Windows\Samples\2.0\Layout Customization\Frozen Column Demo\

 

Please let me know if you have further concerns.

 

Regards,

Vinish.


Vinish Kumar K [Syncfusion]
Replied On February 8, 2013 05:59 AM

Hi Cristiano,

 

Thanks for your update.

 

You can Froze the top rows in gridGrpoupingControl using the FrozenCount. Please refer the following codes which is used to freeze the top row.

 

int toprow = this.gridGroupingControl1.Table.Records[0].GetRowIndex() ;

            this.gridGroupingControl1.TableModel.Rows.FrozenCount = toprow;

 

Please refer our dashboard sample for your reference <installed_Folder>\Syncfusion\EssentialStudio\<Version>\Windows\Grid.Grouping.Windows\Samples\2.0\Layout Customization\Frozen Column Demo\

 

Please let me know if you have further concerns.

 

Regards,

Vinish.


Administrator [Syncfusion]
Replied On March 8, 2013 01:18 PM

I don't see any difference using this frozen count. What is it supposed to do?

I need to a specific row at top or bottom to be pinned.
grid = new GridGroupingControl();
grid.Location = new Point(3, 3);
grid.Size = new Size(800, 600);
this.Controls.Add(grid);
 
 
grid.DataSource = AddData2();
 
// this does nothing? all rows still scroll
this.grid.TableModel.Rows.FrozenCount = 5; 

Vinish Kumar K [Syncfusion]
Replied On March 13, 2013 06:15 AM

Hi Cristiano Venancio Conte,

 

Thanks for your update.

 

We have analyzed your query with the different scenarios to freeze the row  in Grid Grouping Control. Currently we don’t have any direct support to freeze the rows in GGC. but you can implement the tree grid in Grid control and you can freeze the rows instead of GGC.  Please refer the below code.

 

this.gridControl1.Cols.FreezeRange(1, 8);

            int frozencolumn = this.gridControl1.Cols.FrozenCount;

            this.gridControl1.Rows.FrozenCount = 0;

            this.gridControl1.Rows.FrozenCount = 1;

            this.gridControl1.Cols.FrozenCount = frozencolumn;

            this.gridControl1.Refresh();

 

 

Here is the new sample for this implementation (attached).

 

Please let me know if you have any concerns.

 

Regards,

Vinish



simpleSample619000711_3ce1a425.zip

CONFIRMATION

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.

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.

;