Solved

Fixed Row in DataGridView

Posted on 2006-06-22
3
2,437 Views
Last Modified: 2007-12-19
Is it possible to fixed more than one row in DataGridView in C# windows form (similar to Delphi's TStringGrid component) ?

Lets say I wanted the first two rows to freeze, then row number 2 should behave like row number 1, its color and style should be similar to row number 1 as well. Also, when I scroll vertically, row number 2 again will like row number 1 will always be visible.

0
Comment
Question by:michellechan57
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16961982
I haven't found a way, yet.

Bob
0
 

Author Comment

by:michellechan57
ID: 16965236
Hi Bob,
Below statement can freeze the column or row but the style did not changed.
I supposed have to explicitly set the style

dataGridView1.Columns[0].Frozen = true;
dataGridView1.Rows[1].Frozen = true;
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 16965792
Very good, grasshopper ;)

Frozen cells don't appear to gain any different style, so you would have to apply your own style to either the column or the row.

Bob
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question