Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Fixed Row in DataGridView

Posted on 2006-06-22
3
Medium Priority
?
2,445 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
  • 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 1500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

773 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