Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
GeneralWhen to call .EndInvoke Pin
Judah Gabriel Himango10-Aug-04 10:49
sponsorJudah Gabriel Himango10-Aug-04 10:49 
GeneralRe: When to call .EndInvoke Pin
Nick Parker10-Aug-04 11:18
protectorNick Parker10-Aug-04 11:18 
GeneralRe: When to call .EndInvoke Pin
Judah Gabriel Himango11-Aug-04 4:16
sponsorJudah Gabriel Himango11-Aug-04 4:16 
GeneralRe: When to call .EndInvoke Pin
Heath Stewart10-Aug-04 11:31
protectorHeath Stewart10-Aug-04 11:31 
GeneralGetting a list of installed appliactions Pin
leifm10-Aug-04 10:20
leifm10-Aug-04 10:20 
GeneralRe: Getting a list of installed appliactions Pin
Nick Parker10-Aug-04 10:44
protectorNick Parker10-Aug-04 10:44 
GeneralRe: Getting a list of installed appliactions Pin
Heath Stewart10-Aug-04 11:33
protectorHeath Stewart10-Aug-04 11:33 
GeneralA problem in DataGrid Pin
ImanMahmoud10-Aug-04 9:25
ImanMahmoud10-Aug-04 9:25 
I have a datagrid that all of its columns are BoolColumnStyle and its DataSource is a table with no relations. I relate this DG with a counter, when I mark true or false in each DataGridCell the counter adds or subtracts (respectively) a certain number. Also I relate a TreeView with this DataGrid that the previous counter works for each TreeNode under the TopNode in this DataGrid. I use this code to make my datagrid to respond to one click :

<Font face="Courier New" size=2>private void dataGrid1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
    DataGrid.HitTestInfo hti = this.dataGrid1.HitTest(e.X, e.Y); 

    try 
    {						
        if( hti.Type = = DataGrid.HitTestType.Cell ) 
	{   	
	   int r = (int)hti.Row;
	   int c = (int)hti.Column;
		
	   DataRow dr = table.Rows[r];
	   DataColumn dc = table.Columns[c];
		
	   this.dataGrid1[r,c] = !(bool) this.dataGrid1[r,c];
        }
     }
     catch(Exception ex ) 
     {	
        MessageBox.Show(ex.ToString()); 
     }
	
} // dataGrid1_MouseUp</font>

I have the following problems :

1. The following message appears. I do not know what is the ListManeger or in other words, I do not understand what is the problem.

The ListManeger’s position must be equal to the rowNum.
Parameter name: rowNum Do you want to correct the value?


2. The DataGrid responds to clicks even when there is no TreeNodes are selected. I want the DataGrid to respond to clicks only when any TreeNode under the TopNode is selected.

3. when the selected TreeNode is changed, I empty the DataGrid by the following code, but the last cell that I add a value to it remains checked :

<Font face="Courier New" size=2>for(int i=0 ; i<table.Rows.Count ; i++)
{
   DataRow dr = table.Rows[i];
					
   for(int j=0 ; j<table.Columns.Count; j++)
   {
	dr[j] = false;
   }
}</font>

The problems 1 and 3 disturb my counter.

Please if there is a solution.

Thank you
GeneralComboboxes and Tooltips Pin
fozzwald10-Aug-04 9:10
fozzwald10-Aug-04 9:10 
GeneralHook up a static object to the Property Grid Pin
matthias s.10-Aug-04 8:54
matthias s.10-Aug-04 8:54 
GeneralRe: Hook up a static object to the Property Grid Pin
Nick Parker10-Aug-04 10:39
protectorNick Parker10-Aug-04 10:39 
GeneralNewLine Hell... Pin
Korjiro10-Aug-04 8:27
Korjiro10-Aug-04 8:27 
GeneralRe: NewLine Hell... Pin
Stefan Troschuetz10-Aug-04 9:26
Stefan Troschuetz10-Aug-04 9:26 
GeneralRe: NewLine Hell... Pin
Korjiro10-Aug-04 11:00
Korjiro10-Aug-04 11:00 
GeneralExecuteNonQuery Pin
Member 84960810-Aug-04 7:42
Member 84960810-Aug-04 7:42 
GeneralRe: ExecuteNonQuery Pin
Heath Stewart10-Aug-04 11:39
protectorHeath Stewart10-Aug-04 11:39 
GeneralRegistry Problem..! Pin
QzRz10-Aug-04 7:22
QzRz10-Aug-04 7:22 
GeneralRe: Registry Problem..! Pin
Nick Parker10-Aug-04 7:40
protectorNick Parker10-Aug-04 7:40 
Questionhow do get permission to send an email from ASP.net? Pin
spazzman10-Aug-04 7:15
spazzman10-Aug-04 7:15 
AnswerRe: how do get permission to send an email from ASP.net? Pin
Nick Parker10-Aug-04 7:28
protectorNick Parker10-Aug-04 7:28 
QuestionHow to operate registry of WinCE Pin
wk_vigorous10-Aug-04 6:48
wk_vigorous10-Aug-04 6:48 
AnswerRe: How to operate registry of WinCE Pin
Nick Parker10-Aug-04 7:24
protectorNick Parker10-Aug-04 7:24 
GeneralA problem in DataGrid Pin
Anonymous10-Aug-04 4:50
Anonymous10-Aug-04 4:50 
GeneralRe: A problem in DataGrid Pin
Nick Parker10-Aug-04 6:11
protectorNick Parker10-Aug-04 6:11 
Generalavoiding double invoking Pin
Stephan Wright10-Aug-04 3:25
Stephan Wright10-Aug-04 3:25 

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.