Click here to Skip to main content
15,913,939 members
Home / Discussions / C#
   

C#

 
QuestionDataGrid Columns Pin
jinksk19-Sep-05 11:19
jinksk19-Sep-05 11:19 
AnswerRe: DataGrid Columns Pin
miah alom19-Sep-05 11:36
miah alom19-Sep-05 11:36 
AnswerRe: DataGrid Columns Pin
Taurian11019-Sep-05 16:59
Taurian11019-Sep-05 16:59 
AnswerRe: DataGrid Columns Pin
deep719-Sep-05 20:09
deep719-Sep-05 20:09 
QuestionDataGrid Issue Please HELP Pin
Taurian11019-Sep-05 10:45
Taurian11019-Sep-05 10:45 
AnswerRe: DataGrid Issue Please HELP Pin
Christian Graus19-Sep-05 11:35
protectorChristian Graus19-Sep-05 11:35 
GeneralRe: DataGrid Issue Please HELP Pin
Taurian11019-Sep-05 14:31
Taurian11019-Sep-05 14:31 
GeneralRe: DataGrid Issue Please HELP Pin
Christian Graus19-Sep-05 14:34
protectorChristian Graus19-Sep-05 14:34 
GeneralRe: DataGrid Issue Please HELP Pin
Taurian11019-Sep-05 17:01
Taurian11019-Sep-05 17:01 
GeneralRe: DataGrid Issue Please HELP Pin
Christian Graus19-Sep-05 18:15
protectorChristian Graus19-Sep-05 18:15 
GeneralRe: DataGrid Issue Please HELP Pin
Taurian11019-Sep-05 18:39
Taurian11019-Sep-05 18:39 
QuestionProblem with this function.. Pin
Yannielsen19-Sep-05 10:19
Yannielsen19-Sep-05 10:19 
AnswerRe: Problem with this function.. Pin
Christian Graus19-Sep-05 11:37
protectorChristian Graus19-Sep-05 11:37 
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 

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.