winapp: inserting a rowcount column in a datagridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nev
    Contributor
    • Oct 2007
    • 251

    winapp: inserting a rowcount column in a datagridview

    basically, what i'm trying to do is to place a rowcount column in my datagridview.

    my dgv already has values. i'm thinking i can use dgv.columns.ins ert(0, ???) to place the rowcount column in the dgv.

    i did...

    dim dtgvc as datagridviewcol umn

    [what should i do here?]

    dgv.columns.ins ert(0,dtgvc)
  • nev
    Contributor
    • Oct 2007
    • 251

    #2
    heres an update, i'm able to add a new column already.

    dtg.datasource = [one of my datatables]

    dim dtgtxt as new datagridviewtex tbox

    dtgtxt.name = "colNo"
    dtgtxt.headerte xt = "No"

    dtg.insert(0,dt gtxt)

    for i as integer = 0 to dtg.rows.count - 1
    dtg("colNo",i). value = i
    next

    the problem is, the rowcount values are not placed in the dtg.

    Comment

    Working...