Click here to Skip to main content
15,887,416 members
Home / Discussions / C#
   

C#

 
Questionchanging color of a edited row of a datagrid Pin
Nosnibor9-Aug-07 11:12
Nosnibor9-Aug-07 11:12 
AnswerRe: changing color of a edited row of a datagrid Pin
Nouman Bhatti9-Aug-07 20:06
Nouman Bhatti9-Aug-07 20:06 
AnswerRe: changing color of a edited row of a datagrid Pin
Nouman Bhatti9-Aug-07 20:08
Nouman Bhatti9-Aug-07 20:08 
QuestionDetermine the amount of red in an image Pin
newb2vb9-Aug-07 10:28
newb2vb9-Aug-07 10:28 
AnswerRe: Determine the amount of red in an image Pin
Christian Graus9-Aug-07 11:20
protectorChristian Graus9-Aug-07 11:20 
AnswerRe: Determine the amount of red in an image [modified] Pin
Luc Pattyn9-Aug-07 11:49
sitebuilderLuc Pattyn9-Aug-07 11:49 
AnswerRe: Determine the amount of red in an image Pin
c0ax_lx10-Aug-07 4:29
c0ax_lx10-Aug-07 4:29 
QuestionClipboard copy and a listview Pin
Piet Pelle9-Aug-07 9:31
Piet Pelle9-Aug-07 9:31 
I wonder ... Maybe someone has an idear about this problem . . .
I have created a listview with 12 columns. When I select say 100 rows it takes about 2-3 seconds to copy them to the clipboard (for copying them to excel):

string sClipBoard = "";
for (int i = 0; i < listView1.SelectedItems.Count; i++)
{
sClipBoard = sClipBoard + listView1.SelectedItems[i].SubItems[1].Text + "\t" +
sClipBoard = sClipBoard + listView1.SelectedItems[i].SubItems[2].Text + "\t" +
etc.
}
finally: Clipboard.SetDataObject(sClipBoard, true);

OK. That works fine with 100 lines except: 200 l=9s 300l=20s 400l=35s 1000l= 3m30s

Replacing the string with a stringbuilder does not effect the speed.
Splitting the action in numbers of 100 does not effect the speed (neither different strings)

There has to be a better way ?

Any suggestion is welcome Thanks Smile | :)
AnswerRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 9:43
sponsorJudah Gabriel Himango9-Aug-07 9:43 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 9:54
Piet Pelle9-Aug-07 9:54 
GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 9:57
sponsorJudah Gabriel Himango9-Aug-07 9:57 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 10:14
Piet Pelle9-Aug-07 10:14 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 10:33
Piet Pelle9-Aug-07 10:33 
GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 10:43
sponsorJudah Gabriel Himango9-Aug-07 10:43 
GeneralRe: Clipboard copy and a listview [modified] Pin
Luc Pattyn9-Aug-07 10:53
sitebuilderLuc Pattyn9-Aug-07 10:53 
GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 11:52
sponsorJudah Gabriel Himango9-Aug-07 11:52 
GeneralRe: Clipboard copy and a listview Pin
Luc Pattyn9-Aug-07 12:03
sitebuilderLuc Pattyn9-Aug-07 12:03 
GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 12:55
sponsorJudah Gabriel Himango9-Aug-07 12:55 
GeneralRe: Clipboard copy and a listview Pin
Luc Pattyn9-Aug-07 13:05
sitebuilderLuc Pattyn9-Aug-07 13:05 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 10:55
Piet Pelle9-Aug-07 10:55 
Questionwhat is a C# reference type Pin
misha_grewal9-Aug-07 7:33
misha_grewal9-Aug-07 7:33 
AnswerRe: what is a C# reference type Pin
led mike9-Aug-07 8:10
led mike9-Aug-07 8:10 
AnswerRe: what is a C# reference type Pin
Guffa9-Aug-07 9:07
Guffa9-Aug-07 9:07 
QuestiontextBox1.Visible=false NOT work&#65281; Pin
liubin_aluzi9-Aug-07 7:32
liubin_aluzi9-Aug-07 7:32 
AnswerRe: textBox1.Visible=false NOT work&#65281; Pin
PhilDanger9-Aug-07 8:21
PhilDanger9-Aug-07 8:21 

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.