Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I added a row to the datagridview with following codes:

Dim drx As DataRow

drx = _DataSet.Tables(0).NewRow

drx.Item(0) = 1

drx.Item(1) = id

...

_DataSet.Tables(0).Rows.Add(drx)

 

I want my datagirdview automatically selected this new row right after the codes above. How can this be done?

 

Thanks in advance.

  • 2 weeks later...
Posted

Thanks for your reply. The problem I got is the dataset somehow sorted my newly added data. Let's say my current datagridview is sorted by the first column. If I add a record there, it will be added in sorted order. Which means it may not be added at the end of the datagrid.

 

I thought I have written this (sort problem)down at the beginning of my first post, but I didn't :o

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...