Click here to Skip to main content
16,020,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

How to get RowSpan Property of Datagridview in Cellpainting Event Handler
in Windows Application

Thanks
Lakshman
Posted

1 solution

Remember RowSpan property is only applicable when your control is placed inside a TableLayoutPanel, if this is true in that case you can access the RowSpan as following.

C#
private void TestGridView_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
       {
           int rowSpan = tableLayoutPanel1.GetRowSpan((DataGridView)sender);
       }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900