![]() ![]() Thank You Reed.This is even more easier and better. ![]() Like this: Dim check As Boolean For i as Integer 0 To check datagrid1.rows i.cells 'checkbox'.checked. At the end of the cycle, if any of the ceckboxes is checked, your boolean will be true. Reed Kimble - "When you do things right, people won't be sure you've done anything at all" you can go through the whole datagrid (meaning the rows in the datagrid) assigning the checked of the checkbox column. to run it click on Start this will start the project. If e.ColumnIndex = -1 AndAlso e.RowIndex > -1 AndAlso e.RowIndex < - 1 Thenĭim indexString As String = (e.RowIndex + 1).ToStringĭim sz As SizeF = e.Graphics.MeasureString(indexString, DataGridView1.Font)ĭim pt As New PointF(e.CellBounds.Width - sz.Width, e.CellBounds.Y + (e.CellBounds.Height / 2 - sz.Height / 2))Į.Paint(e.ClipBounds, DataGridViewPaintParts.All)Į.Graphics.DrawString(indexString, DataGridView1.Font, Brushes.Black, pt) Go to Files -> Open -> Project/Solution and select Kuckoos SMS.sln file located in main package.Private Sub DataGridView1_CellPainting(sender As Object, e As DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting NET to create code that can be compiled and cached on the server for. Still result in sequential row numbering (it is not clear if that is the desired behavior). NET allows you to use fully object-oriented languages such as C and Visual Basic. This assumes that changing row order (via a sort for example) should Assuming an unbound datagrid where the row header number is for display purposes only, you can draw it dynamically and not worry about associating the number with a particular row. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |