Click here to Skip to main content
15,889,315 members
Home / Discussions / C#
   

C#

 
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 
GeneralSearch and display text in richtextbox Pin
clatten20-Sep-04 3:24
clatten20-Sep-04 3:24 
GeneralRe: Search and display text in richtextbox Pin
mav.northwind20-Sep-04 3:48
mav.northwind20-Sep-04 3:48 
GeneralRe: Search and display text in richtextbox Pin
clatten20-Sep-04 5:14
clatten20-Sep-04 5:14 
GeneralCrystal Reports progress in an app Pin
Mr. Labenche20-Sep-04 2:58
Mr. Labenche20-Sep-04 2:58 
GeneralRegister and unregister a Windows Service programmatically... Pin
Salil Khedkar20-Sep-04 2:00
Salil Khedkar20-Sep-04 2:00 
GeneralRe: Register and unregister a Windows Service programmatically... Pin
S Sansanwal20-Sep-04 13:52
S Sansanwal20-Sep-04 13:52 
GeneralUsing Excel.WorksheetFunction in C# Pin
itstime9820-Sep-04 1:00
itstime9820-Sep-04 1:00 
GeneralRe: Using Excel.WorksheetFunction in C# Pin
sreejith ss nair20-Sep-04 1:08
sreejith ss nair20-Sep-04 1:08 
GeneralRe: Using Excel.WorksheetFunction in C# Pin
itstime9820-Sep-04 1:39
itstime9820-Sep-04 1:39 
GeneralRe: Using Excel.WorksheetFunction in C# Pin
itstime9820-Sep-04 1:50
itstime9820-Sep-04 1:50 
GeneralRe: Using Excel.WorksheetFunction in C# Pin
ODS21-Sep-04 1:29
ODS21-Sep-04 1:29 
GeneralRe: Using Excel.WorksheetFunction in C# Pin
itstime9821-Sep-04 18:46
itstime9821-Sep-04 18:46 
GeneralForm.Close() Pin
exhaulted20-Sep-04 0:43
exhaulted20-Sep-04 0:43 

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.