|
Then you need to run the web request in a background thread (or BackgroundWorker or Task).
|
|
|
|
|
This a good idea!I will try this.Thanks
|
|
|
|
|
hi
i have in my C# WinForm program DataGridView
i need to change the text color of any cell by code.
i try this:
dataGridView8[0, rowCounter].Style.ForeColor = Color.Red;
but it dosnt work
how to do it ?
thanks in advance
modified 13-Feb-12 2:12am.
|
|
|
|
|
Identify the Cell and change it's ForeColor.
Cell.ForeColor = "Red";
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i try this:
dataGridView8[0, rowCounter].Style.ForeColor = Color.Red;
but it dosnt work
|
|
|
|
|
This worked for me.
private void btnGC_Click(object sender, EventArgs e)
{
List<string> lData = new List<string>();
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
this.dataGridView1.DataSource = lData;
this.dataGridView1[0, 3].Style.ForeColor = Color.Red;
}
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks for the help, but the color dosent change
|
|
|
|
|
Then there must be another issue, that code above changes the colour of the text in the specified cell!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm wondering if the Subject is correct and pointing to the problem... If there's a hyperlink in the cell, would changing the Forecolor affect it, or is it going to default to the default hyperlink color?
|
|
|
|
|
Hi everyone! I am trying to write a string of text on Panel control modeled like a sheet of paper. There is no limit to the length of the text which means that I may need three of four or more of the sheets.
I am now facing a problem of knowing the last line of the text for a page so that if there are more words, I can add another sheet and write the rest of the text. I'm fighting with how to determine the point in the full text at which a page will be full so that I can create another sheet and add the rest of the text to the new sheet. Any ideas please. Thanks in advance.
|
|
|
|
|
Assuming this is a WinForms Panel you're talking about, and you are drawing text using Graphics.DrawString() , then what you need to look at is Graphics.MeasureString()
Given the right parameters, it will predict how much area DrawString is going to need to paint a string.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
hi guys ....
i am having a report includes tablix "matrix" with row and column groups in the body of the report. I want to align the tablix at the center of the report after loading the data from my dataset.
another question:
my report always displayed in 2 pages whlie the 2nd page is empty "only header and footer are displayed" i tried 2 rezise every thing smaller but its already fits one page.
|
|
|
|
|
Hi All !
I want to save the content(Row And Column Cell) from a DatGridView To A XML file .how can i do it ?
thanks in advance for any Help !
|
|
|
|
|
If you DataGridView has a datasource, then simply use the WriteXml property[^]. This[^] explains the same process with code.
|
|
|
|
|
thanks , but there is no database or datasource for DataGridView , the user fill only the cells and I want to save this to an XML File .
thanks
RGDS!
|
|
|
|
|
Here is my code , plz help me !
SaveFileDialog saveDialog = new SaveFileDialog();
saveDialog.Filter = "Xml files (*.xml)|*.xml";
saveDialog.FilterIndex = 2;
saveDialog.RestoreDirectory = true;
saveDialog.InitialDirectory = "d:\\";
saveDialog.FileName = "XML File";
saveDialog.Title = "XML Export";
if (saveDialog.ShowDialog() == DialogResult.OK)
{
string OutPutXMLFile = "";
System.Xml.XmlDocument XMLDoc = new System.Xml.XmlDocument();
for (int i = 0; i < DataGridView1.Rows.Count; i++)
{
OutPutXMLFile = "";
for (int j = 0; j < DataGridView1.Columns.Count; j++)
OutPutXMLFile += String.Format("{0:0.00}", DataGridView1.Rows[i].Cells[j].Value);
XMLDoc.CreateElement(OutPutXMLFile);
}
}
but I've got an Error to create a xml file !
thanks !
|
|
|
|
|
Hi All !
is there any help or Link to Animate BackColor Form ... .
Thanks A Lot !
|
|
|
|
|
What are you trying to do?
Is this a windows form, and you just want to change the background colour?
|
|
|
|
|
almost Like This , and in Windows Form . this change Color can be from left to Right and ... .
thanks
|
|
|
|
|
That's a bad idea in Windows Forms as you will be redrawing the entire form over and over again. Performance will be pretty bad.
WPF would have a better time with this, though the learning curve for WPF is very steep.
|
|
|
|
|
i have any problem about in visual C# source code.
how to make the application resistor color code in Visual C #?
I ask for its support ......
thank's
|
|
|
|
|
Your question doesn't make much sense. Please edit it and add more meaningful information.
|
|
|
|
|
Come up with a set of requirements first. What do you want this app to do?
Then break down those requirements into small parts you can solve and come up with designs for those parts.
Then code each part to the design until you have all of the problems solved.
|
|
|
|
|
I would like this application, when I select the colors of the band resistor will be out the amount of value in the "ohm"
you have an example source code?
|
|
|
|
|