Click here to Skip to main content
15,898,371 members
Home / Discussions / C#
   

C#

 
JokeRe: Looping through Controls on a tab page Pin
BoneSoft17-Jul-07 12:10
BoneSoft17-Jul-07 12:10 
GeneralRe: Looping through Controls on a tab page Pin
PIEBALDconsult17-Jul-07 14:04
mvePIEBALDconsult17-Jul-07 14:04 
GeneralRe: Looping through Controls on a tab page Pin
Mike Dimmick17-Jul-07 20:17
Mike Dimmick17-Jul-07 20:17 
GeneralRe: Looping through Controls on a tab page Pin
PIEBALDconsult18-Jul-07 8:56
mvePIEBALDconsult18-Jul-07 8:56 
AnswerRe: Looping through Controls on a tab page Pin
BoneSoft17-Jul-07 10:48
BoneSoft17-Jul-07 10:48 
QuestionSelect Records From DataGridView Pin
polishprogrammer17-Jul-07 10:08
polishprogrammer17-Jul-07 10:08 
AnswerRe: Select Records From DataGridView Pin
Paul Conrad17-Jul-07 19:11
professionalPaul Conrad17-Jul-07 19:11 
GeneralRe: Select Records From DataGridView Pin
polishprogrammer18-Jul-07 4:11
polishprogrammer18-Jul-07 4:11 
Thanks for the advice.

I actually did try the dtSelectedRecords.Add(row) command first, but kept getting the error that the row already belongs to another table. I didn't want to delete the row from the original table (because the original table is the one that's bound to the grid view), so I had to find some other method that imports a copy of the rows. ImportRow fits that need and it seems to simply insert the records into the table at the last position in the table. What seems to have caused the trouble is the way the rows are added to the DataGridViewRowCollection.SelectedRows collection. I think the rows are added in a last in-first out structure.

What I wound up doing-something that works for now-is import all the rows into the datatable that I need in there and then sort the datatable using the DataTable.Select function to assign the sorting criteria. I import the rows from the DataRow [] into a target table from which I create the report. It's a bit more convoluted than I want and it might not be the most efficient method, especially if the user is selecting quite a few records, but it seems to do the job.
QuestionList View Search Pin
topksharma198217-Jul-07 9:44
topksharma198217-Jul-07 9:44 
AnswerRe: List View Search Pin
BoneSoft17-Jul-07 10:14
BoneSoft17-Jul-07 10:14 
GeneralRe: List View Search Pin
topksharma198217-Jul-07 22:16
topksharma198217-Jul-07 22:16 
GeneralRe: List View Search Pin
BoneSoft18-Jul-07 1:49
BoneSoft18-Jul-07 1:49 
AnswerRe: List View Search Pin
Luis Alonso Ramos17-Jul-07 14:29
Luis Alonso Ramos17-Jul-07 14:29 
GeneralRe: List View Search Pin
topksharma198217-Jul-07 23:04
topksharma198217-Jul-07 23:04 
GeneralRe: List View Search Pin
Luis Alonso Ramos18-Jul-07 5:27
Luis Alonso Ramos18-Jul-07 5:27 
Questioncookies Pin
daku117-Jul-07 9:40
daku117-Jul-07 9:40 
AnswerRe: cookies Pin
dino209417-Jul-07 10:27
dino209417-Jul-07 10:27 
AnswerRe: cookies Pin
Dave Kreskowiak17-Jul-07 10:27
mveDave Kreskowiak17-Jul-07 10:27 
AnswerRe: cookies Pin
Ravi Bhavnani17-Jul-07 17:35
professionalRavi Bhavnani17-Jul-07 17:35 
GeneralRe: cookies Pin
daku117-Jul-07 11:53
daku117-Jul-07 11:53 
GeneralRe: cookies Pin
Dave Kreskowiak17-Jul-07 14:04
mveDave Kreskowiak17-Jul-07 14:04 
GeneralRe: cookies Pin
Paul Conrad17-Jul-07 12:32
professionalPaul Conrad17-Jul-07 12:32 
Questionany interview questions Pin
Sree Nivas17-Jul-07 9:36
Sree Nivas17-Jul-07 9:36 
AnswerRe: any interview questions Pin
snorkie17-Jul-07 9:49
professionalsnorkie17-Jul-07 9:49 
JokeRe: any interview questions Pin
PIEBALDconsult17-Jul-07 10:31
mvePIEBALDconsult17-Jul-07 10:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.