Click here to Skip to main content
15,914,360 members
Home / Discussions / C#
   

C#

 
GeneralRe: setup project Pin
Serge Lobko-Lobanovsky14-Jun-04 2:17
Serge Lobko-Lobanovsky14-Jun-04 2:17 
GeneralRe: setup project Pin
Heath Stewart14-Jun-04 3:35
protectorHeath Stewart14-Jun-04 3:35 
QuestionHow can I initialize tapiFax in C# Pin
GuruVN13-Jun-04 19:24
GuruVN13-Jun-04 19:24 
GeneralDataGridBoolColumn Pin
quocbao13-Jun-04 15:22
quocbao13-Jun-04 15:22 
GeneralRe: DataGridBoolColumn Pin
DougW4813-Jun-04 17:17
DougW4813-Jun-04 17:17 
GeneralRe: DataGridBoolColumn Pin
Heath Stewart13-Jun-04 18:47
protectorHeath Stewart13-Jun-04 18:47 
GeneralRe: DataGridBoolColumn Pin
DougW4814-Jun-04 9:22
DougW4814-Jun-04 9:22 
GeneralRe: DataGridBoolColumn Pin
Heath Stewart13-Jun-04 18:54
protectorHeath Stewart13-Jun-04 18:54 
A CheckBox is not actually used in a DataGridBoolColumn. The class uses ControlPaint.DrawCheckBox to draw a checkbox in the appropriate state.

A good way is - if you're binding DataSets or DataTables (which actually contain the row data in a DataSet - is to handle the DataTable.RowChanged event. The DataRowChangeEventArgs gives you information about the DataRow that was changed, though not the exact column that was changed. When this event is fired, though, just check the boolean columns in your handler and do whatever action is appropriate.

A more abstract implementation - to handle cases when you bind ADO.NET data sources or typed lists (any IList or IListSource implementation) is to get the CurrencyManager for the control and handle the ItemChanged event:
private void WatchForChanges()
{
  CurrencyManager cm = (CurrencyManager)dataGrid1.BindingContext[
    dataGrid1.DataSource, dataGrid1.DataMember];
  cm.ItemChanged += new ItemChangedEventHandler(
    this.CurrencyManager_ItemChanged);
}
private void CurrencyManager_ItemChanged(object sender,
  ItemChangedEventArgs e)
{
  // ...
}


 

Microsoft MVP, Visual C#
My Articles
Generalhelp about print Pin
ggl16513-Jun-04 15:01
ggl16513-Jun-04 15:01 
GeneralAttachment Database Pin
The_Soul_Of_Rock13-Jun-04 14:31
The_Soul_Of_Rock13-Jun-04 14:31 
GeneralRe: Attachment Database Pin
Heath Stewart13-Jun-04 18:45
protectorHeath Stewart13-Jun-04 18:45 
GeneralRe: Attachment Database Pin
The_Soul_Of_Rock13-Jun-04 21:09
The_Soul_Of_Rock13-Jun-04 21:09 
GeneralDelete FileDialog Pin
anatsg13-Jun-04 7:49
anatsg13-Jun-04 7:49 
GeneralRe: Delete FileDialog Pin
Heath Stewart13-Jun-04 18:37
protectorHeath Stewart13-Jun-04 18:37 
GeneralRe: Delete FileDialog Pin
anatsg14-Jun-04 9:11
anatsg14-Jun-04 9:11 
Generalsome int16[ ] arrays: OutOfMemoryException Pin
noizy13-Jun-04 7:39
noizy13-Jun-04 7:39 
GeneralRe: some int16[ ] arrays: OutOfMemoryException Pin
Colin Angus Mackay13-Jun-04 12:52
Colin Angus Mackay13-Jun-04 12:52 
GeneralMenu Images in ContextMenu Pin
gek_at13-Jun-04 7:13
gek_at13-Jun-04 7:13 
GeneralRe: Menu Images in ContextMenu Pin
Mazdak13-Jun-04 7:27
Mazdak13-Jun-04 7:27 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 7:34
gek_at13-Jun-04 7:34 
GeneralRe: Menu Images in ContextMenu Pin
leppie13-Jun-04 10:20
leppie13-Jun-04 10:20 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 11:43
gek_at13-Jun-04 11:43 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 11:59
gek_at13-Jun-04 11:59 
GeneralRe: Menu Images in ContextMenu Pin
leppie13-Jun-04 12:19
leppie13-Jun-04 12:19 
GeneralRe: Menu Images in ContextMenu Pin
gek_at13-Jun-04 23:20
gek_at13-Jun-04 23:20 

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.