About 874,000 results
Open links in new tab
  1. c# - How to number the rows of DataGridView? - Stack Overflow

    Jan 7, 2012 · The alternative for those that are binding their DataGridView is to create a method to loop through and number each row. private void numberMyGrid(DataGridView dgv) { …

  2. How to number rows in dataGrid - Microsoft Q&A

    Apr 21, 2023 · For updating the row number when adding and deleting items, you could create a custom property DisplayRowNumber and use local : DataGridBehavior. DisplayRowNumber = …

  3. c# - Show row number in row header of a DataGridView - Stack Overflow

    Mar 6, 2012 · Is it possible to show row number in the row header of a DataGridView? I'm trying with this code, but it doesn't work: private void setRowNumber(DataGridView dgv) { foreach …

  4. Auto number increment - Microsoft Q&A

    Dec 3, 2020 · You can use the following function to set DataGridView's row numbers. Private Sub SetRowNumber(ByVal dgv As DataGridView) . For Each row As DataGridViewRow In …

  5. c# - how to set row number in grid view - Stack Overflow

    Dec 29, 2013 · I need to set number of row in data grid view (like identity in sql) in winforms. i am dynamically adding columns and rows in grid view. any idea. Why not just do that in your data, …

  6. DataGridCell.RowNumber Property (System.Windows.Forms)

    You can use the RowNumber value to specify a DataRow in the DataTable associated with the System.Windows.Forms.DataGrid control. Gets or sets the number of a row in the DataGrid …

  7. datagrid - Row and Column count of data grid in C# - Stack Overflow

    Jan 29, 2012 · There is no DataGrid.Rows.Count property or something similar for finding out the number of columns. What you have to do is to look behind the DataGrid, at the DataSource …

  8. Manipulate Columns in DataGridView Control - Windows Forms

    May 6, 2025 · Learn how to manipulate columns in DataGridView Control using the properties of the DataGridViewColumn class.

  9. Simple way to display row numbers on WPF DataGrid

    Jan 11, 2011 · WPF 4 DataGrid: Getting the Row Number into the RowHeader. Useable like this <DataGrid ItemsSource="{Binding ...}" behaviors:DataGridBehavior.DisplayRowNumber="True">

  10. c# - Generating row numbers automatically in the header of dataGridView

    Oct 25, 2013 · To display text in the row header you can use the Row.HeaderCell.Value as shown below: DataGridView gridView = sender as DataGridView; if (null != gridView) foreach …

  11. Some results have been removed
Refresh