/add a column for serial no DataSet ds = new DataSet(); DataColumn c = new DataColumn(); c.ColumnName = ' Serial No.' ; c.DataType = typeof( int); ds.Tables.Add( ' TableA'); // add a table ds.Tables[0].Columns.Add(c); // add the column ds.Tables[0].Columns[0].AutoIncrement = true; // set the autoincrement (it starts from 0) // this two lines add a blank row for the serial no '0' and remove it // that way the serial number starts from 1, instead of 0 for the fetched records. Ds.Tables[0].Rows.Add( 0); ds.Tables[0].Rows[0].Delete(); // after this you can upload the fetched records in a regular way (please refer 'TableA' and dataset ds though) (see this codeguru.com link: ' (How to display large number of rows in a DataGridView?). When answering a question please: • Read the question carefully. • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome. • Don't tell someone to read the manual. Chances are they have and don't get it. ![]() Data Grid View Vb NetSerial Number To A Datagridview in VB Net ROWINDEX ignore this: Content: aCalendar+ Android Calendar v0.99.8 No Ad.apk Air War v1 [Mod Money].apk APUS. Visual Basic; Web. You can hide the serial number column. How to sum datagridview columns title and columns value in textbox VB.net By the number of values. I am creating Windows application in VB. Physical chemistry of metals darken and gurry pdf to excel. NET 2005 how to set Auto Increment number to my first Column in DataGridView (My first Column name is Sr No Which i.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |