|
Subject:
|
how to add new record as first record in dataset
|
|
Posted By:
|
hunzian78@yahoo.com
|
Post Date:
|
4/17/2006 11:50:47 PM
|
Hi all,
Well, i have been stucked in a tricky problem. I want to add a new item(record) as first item(record) in dataset which is already been populated from database.
I hope that I will going to have replies very soon. Thanks in advance for your valuable replies...
Abdul Ghaffar
|
|
Reply By:
|
dutguoyi
|
Reply Date:
|
4/18/2006 10:07:58 PM
|
Maybe you can add a special column named colsort for sorting in DataSet. For example, the colsort data in the the former rows is 0 and the elder is 1. Then you can use datagridview to sort the data by colsort desc. But be careful your memory.
:)¡¶ ¡¶¡¶ No pains, no gains. ¡¶¡¶¡¶
|
|
Reply By:
|
rumbafum
|
Reply Date:
|
4/19/2006 8:21:07 AM
|
Can create a new Dataset, add the record to th new dataset, and then merge data from the old one with preserveChanges set to true...
DataSet ds = new DataSet(); //add new row here ds.Merge(oldDataSet, true);
|
|
Reply By:
|
hunzian78@yahoo.com
|
Reply Date:
|
4/21/2006 12:02:51 AM
|
Thanks Rumbafu for your valuable reply..... it really worked fine....
Abdul Ghaffar
|
|
Reply By:
|
rumbafum
|
Reply Date:
|
4/21/2006 5:23:44 AM
|
No prob
|