Click here to Skip to main content
15,905,414 members
Home / Discussions / C#
   

C#

 
QuestionCrystal Reports for Visual Studio .NET (Parameter Fields Runtime Customization)? Pin
Naveed Kamboh20-Sep-05 6:50
Naveed Kamboh20-Sep-05 6:50 
QuestionMSDE 2000 Insance Invalid Pin
theStorminMormon20-Sep-05 6:43
theStorminMormon20-Sep-05 6:43 
Question.Net Remoting and WebClient memory trouble... Pin
The Liquidian20-Sep-05 6:19
The Liquidian20-Sep-05 6:19 
QuestionOutlook, own EMailAddress Pin
mkano20-Sep-05 6:09
mkano20-Sep-05 6:09 
QuestionWebsite Counter Pin
jeff1920-Sep-05 4:40
jeff1920-Sep-05 4:40 
AnswerRe: Website Counter Pin
Jon Sagara20-Sep-05 7:42
Jon Sagara20-Sep-05 7:42 
QuestionUsing C++ in C# appliacation Pin
Yoyosch20-Sep-05 4:15
Yoyosch20-Sep-05 4:15 
AnswerRe: Using C++ in C# appliacation Pin
Not Active20-Sep-05 9:05
mentorNot Active20-Sep-05 9:05 
QuestionMSDE 2000 connection error Pin
theStorminMormon20-Sep-05 4:06
theStorminMormon20-Sep-05 4:06 
QuestionSelect ListView Item on KeyPress Pin
miah alom20-Sep-05 3:59
miah alom20-Sep-05 3:59 
AnswerRe: Select ListView Item on KeyPress Pin
John Fisher20-Sep-05 9:27
John Fisher20-Sep-05 9:27 
GeneralRe: Select ListView Item on KeyPress Pin
miah alom20-Sep-05 9:40
miah alom20-Sep-05 9:40 
GeneralRe: Select ListView Item on KeyPress Pin
Abdullah_Hunzai22-Oct-09 20:00
Abdullah_Hunzai22-Oct-09 20:00 
QuestionStretching a polygon side in C# Pin
20-Sep-05 3:52
suss20-Sep-05 3:52 
AnswerRe: Stretching a polygon side in C# Pin
Yoyosch20-Sep-05 4:06
Yoyosch20-Sep-05 4:06 
GeneralRe: Stretching a polygon side in C# Pin
subramanyeswari20-Sep-05 17:43
subramanyeswari20-Sep-05 17:43 
AnswerRe: Stretching a polygon side in C# Pin
Andy Moore20-Sep-05 18:15
Andy Moore20-Sep-05 18:15 
GeneralRe: Stretching a polygon side in C# Pin
subramanyeswari21-Sep-05 17:30
subramanyeswari21-Sep-05 17:30 
QuestionVisual Studio tools for Office Pin
Giannis Zetas20-Sep-05 3:15
Giannis Zetas20-Sep-05 3:15 
AnswerRe: Visual Studio tools for Office Pin
NassosReyzidis20-Sep-05 3:31
NassosReyzidis20-Sep-05 3:31 
QuestionProgrammatically showing and hiding a scollbar in a multiline textbox Pin
Dan Neely20-Sep-05 3:07
Dan Neely20-Sep-05 3:07 
Questionoverride Paint method for DataGrid Pin
zaboboa20-Sep-05 2:52
zaboboa20-Sep-05 2:52 
Hello, I have this simple Paint method for my datagrid:

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 />
          string[] str = view.DataView.Table.Rows[rowNum]["IndentLevel"].ToString().Split('~');<br />
          <br />
// HERE IS THE PROBLEM--------<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 commented out portion couses the datagrid to flicker, if it is inserted in the code, and other controls like buttons, etc.. don't show up on the form, unless you move the form. If it's commented out, everything is working smooth and fine. Any ideas?

Thank you
QuestionDialog box exit Pin
baronics20-Sep-05 2:37
baronics20-Sep-05 2:37 
AnswerRe: Dialog box exit Pin
Ashok Dhamija20-Sep-05 3:22
Ashok Dhamija20-Sep-05 3:22 
GeneralRe: Dialog box exit Pin
baronics20-Sep-05 4:58
baronics20-Sep-05 4:58 

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.