Click here to Skip to main content
15,889,339 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need assistance with a Producer/Consumer Queue logic where the Consumer can create a limited number of worker threads Pin
harold aptroot24-Apr-09 13:38
harold aptroot24-Apr-09 13:38 
AnswerRe: Need assistance with a Producer/Consumer Queue logic where the Consumer can create a limited number of worker threads Pin
Giorgi Dalakishvili24-Apr-09 22:59
mentorGiorgi Dalakishvili24-Apr-09 22:59 
Questionbluetooth stacks Pin
akinwaadeolu24-Apr-09 12:06
akinwaadeolu24-Apr-09 12:06 
QuestionWCF Question Pin
NETLearning24-Apr-09 11:58
NETLearning24-Apr-09 11:58 
AnswerRe: WCF Question Pin
Hesham Amin24-Apr-09 12:33
Hesham Amin24-Apr-09 12:33 
GeneralWCF Question Pin
NETLearning25-Apr-09 6:13
NETLearning25-Apr-09 6:13 
GeneralRe: WCF Question Pin
Hesham Amin25-Apr-09 23:04
Hesham Amin25-Apr-09 23:04 
QuestionFormatting data in a datagridview Pin
bwood202024-Apr-09 9:23
bwood202024-Apr-09 9:23 
Hello,

I have created a datagridview using C# windows application and I am having formatting issues with the data once the datagridview has been populated. The way I have this set up is before I bind the data to the binding source I add a new row which contains combo boxes. These Como boxes are used to populate the new headers. Once the headers have been modified the data needs to be formatted to data types the system can handle. For example, the datagridview populates dates as mm/dd/yyyy 00.00.00 AM but I need to reformat this to mm/dd/yyyy. I have created a method that loops through each cell in the first row and captures the new header (which works) but when the code that is suppose to reformat the column runs, it doesn't work. the code I have to reformat the columns based on the logic used is dataGridView1.Columns[c].DefaultCellStyle.Format = "d";. However, this doesn't work. Can someone please help me? It is much appreciated. Here is what I have and if it is not enough then let me know and I can post more code.

private void button10_Click(object sender, EventArgs e)
{


if (radioButton1.Checked == true)

{

string[] newHeaders = new string[dataGridView1.ColumnCount];

int n = dataGridView1.ColumnCount;
int c = 0;

for (c = 0; c < n; c++)
{
newHeaders[c] = dataGridView1.Rows[0].Cells[c].Value.ToString();

if (newHeaders[c] == "A1ORDT")
{

dataGridView1.Columns[c].DefaultCellStyle.Format = "d";


}

}




}
else if (radioButton2.Checked == true)
{
//Add code for custom formatting
}
else
{
MessageBox.Show("Please select standard or custom formatting");
}

}

modified on Friday, April 24, 2009 5:30 PM

QuestionMulti Column display ina listbox Pin
edlanka24-Apr-09 9:07
edlanka24-Apr-09 9:07 
AnswerRe: Multi Column display ina listbox Pin
DaveyM6924-Apr-09 9:09
professionalDaveyM6924-Apr-09 9:09 
GeneralRe: Multi Column display ina listbox Pin
edlanka24-Apr-09 9:39
edlanka24-Apr-09 9:39 
GeneralRe: Multi Column display ina listbox Pin
Dan Neely24-Apr-09 9:49
Dan Neely24-Apr-09 9:49 
QuestionClosing DialogBox from other application Pin
Papi83dm24-Apr-09 7:47
Papi83dm24-Apr-09 7:47 
QuestionRemoving bytes from an exe file..... is it possible? Pin
Rajdeep.NET is BACK24-Apr-09 6:15
Rajdeep.NET is BACK24-Apr-09 6:15 
AnswerRe: Removing bytes from an exe file..... is it possible? Pin
musefan24-Apr-09 6:36
musefan24-Apr-09 6:36 
GeneralRe: Removing bytes from an exe file..... is it possible? Pin
Rolando CC24-Apr-09 7:40
professionalRolando CC24-Apr-09 7:40 
AnswerRe: Removing bytes from an exe file..... is it possible? Pin
Ben Fair24-Apr-09 8:38
Ben Fair24-Apr-09 8:38 
AnswerRe: Removing bytes from an exe file..... is it possible? Pin
Skymir24-Apr-09 10:16
Skymir24-Apr-09 10:16 
AnswerRe: Removing bytes from an exe file..... is it possible? Pin
OriginalGriff24-Apr-09 23:23
mveOriginalGriff24-Apr-09 23:23 
QuestionWeird Collection Thing [modified] Pin
#realJSOP24-Apr-09 5:55
mve#realJSOP24-Apr-09 5:55 
AnswerRe: Weird Collection Thing Pin
Gideon Engelberth24-Apr-09 7:21
Gideon Engelberth24-Apr-09 7:21 
GeneralRe: Weird Collection Thing Pin
Rolando CC24-Apr-09 7:43
professionalRolando CC24-Apr-09 7:43 
GeneralRe: Weird Collection Thing Pin
#realJSOP24-Apr-09 8:15
mve#realJSOP24-Apr-09 8:15 
Questionwatch video live stream on pda (broadcast from pc) Pin
b_emsi24-Apr-09 5:50
b_emsi24-Apr-09 5:50 
Questiondatasets over class objects to store data Pin
Tina P24-Apr-09 5:35
Tina P24-Apr-09 5:35 

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.