In datagrid, is it possible to add rows one by one at runtime. That means after entering data in one row next row will be added.

Answer

Example
dim da as new sqldataadapter("select...",conn)
dim ds as new dataset
da.fill(ds,xyz)
dim dr as datarow
dr=ds.tables(0).rows.newrow
with dr
.items(0)=textbox1.text
.items(1)=textbox2.text
.items(2)=textbox3.text
ds.tables(0).addrow(dr)

datagrid1.datasource=ds.tables(0)

All DATA GRID Questions

Ask your interview questions on data-grid

Write Your comment or Questions if you want the answers on data-grid from data-grid Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---