Solved

Fixed Row in DataGridView

Posted on 2006-06-22
3
2,435 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

752 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