Click here to Skip to main content
15,919,434 members
Home / Discussions / C#
   

C#

 
GeneralRe: enum to int Pin
Arun Bhalla12-Aug-04 13:08
Arun Bhalla12-Aug-04 13:08 
GeneralRe: enum to int Pin
Lasse Johansen12-Aug-04 13:28
Lasse Johansen12-Aug-04 13:28 
QuestionScroll Bar???? Pin
Anonymous12-Aug-04 10:15
Anonymous12-Aug-04 10:15 
AnswerRe: Scroll Bar???? Pin
Nick Parker12-Aug-04 11:35
protectorNick Parker12-Aug-04 11:35 
Generalwx.NET Cross-Platform UI Toolkit - NEW VERSION Pin
t9mike12-Aug-04 9:57
t9mike12-Aug-04 9:57 
GeneralRe: wx.NET Cross-Platform UI Toolkit - NEW VERSION Pin
Nick Parker12-Aug-04 11:36
protectorNick Parker12-Aug-04 11:36 
GeneralLate Binding to Powerpoint and Events Pin
SBolder12-Aug-04 9:36
SBolder12-Aug-04 9:36 
Generalplease help me in DataGrid Pin
ImanMahmoud12-Aug-04 9:09
ImanMahmoud12-Aug-04 9:09 
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 separately for each TreeNode under the TopNode in this DataGrid. I used the following code to make my datagrid to respond to one click :
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
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 any TreeNodes are selected although I make a ckeck if (TreeView.TreeNode IsSelected). 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 :
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;   
   }
}
The problems 1 and 3 disturb my counter.

Please if there is a solution.

Thank you
GeneralJoining Two DataSets Pin
YiannisF12-Aug-04 9:08
YiannisF12-Aug-04 9:08 
GeneralJoining Two DataSets Pin
YiannisF12-Aug-04 9:08
YiannisF12-Aug-04 9:08 
GeneralRe: Joining Two DataSets Pin
Wender Oliveira12-Aug-04 10:29
Wender Oliveira12-Aug-04 10:29 
GeneralUI Design Question Pin
ddelapasse12-Aug-04 8:54
ddelapasse12-Aug-04 8:54 
GeneralRe: UI Design Question Pin
mav.northwind12-Aug-04 20:15
mav.northwind12-Aug-04 20:15 
Generalproperty binding Pin
Member 114126612-Aug-04 8:47
Member 114126612-Aug-04 8:47 
GeneralCryptoStream does not work over NetworkStream Pin
mircea8512-Aug-04 8:17
mircea8512-Aug-04 8:17 
QuestionError in objConexao = New SqlConnection(connString); ?? Pin
vilmarbr12-Aug-04 7:55
vilmarbr12-Aug-04 7:55 
AnswerRe: Error in objConexao = New SqlConnection(connString); ?? Pin
Nick Parker12-Aug-04 8:03
protectorNick Parker12-Aug-04 8:03 
GeneralRe: Error in objConexao = New SqlConnection(connString); ?? Pin
vilmarbr12-Aug-04 9:08
vilmarbr12-Aug-04 9:08 
AnswerRe: Error in objConexao = New SqlConnection(connString); ?? Pin
Wender Oliveira12-Aug-04 9:12
Wender Oliveira12-Aug-04 9:12 
GeneralRe: Error in objConexao = New SqlConnection(connString); ?? Pin
vilmarbr12-Aug-04 9:39
vilmarbr12-Aug-04 9:39 
GeneralXmlTextReader XmlNode problem Pin
eggie512-Aug-04 7:31
eggie512-Aug-04 7:31 
GeneralRe: XmlTextReader XmlNode problem Pin
eggie512-Aug-04 7:59
eggie512-Aug-04 7:59 
GeneralRe: XmlTextReader XmlNode problem Pin
Nick Parker12-Aug-04 8:00
protectorNick Parker12-Aug-04 8:00 
GeneralRe: XmlTextReader XmlNode problem Pin
eggie512-Aug-04 8:32
eggie512-Aug-04 8:32 
GeneralRe: XmlTextReader XmlNode problem Pin
Nick Parker12-Aug-04 10:09
protectorNick Parker12-Aug-04 10:09 

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.