Click here to Skip to main content
15,892,269 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# launches another program Pin
Dragonfly_Lee7-Jan-09 19:53
Dragonfly_Lee7-Jan-09 19:53 
AnswerRe: C# launches another program Pin
Pritam Karmakar7-Jan-09 21:45
Pritam Karmakar7-Jan-09 21:45 
GeneralRe: C# launches another program Pin
ipstefan8-Jan-09 0:12
ipstefan8-Jan-09 0:12 
AnswerRe: C# launches another program Pin
HosamAly8-Jan-09 0:09
HosamAly8-Jan-09 0:09 
GeneralRe: C# launches another program Pin
ipstefan8-Jan-09 0:15
ipstefan8-Jan-09 0:15 
GeneralRe: C# launches another program Pin
HosamAly8-Jan-09 5:38
HosamAly8-Jan-09 5:38 
QuestionForcina a space or suppressing zeroes in Data Grid Pin
Vanq20097-Jan-09 7:53
Vanq20097-Jan-09 7:53 
AnswerRe: Forcina a space or suppressing zeroes in Data Grid Pin
Henry Minute7-Jan-09 9:08
Henry Minute7-Jan-09 9:08 
One way to do what I think you want to do is to handle the CellFormatting Event of the DataGridView

Something like this.
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
    // return if value is null
    if (e.Value == null)
    {
        return;
    }

    // get the column triggering the event
    DataGridViewColumn col = this.dataGridView1.Columns[e.ColumnIndex];

    // if it is the column you want
    if (col.DataPropertyName == "pDiff")
    {
        // Format data source value how you like
        if (e.Value.ToString() == "-Infinity")
        {
            e.Value = "";

                // very important. Prevents the standard text formatting
                e.FormattingApplied = true;
        }
    }
}


Hope this helps, or, I have at least understood your problem correctly.

Henry Minute

If you open a can of worms, any viable solution *MUST* involve a larger can.

QuestionRe: Forcina a space or suppressing zeroes in Data Grid Pin
Vanq20097-Jan-09 10:38
Vanq20097-Jan-09 10:38 
AnswerRe: Forcina a space or suppressing zeroes in Data Grid Pin
Henry Minute7-Jan-09 11:02
Henry Minute7-Jan-09 11:02 
GeneralRe: Forcina a space or suppressing zeroes in Data Grid Pin
Vanq20098-Jan-09 2:02
Vanq20098-Jan-09 2:02 
QuestionFileSystemWatcher Events Fired Twice Pin
#realJSOP7-Jan-09 5:58
mve#realJSOP7-Jan-09 5:58 
AnswerRe: FileSystemWatcher Events Fired Twice Pin
Dave Kreskowiak7-Jan-09 6:15
mveDave Kreskowiak7-Jan-09 6:15 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
#realJSOP7-Jan-09 6:43
mve#realJSOP7-Jan-09 6:43 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
Dave Kreskowiak7-Jan-09 8:01
mveDave Kreskowiak7-Jan-09 8:01 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
Luc Pattyn7-Jan-09 6:25
sitebuilderLuc Pattyn7-Jan-09 6:25 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
#realJSOP7-Jan-09 6:42
mve#realJSOP7-Jan-09 6:42 
GeneralRe: FileSystemWatcher Events Fired Twice Pin
Luc Pattyn7-Jan-09 6:49
sitebuilderLuc Pattyn7-Jan-09 6:49 
AnswerRe: FileSystemWatcher Events Fired Twice Pin
Not Active7-Jan-09 7:06
mentorNot Active7-Jan-09 7:06 
AnswerRe: FileSystemWatcher Events Fired Twice Pin
Jason C Bourne7-Jan-09 10:47
Jason C Bourne7-Jan-09 10:47 
QuestionStore Key / Value Pair Pin
mark_w_7-Jan-09 5:32
mark_w_7-Jan-09 5:32 
AnswerRe: Store Key / Value Pair Pin
S. Senthil Kumar7-Jan-09 5:47
S. Senthil Kumar7-Jan-09 5:47 
GeneralRe: Store Key / Value Pair Pin
mark_w_7-Jan-09 5:52
mark_w_7-Jan-09 5:52 
Questionretrieving the last increment value in a table Pin
bfis1081377-Jan-09 4:22
bfis1081377-Jan-09 4:22 
AnswerRe: retrieving the last increment value in a table Pin
Wendelius7-Jan-09 4:25
mentorWendelius7-Jan-09 4:25 

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.