Results 1 to 4 of 4

Thread: Accecing a row in a dataset through a datagrid[RESOLVED]

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Gothenburg
    Posts
    4

    Question Accecing a row in a dataset through a datagrid[RESOLVED]

    Hi, I posted this early on the wrong forum, so....
    Ok here we go:
    I have this xml (shortned)
    <Avsyning>
    <model>Membran</model>
    <length>0</length>
    <ANGLE>
    <Pos>44</Pos>
    <Neg>22</Neg>
    </ANGLE>
    </Avsyning>
    This is read to bounded to a datagrid with
    datagrid1.SetDataBinding(dSet, "avsyning")

    No dataview is used (should I?)
    Now I want to (in run time) delete a row in the dataset.

    dataset1.Tables("Avsyning").Rows.RemoveAt(datagrid.currentrowIndex)

    This will delete the wrong row if i sort the datagrid1. The rowIndex is the current row in the datagrid, but to get the row in the dataset what todo? I think a have a solution but it only works if the user don't navigate down to a child (datagrid.currentRowIndex has the value of the index for the parent row... Not the child row. Feels realy strange to me!).

    Thanks for (any) help!

    edit: Tried to explane some more
    Last edited by onis; Apr 11th, 2003 at 06:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width