DataGrid (WinForm) Displays the simplest method of the line number

xiaoxiao2021-03-06  40

It is also to overload the ONPAINT method, but the method should be more clever! And don't worry about the title, don't use the coordinates, it is convenient! Protected override void onpaint (PainTeventargs e) {base.onpaint (e) ;

IF (this.DataSource! = null) {if (this.visibleRowcount == 0) return;

Rectangle currct;

INT IROWCOUNT = this.visibleRowCount;

String stext = "";

INT nowy = 0;

For (int i = 0; i

}

转载请注明原文地址:https://www.9cbs.com/read-61470.html

New Post(0)