Quote Originally Posted by ChrisE View Post
well I don't know the Kendo Grid.


this is what I use for the DGV, it adds a Linenumber
see if you can't adapt it to the Kendo Grid

Code:
Public Class Form1

    Private mRandomClass As New Random()

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim dtb As New System.Data.DataTable
        dtb.Columns.Add("Column1", GetType(Integer))
        dtb.Columns.Add("Column2", GetType(Double))
        dtb.Columns.Add("Column3", GetType(Date))
        dtb.Columns.Add("Column4", GetType(Decimal))
        dtb.Columns.Add("Column5", GetType(Integer))
        dtb.Columns.Add("Column6", GetType(Integer))

        For i As Integer = 0 To 10
            Dim Zahl As Double = mRandomClass.Next(100, 10000000)
            Dim Datum As Date = Date.Now.AddSeconds(Convert.ToDouble(mRandomClass.Next(1, 1000000)))
            Dim Geld As Decimal = mRandomClass.Next(1, 100000000)
            dtb.LoadDataRow(New Object() {1 + i, _
                                                   Zahl.ToString("#,##0.00"), _
                                                   Datum.ToString("dd.MM.yyyy HH:mm:ss"), _
                                                   Geld.ToString("#,##0.00"), _
                                                   mRandomClass.Next, _
                                                   mRandomClass.Next}, _
                                               True)
        Next
        Dim dvw As DataView = dtb.DefaultView
        dvw.Sort = "Column3 ASC"
        Dim dtbSorted As DataTable = dvw.ToTable()
        DataGridView1.DataSource = dtbSorted
        Me.DataGridView1.Columns(4).DefaultCellStyle.Format = "c"
    End Sub

    Private Sub DataGridView1_CellPainting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting
        RownumberToHeader(CType(sender, DataGridView), e, Color.Brown)
    End Sub

    Public Sub RownumberToHeader(ByVal dgv As DataGridView, _
   ByVal e As DataGridViewCellPaintingEventArgs, _
   Optional ByVal nColor As Object = Nothing, _
   Optional ByVal lastRowOnly As Boolean = False, _
   Optional ByVal selRowOnly As Boolean = False)
        Dim d As New Date
        Dim w As Boolean, numColor As Color, dFont As Font

        With dgv
            If .RowCount < 2 Then Exit Sub

            Dim font As Font = .RowHeadersDefaultCellStyle.Font
            dFont = New Font(font.FontFamily, font.Size, FontStyle.Bold)

            Dim rc As String = Format(.RowCount, " #,##0")

            Dim maxSize As SizeF = New SizeF(TextRenderer.MeasureText(rc, dFont).Width, _
              TextRenderer.MeasureText(rc, dFont).Height)

            .RowHeadersWidth = CInt(maxSize.Width + 25)

            numColor = .RowHeadersDefaultCellStyle.ForeColor
            If nColor IsNot Nothing Then numColor = CType(nColor, Color)

            Dim k As Short = CShort(IIf(.AllowUserToAddRows = True, 2, 1))
            Dim ri As Integer = 0

            w = (e.ColumnIndex = -1 And e.RowIndex >= ri)
            If lastRowOnly Then
                ri = .RowCount - k
                w = (e.ColumnIndex = -1 And e.RowIndex >= ri)
            ElseIf selRowOnly And dgv.SelectedRows.Count > 0 Then
                ri = .SelectedRows(0).Index
                w = (e.ColumnIndex = -1 And e.RowIndex = ri)
            End If
        End With

        If w Then
            If dgv.Rows(e.RowIndex).IsNewRow = False Then
                With e
                    Dim rowStr As String = Format(.RowIndex + 1, " #,##0")


                    Dim StringSize As SizeF = New SizeF( _
                      TextRenderer.MeasureText(rowStr, dFont).Width, _
                      TextRenderer.MeasureText(rowStr, dFont).Height)

                    .PaintBackground(.ClipBounds, False)
                    .PaintContent(.ClipBounds)

                    Using brush As New SolidBrush(numColor)
                        .Graphics.DrawString((rowStr).ToString, dFont, brush, _
                          .CellBounds.Right - StringSize.Width, _
                          .CellBounds.Top + (.CellBounds.Height - StringSize.Height) / 2)
                    End Using

                    .Handled = True
                End With
            End If
        End If
    End Sub
HTH
Thanks Chris but its an asp.net mvc website with the telerik/kendo grid which renders different than a winforms grid. It calls the controller method I posted to get its datasource at the client level