TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yaya1899
NA
12
0
How to add a new row or column in DataGrid?
Jan 2 2005 11:55 AM
Hi, im using datagrid to read data from excel file, after data binding, how can i add a new row or a new col into the datagrid ? Here is my code to read data from excel, -------------------------------------------------------------------------------------------------------- using System.Data.OleDb; string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = c:\\Test.xls;Extended Properties=Excel 8.0"; OleDbConnection myConn = new OleDbConnection(strCon); string strCom = " SELECT * FROM [Sheet1$] "; myConn.Open(); OleDbDataAdapter myCommand = new OleDbDataAdapter(strCom , myConn); DataSet inputDataSet = new DataSet(); myCommand.Fill (inputDataSet, "[Sheet1$]"); myConn.Close(); dtg_input.DataMember= "[Sheet1$]"; dtg_input.DataSource = inputDataSet; ---------------------------------------------------------------------------------------------------------
Reply
Answers (
1
)
Reading field of 'Long' datatype from binary file in C#?
can someone translate this line from c++ to c#?