Click here to Skip to main content
15,891,248 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem with this function.. Pin
miah alom19-Sep-05 11:38
miah alom19-Sep-05 11:38 
GeneralRe: Problem with this function.. Pin
Yannielsen19-Sep-05 12:23
Yannielsen19-Sep-05 12:23 
QuestionFiltering Publisher ID with LCE (COM+) Pin
Fred dBu19-Sep-05 10:11
Fred dBu19-Sep-05 10:11 
QuestionC# and SQL database Pin
Drew McGhie19-Sep-05 9:46
Drew McGhie19-Sep-05 9:46 
AnswerRe: C# and SQL database Pin
Jim_Stanley19-Sep-05 13:54
Jim_Stanley19-Sep-05 13:54 
QuestionOverride Paint Method for DataGrid Pin
zaboboa19-Sep-05 9:41
zaboboa19-Sep-05 9:41 
AnswerRe: Override Paint Method for DataGrid Pin
Dave Kreskowiak19-Sep-05 12:53
mveDave Kreskowiak19-Sep-05 12:53 
GeneralRe: Override Paint Method for DataGrid Pin
zaboboa20-Sep-05 1:48
zaboboa20-Sep-05 1:48 
There is not much to my Paint code:

protected override void Paint(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, CurrencyManager source, int rowNum, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight) <br />
       { <br />
          DataRowView view = (DataRowView) source.Current;<br />
          System.Drawing.Color myColour = Color.White;<br />
          numberFormatInfo = new NumberFormatInfo();<br />
	      numberFormatInfo.CurrencySymbol = "$";<br />
	      numberFormatInfo.NumberDecimalDigits = 0;<br />
	      numberFormatInfo.CurrencyDecimalDigits = 0;<br />
	      numberFormatInfo.CurrencyNegativePattern = 1;<br />
          <br />
          //object o = this.GetColumnValueAtRow(source, rowNum);<br />
          <br />
          <br />
          string[] str = view.DataView.Table.Rows[rowNum]["IndentLevel"].ToString().Split('~');<br />
          /*<br />
          if (rowNum < 4) {<br />
             this.Format = "n";<br />
             this.FormatInfo = numberFormatInfo;<br />
          } else {<br />
             this.Format = "c";<br />
             this.FormatInfo = numberFormatInfo;<br />
          } <br />
          */<br />
          <br />
          <br />
          <br />
          // --- Main Heading ---<br />
          if (str.Length == 1) {<br />
             myColour = Color.Coral;<br />
          } else if (str.Length == 2) {<br />
             // --- Sub Headings ---<br />
             if (str[1] == "1" || str[1] == "4") {<br />
                myColour = Color.PaleGoldenrod;<br />
             // --- Net Sum Headings ---<br />
             } else if (str[1] == "7") {<br />
                myColour = Color.Lavender;<br />
             // --- Other Headings ---<br />
             } else {<br />
                myColour = Color.Wheat;<br />
             }<br />
          // --- Populated Rows ---<br />
          } else if (str.Length == 3) {<br />
             myColour = Color.SeaShell;<br />
          } else {<br />
             myColour = Color.Thistle;<br />
          }<br />
		  <br />
		  // ----------------------------<br />
		  // ------ Paint the Row -------<br />
		  // ----------------------------<br />
          try{ <br />
             backBrush = new SolidBrush(myColour); <br />
          } <br />
          catch(Exception) {} <br />
          finally {<br />
             base.Paint(g, bounds, source, rowNum, backBrush, foreBrush, alignToRight); <br />
          } <br />
       }


So, the comented out portion couses the datagrid to flicker.
QuestionProblem with ByValue Parameters Pin
Seraphin19-Sep-05 8:24
Seraphin19-Sep-05 8:24 
AnswerRe: Problem with ByValue Parameters Pin
KaptinKrunch19-Sep-05 8:38
KaptinKrunch19-Sep-05 8:38 
GeneralRe: Problem with ByValue Parameters Pin
Seraphin19-Sep-05 8:48
Seraphin19-Sep-05 8:48 
GeneralRe: Problem with ByValue Parameters Pin
KaptinKrunch19-Sep-05 8:53
KaptinKrunch19-Sep-05 8:53 
GeneralRe: Problem with ByValue Parameters Pin
Seraphin19-Sep-05 9:10
Seraphin19-Sep-05 9:10 
GeneralBad solution - copy objects Pin
Seraphin19-Sep-05 9:19
Seraphin19-Sep-05 9:19 
GeneralRe: Bad solution - copy objects Pin
tommazzo19-Sep-05 10:36
tommazzo19-Sep-05 10:36 
QuestionC# reference parameter Pin
Csupor Jenő19-Sep-05 7:32
Csupor Jenő19-Sep-05 7:32 
AnswerRe: C# reference parameter Pin
Dave Kreskowiak19-Sep-05 8:34
mveDave Kreskowiak19-Sep-05 8:34 
GeneralRe: C# reference parameter Pin
Csupor Jenő19-Sep-05 8:51
Csupor Jenő19-Sep-05 8:51 
GeneralRe: C# reference parameter Pin
Dave Kreskowiak19-Sep-05 9:28
mveDave Kreskowiak19-Sep-05 9:28 
QuestionANDing, XOR 2 images Pin
DeepToot19-Sep-05 7:32
DeepToot19-Sep-05 7:32 
AnswerRe: ANDing, XOR 2 images Pin
Christian Graus19-Sep-05 11:40
protectorChristian Graus19-Sep-05 11:40 
QuestionAbout filealign compiler option Pin
Dario Solera19-Sep-05 7:12
Dario Solera19-Sep-05 7:12 
AnswerRe: About filealign compiler option Pin
leppie19-Sep-05 7:19
leppie19-Sep-05 7:19 
AnswerRe: About filealign compiler option Pin
Dave Kreskowiak19-Sep-05 8:05
mveDave Kreskowiak19-Sep-05 8:05 
GeneralRe: About filealign compiler option Pin
Dario Solera19-Sep-05 21:51
Dario Solera19-Sep-05 21:51 

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.