Click here to Skip to main content
15,917,538 members
Home / Discussions / C#
   

C#

 
QuestionCopy Paste from ListView? Pin
Delegate20-Sep-04 11:14
Delegate20-Sep-04 11:14 
AnswerRe: Copy Paste from ListView? Pin
Heath Stewart20-Sep-04 14:07
protectorHeath Stewart20-Sep-04 14:07 
GeneralIE Toolband Pin
Matt Newman20-Sep-04 10:34
Matt Newman20-Sep-04 10:34 
GeneralRe: IE Toolband Pin
Judah Gabriel Himango20-Sep-04 10:55
sponsorJudah Gabriel Himango20-Sep-04 10:55 
GeneralRe: IE Toolband Pin
Anonymous20-Sep-04 11:06
Anonymous20-Sep-04 11:06 
QuestionBittorrent client in C#? Pin
Marlun20-Sep-04 9:08
Marlun20-Sep-04 9:08 
AnswerRe: Bittorrent client in C#? Pin
Steven Campbell20-Sep-04 10:30
Steven Campbell20-Sep-04 10:30 
GeneralRe: Bittorrent client in C#? Pin
Marlun21-Sep-04 19:32
Marlun21-Sep-04 19:32 
GeneralDataGrid Sorting Problem using a DataSet from ViewState Pin
veroBT20-Sep-04 7:37
veroBT20-Sep-04 7:37 
GeneralRe: DataGrid Sorting Problem using a DataSet from ViewState Pin
Heath Stewart20-Sep-04 13:54
protectorHeath Stewart20-Sep-04 13:54 
GeneralC# and org.apache.log4j.PropertyConfigurator Pin
devvvy20-Sep-04 4:22
devvvy20-Sep-04 4:22 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart20-Sep-04 6:46
protectorHeath Stewart20-Sep-04 6:46 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Steven Campbell20-Sep-04 7:06
Steven Campbell20-Sep-04 7:06 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart20-Sep-04 7:11
protectorHeath Stewart20-Sep-04 7:11 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy21-Sep-04 7:53
devvvy21-Sep-04 7:53 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy21-Sep-04 7:52
devvvy21-Sep-04 7:52 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart21-Sep-04 11:01
protectorHeath Stewart21-Sep-04 11:01 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy22-Sep-04 17:26
devvvy22-Sep-04 17:26 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart22-Sep-04 20:21
protectorHeath Stewart22-Sep-04 20:21 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy22-Sep-04 20:39
devvvy22-Sep-04 20:39 
GeneralRelating datagrid rows to datatable rows Pin
blakeb_120-Sep-04 4:07
blakeb_120-Sep-04 4:07 
Hello,

I am having a little trouble with using the windows forms datagrid control. In my program, I need to give the user the ability to select and unselect multiple rows in the datagrid and then perform some action on those selected rows.

Initially, I was hoping to use checkboxes. I made a bool column in my database and added a checkbox column in my datagrid. This appeared to work okay. When I wanted to determine the selected rows, I just iterated through my data table and looked at the value of the column that was bound to the checkbox column. However, I soon found a problem with this approach. I have a "Select" menu, with different options that select thousands of rows in the datagrid (such as select all, select none, etc.) In order to do this, I needed to change the value of many checkboxes at once, and this is very very slow because I am having to edit each row in the corresponding datatable.

I've been trying to figure out other ways to get the same functionality, and I thought that maybe I could just use the built-in select in the datagrid (highlighting the entire row). I was able to select large numbers of rows much more quickly this way because I wasn't modifying any data in the datatable. However, now I have another problem. I don't know how to relate a row in the datagrid to the correct row in the datatable. I've found some code examples such as this:

BindingManagerBase bm = dataGrid1.BindingContext[dataGrid1.DataSource,dataGrid1.DataMember];
DataRow dr = ((DataRowView)bm.Current).Row;

But, this only works for the current row. What if I have a list of the row indexes in the datagrid, and I want to iterate through that list and perform actions on the correct row in the datatable?

Also, I really prefer the checkboxes over the highlighted rows. Is there a way that I can implement checkboxes without having to make a column in my datatable?

Any ideas would be great!

Thanks,
Blake
GeneralRe: Relating datagrid rows to datatable rows Pin
Anonymous20-Sep-04 8:24
Anonymous20-Sep-04 8:24 
GeneralCrystal Reports progress in an app Pin
Mr. Labenche20-Sep-04 4:04
Mr. Labenche20-Sep-04 4:04 
GeneralRe: Crystal Reports progress in an app Pin
Dave Kreskowiak20-Sep-04 6:44
mveDave Kreskowiak20-Sep-04 6:44 
GeneralRe: Crystal Reports progress in an app Pin
Mr. Labenche23-Sep-04 1:24
Mr. Labenche23-Sep-04 1:24 

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.