First row different from the rest

A

AD

Is there any way to attach (or display statically) first row of the
datagrid in a way that is different from rest of the rows?
 
A

AD

not in UI sense.
i want first row to be obtained from different db table and rest of
the rows from a different table in db( or data set)
 
A

Alvin Bruney

ok well just go get your dataset the ordinary way using a select statement.
when you are done create a row stuff the values in it and insert it at
position zero then call accept changes.
[snip]

DataRow newRow = ds.Tables [0].NewRow();

for(int count = 0; count < e.Item.Cells.Count; count++)

{

newRow[count] = count.ToString();

}

ds.Tables[0].Rows.InsertAt(newRow,0 );

ds.AcceptChanges();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top