Hi All my buddy,

I'm trying to add my data to datagrid from mdb. I can do that but the problem is , i need to custom the header.....but it just display all selected item field from my database...can anyone show me how to display in datagrid with only selected item?...plz...need urgently...

i suppose u r using data table to display the data.
add the columns manually or use the following code to add columns

datagridview1.columns.add("Column name","Header Name")

then with the help of data reader assign value to each column one row at a time

datagridview1.rows.add()
datagridview1.item(0,datagridview1.rows.count-1)= datareader1.getstring(0)
datagridview1.item(1,datagridview1.rows.count-1)= datareader1.getstring(1)

Tq bro,...


How to mapp it?...it mean if i have column name "STUDENT_ID" from my database table....then i need to assign it under my custom header in datagridview like :STUDENT ID....how to do that bro....i'm spinning;;;;;;;ekeekekek

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.