Solved

Fixed Row in DataGridView

Posted on 2006-06-22
3
2,422 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
Comment Utility
I haven't found a way, yet.

Bob
0
 

Author Comment

by:michellechan57
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Contant UI messages in .NET 1 40
Need help with a query 6 53
Exception in Log4Net 1 17
Why, and when, to use Windows Workflow 1 16
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now