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

Freezing Grid Rows

Thread ID:

Created:

Updated:

Platform:

Replies:

38490 Dec 14,2005 09:32 AM UTC Apr 3,2018 06:41 AM UTC WinForms 18
loading
Tags: GridControl
Lokesh Luthra
Asked On December 14, 2005 09:32 AM UTC

I have written this Piece of Code for Freezing the fisrt Row . gridControl1.Rows.FreezeRange(1, 1) , But i Would like to Freeze the Last Row . Lets Say I have 20 Rows in my Grid then in that case how Can I Freeze the last ROw

stanleyj [Syncfusion]
Replied On December 14, 2005 09:52 AM UTC

Hi Lokesh, You can freeze the 20th row and that row will be below the header row. gridControl1.Rows.FreezeRange(20,20); Let me know if your requirement is different. Best regards, Stanley

Lokesh Luthra
Replied On December 14, 2005 11:06 AM UTC

Hi Stanley Thanx for your Reply , But I Already tried the same Option ,but this Will not Freeze the Last Row in the Grid . I want that I Could Freeze the Last Row in my Grid . How Can i Do So >Hi Lokesh, > > >You can freeze the 20th row and that row will be below the header row. > >gridControl1.Rows.FreezeRange(20,20); > >Let me know if your requirement is different. > > >Best regards, >Stanley

stanleyj [Syncfusion]
Replied On December 14, 2005 03:03 PM UTC

Hi Lokesh, If you need a frozen row at the bottom, then the easier way is to dock a grid control beneath the existing grid control. Having the column resizing synchronized you will have the look of the frozen last row. Here is a sample Best regards, Stanley

Lokesh Luthra
Replied On December 15, 2005 04:03 AM UTC

Hey Stanley Seems a great idea Will be fine if you can send me the code in VB.NET >Hi Lokesh, > >If you need a frozen row at the bottom, then the easier way is to dock a grid control beneath the existing grid control. Having the column resizing synchronized you will have the look of the frozen last row. > > >Here is a sample > > >Best regards, >Stanley

Lokesh Luthra
Replied On December 15, 2005 04:09 AM UTC

Moreover there is a problem in that If there are 2 rows in the grid then in that case there comes the Gap between the Freezed Row and the other rows of the Grid , Which Should not be there . Any Remedy for that >Hey Stanley > Seems a great idea Will be fine if you can send me the code in VB.NET > >>Hi Lokesh, >> >>If you need a frozen row at the bottom, then the easier way is to dock a grid control beneath the existing grid control. Having the column resizing synchronized you will have the look of the frozen last row. >> >> >>Here is a sample >> >> >>Best regards, >>Stanley

stanleyj [Syncfusion]
Replied On December 15, 2005 06:41 AM UTC

Hi Lokesh, I think you can maintain a minimum number of rows to avoid the gap. Here is the modified sample in VB.Net. Best regards, Stanley

Lokesh Luthra
Replied On December 15, 2005 07:29 AM UTC

Hello Stanley The solution is a Good Work Around but the Problem is that I am using this grid in Over 300 Forms . Since I am Filling the Grid at Run time may be I Will get the Data for 1 Row May Be for 100 Rows .So a new Row Will be Inserted based on the DataReceived from the Back End. So what Will be the criteria to judge how many minimum Rows I have to take so that there should not be a Gap Between the Grid Rows and the Freezed Row Which in my case is the last Row . the reason being the Grid height Some body Will Draw the Grid of Height Say 100 somebody Will say 30 . I Hope I have made you clear What I Want to Convey , Any Input on this. >Hi Lokesh, > >I think you can maintain a minimum number of rows to avoid the gap. Here is the modified sample in VB.Net. > >Best regards, >Stanley

Kevin
Replied On December 15, 2005 08:27 AM UTC

Hi, I face the same issue. The workaround solution is not perfect. You have two focus cells and the arrow key movement problem. The summary row are always at the bottom. The grid should have this feature! Kevin

Lokesh Luthra
Replied On December 15, 2005 08:50 AM UTC

Yup - I do agree with you that the Grid should have this feature . At the same time thankful to Team Syncfusion for providing nice support services to its customers . >Hi, > >I face the same issue. The workaround solution is not perfect. You have two focus cells and the arrow key movement problem. The summary row are always at the bottom. The grid should have this feature! > >Kevin

