I created a table in mySql named 'user' where fields are:
UserID,UserFirstName,UserMidName,UserLastName,Username,UserType,AcctPassword,DateCreated, DatLastModified and IsDeleted.

I create a separate form in vb.net to insert user record in database. My program can do insert command and bound this data from mySql to datagridview. And now, i wanted to update this by binding data in datagridview into the form(which i was created to insert record) textboxes.

Please let me know how.
Thanks in advance.

Edited by archelle: sentence was awkward.

5 Years
Discussion Span
Last Post by M.Waqas Aslam

hello archelle ,
y not u use bindingsource for this purpose , what u have to do is to give datasourse to bindingsource then set that bindingsource as a datasource of the grid , now bind ur controls with it , for example , if u have a textbox1 , then what u have to do is

textbox1.databind.add("text",bindingsource,"__fieldname__",false)'by default value is false already

by using this code u can easily bind ur controls with ur datagrid
Hope this will helps u

Best Regards

M.Waqas Aslam

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.