Click here to Skip to main content
15,891,708 members
Home / Discussions / C#
   

C#

 
GeneralRe: Get Time C#(read only memory) Pin
Trollslayer30-Dec-10 8:35
mentorTrollslayer30-Dec-10 8:35 
GeneralRe: Get Time C#(read only memory) Pin
Bernhard Hiller30-Dec-10 19:54
Bernhard Hiller30-Dec-10 19:54 
AnswerRe: Get Time C#(read only memory) Pin
Rob Philpott30-Dec-10 1:35
Rob Philpott30-Dec-10 1:35 
GeneralRe: Get Time C#(read only memory) Pin
arun_pk30-Dec-10 2:04
arun_pk30-Dec-10 2:04 
GeneralRe: Get Time C#(read only memory) Pin
Rob Philpott30-Dec-10 2:08
Rob Philpott30-Dec-10 2:08 
AnswerRe: Get Time C#(read only memory) Pin
OriginalGriff30-Dec-10 2:16
mveOriginalGriff30-Dec-10 2:16 
Questionmaking two different style of datagridview's one cell Pin
Erdinc2729-Dec-10 21:11
Erdinc2729-Dec-10 21:11 
AnswerRe: making two different style of datagridview's one cell Pin
_Erik_30-Dec-10 0:17
_Erik_30-Dec-10 0:17 
I think you can create two classes, one inheriting from DataGridViewColumn and the other one from DataGridViewCell, where you can use a RichTextBox control to show your data with the format you need. I have never done this, but I guess it is not too hard. Read the documentation about these two classes.

On the other hand, I would like to help you improve your code:

All of these lines (I have added some comments):

C#
string split = dataGridView1.Rows[i].Cells[j].Value.ToString();
string[] split2 = split.Split(new char[] { '.' }); // split.Split('.') is better

// This loop is useless. Yoy can remove it
foreach (string item in split2)
{
    // Are you sure split2 array has two or more items?
    // and since split2 is a string[], there is no need of ToString() for split2[0] and split2[1]
    dataGridView1.Rows[i].Cells[j].Value = split2[0].ToString()+"/*/*" + split2[1].ToString();
}


Give the same result as:

C#
dataGridView1[j,i].Value = dataGridView1[j,i].Value.ToString().Replace(".", "/*/*");


But there is a difference: if you do not have a "." char, your code would also throw an exception.
AnswerRe: making two different style of datagridview's one cell Pin
Henry Minute30-Dec-10 3:16
Henry Minute30-Dec-10 3:16 
AnswerRe: making two different style of datagridview's one cell Pin
Dave Kreskowiak30-Dec-10 4:24
mveDave Kreskowiak30-Dec-10 4:24 
GeneralRe: making two different style of datagridview's one cell Pin
Erdinc2730-Dec-10 21:17
Erdinc2730-Dec-10 21:17 
QuestionC# IME (Input Method Editor) Pin
vnmatt29-Dec-10 19:57
vnmatt29-Dec-10 19:57 
AnswerRe: C# IME (Input Method Editor) Pin
Richard MacCutchan29-Dec-10 22:40
mveRichard MacCutchan29-Dec-10 22:40 
AnswerRe: C# IME (Input Method Editor) Pin
Michael Agroskin30-Dec-10 16:22
Michael Agroskin30-Dec-10 16:22 
GeneralRe: C# IME (Input Method Editor) Pin
vnmatt31-Dec-10 3:52
vnmatt31-Dec-10 3:52 
AnswerRe: C# IME (Input Method Editor) Pin
greg ofiesh13-Jan-11 7:47
greg ofiesh13-Jan-11 7:47 
QuestionDetection of Facial Feature points in OpenCV Pin
mkfrns29-Dec-10 19:45
mkfrns29-Dec-10 19:45 
AnswerRe: Detection of Facial Feature points in OpenCV Pin
JF201529-Dec-10 21:52
JF201529-Dec-10 21:52 
QuestionReading registry keys Pin
rakeshs31229-Dec-10 18:23
rakeshs31229-Dec-10 18:23 
AnswerRe: Reading registry keys Pin
Abhinav S29-Dec-10 18:31
Abhinav S29-Dec-10 18:31 
AnswerRe: Reading registry keys Pin
RaviRanjanKr29-Dec-10 18:50
professionalRaviRanjanKr29-Dec-10 18:50 
AnswerRe: Reading registry keys Pin
Anil Kumar.Arvapalli29-Dec-10 20:44
Anil Kumar.Arvapalli29-Dec-10 20:44 
GeneralRe: Reading registry keys Pin
PIEBALDconsult30-Dec-10 2:24
mvePIEBALDconsult30-Dec-10 2:24 
AnswerRe: Reading registry keys Pin
Kevin Marois30-Dec-10 5:40
professionalKevin Marois30-Dec-10 5:40 
QuestionListView scroll while typing Pin
Figmo229-Dec-10 16:52
Figmo229-Dec-10 16:52 

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.