stanleyj [Syncfusion]
Replied On December 15, 2005 11:49 AM UTC

Hi Lokesh, >> what Will be the criteria to judge how many minimum Rows I have to take so that there should not be a Gap Between the Grid Rows and the Freezed Row Which in my case is the last Row. You can still play around to suit your purpose. This is the condition that is checked now instead of maintaining minimum rows, if the row heights are less than grid''s height then row heights are taken into account for the grid''s height and if the row heights are greater than the grid''s height then grid''s initial height is taken into account for the grid''s height. You can still make necessary changes to suite your purpose. Hope the sample is little more cleaner. Adding frozen rows to the bottom of a GridControl is a nontrivial task. The GridGroupingControl supports frozen summary rows. Using that control would be another option. Best regards, Stanley

Kevin
Replied On December 20, 2005 03:32 AM UTC

Hi Lokesh, What events should be used to handle the cell movments across the grids? > > Yup - I do agree with you that the Grid should have this feature . At the same time thankful to Team Syncfusion for providing nice support services to its customers .

Kevin
Replied On December 20, 2005 03:37 AM UTC

The previous question is for Stanley but I agree with Lokesh about the service provided from Syncfusion. >Hi Lokesh, > >What events should be used to handle the cell movments across the grids? > >> >> Yup - I do agree with you that the Grid should have this feature . At the same time thankful to Team Syncfusion for providing nice support services to its customers . >

stanleyj [Syncfusion]
Replied On December 20, 2005 07:26 AM UTC

Hi Kevin, Making these changes in the FrozenRow.cs, two focus cells were avoided. private void FrozenRowGrid_CellClick(object sender, GridCellClickEventArgs e) { if(this.grid.CurrentCell.HasCurrentCell) this.grid.CurrentCell.Deactivate(true); } private void grid_CellClick(object sender, GridCellClickEventArgs e) { if(this.FrozenRowGrid.CurrentCell.HasCurrentCell) this.FrozenRowGrid.CurrentCell.Deactivate(true); } Let me know if this helps. Best regards, Stanley

Kevin
Replied On December 21, 2005 01:24 AM UTC

Hi Stanley, What event shold be handled so that the active cell could be jump to next grid when the user presses the right-arrow key at the last column. CurrentCellMoveFailed?

stanleyj [Syncfusion]
Replied On December 21, 2005 04:20 PM UTC

Hi Kevin, We are looking for a good solution in navigating currentcell between the lower grid and the upper grid through arrow keys and will update you with more information. Regards, Stanley

stanleyj [Syncfusion]
Replied On January 3, 2006 11:48 AM UTC

Hi Kevin, Sorry for the delay in getting back to you. Using the QueryNextCurrentCellPosition handler of the upper grid, the current cell can be directed to the lower grid by checking the Direction and the cell position. Also in CurrentCellKeyDown handler of the upper grid, the current cell can be directed to the lower grid by checking the Right key or the Tab key and the cell position. To have smooth navigation in the lower grid, a derived grid overriding ProcessKeyMessage is used. The Navigation between upper grid and lower grid are handled in CurrentCellKeyDown handlers. A better solution to avoid two focus cells are handled in CurrentCellActivating handlers than in CellClick handlers that were mentioned in previous post. Download the sample here that demonstrates this. Best regards, Stanley

Atharva Tyagi
Replied On April 2, 2018 06:07 AM UTC

Hi Lokesh, >> what Will be the criteria to judge how many minimum Rows I have to take so that there should not be a Gap Between the Grid Rows and the Freezed Row Which in my case is the last Row. You can still play around to suit your purpose. This is the condition that is checked now instead of maintaining minimum rows, if the row heights are less than grid''s height then row heights are taken into account for the grid''s height and if the row heights are greater than the grid''s height then grid''s initial height is taken into account for the grid''s height. You can still make necessary changes to suite your purpose. Hope the sample is little more cleaner. Adding frozen rows to the bottom of a GridControl is a nontrivial task. The GridGroupingControl supports frozen summary rows. Using that control would be another option. Best regards, Stanley

Making an android app


Arulpriya Ramalingam [Syncfusion]
Replied On April 3, 2018 06:41 AM UTC

Hi Atharva, 
 
Thanks for the update, please provide us some more details of your requirement. So that, we could assist you to achieve your scenario. 
 
Regards, 
Arulpriya 


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.

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

;