Windows应用程序中Datagridview的RowSpan属性 [英] RowSpan Property of Datagridview in Windows application

查看:371
本文介绍了Windows应用程序中Datagridview的RowSpan属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

如何在Cellpainting事件处理程序中获取Datagridview的RowSpan属性
在Windows应用程序中

谢谢
Lakshman

Hello,

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

Thanks
Lakshman

推荐答案

记住RowSpan 属性仅在将控件放在TableLayoutPanel内时适用,如果在这种情况下为true,则可以访问如下.

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.

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


这篇关于Windows应用程序中Datagridview的RowSpan属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