Re: String foreach problem



On Wed, 11 Jul 2007 10:32:41 -0700, Mark Wilden <mwilden@xxxxxxxxxxxxxxxx> wrote:

The poster is using a DataGrid. It's not good practice to put a large number
of items in a DataGrid. What would the user do with thousands of rows?.

Well, as has been pointed out, it seems safer to assume that the OP misstated, and they are in fact using a DataSet, not DataGrid. But whether he is or not, my point is that your statement didn't restrict itself to a DataGrid, and as a more general statement I found it lacking.

You didn't write "I can't imagine needing a string created from a DataGrid that is so long that using a StringBuilder instead of creating new strings would be significant".

You did write "I can't imagine needing a string so long that using a StringBuilder instead of creating new strings would be significant".

There's a world of difference between the two statements, and my point is that there certainly are scenarios in which a StringBuilder makes a LOT of sense for concatenating strings.

Pete
.



Relevant Pages

  • Re: Export to Excell
    ... I am exporting a datagrid to Excel using the code as below. ... StringBuilder stringBuilder = new StringBuilder; ... // Append the page start. ... HtmlTextWriter htmlTextWriter = new HtmlTextWriter(new ...
    (microsoft.public.dotnet.framework.aspnet)
  • Export to Excell
    ... I am exporting a datagrid to Excel using the code as below. ... characters, spurious A with an accent characters appear within the ... StringBuilder stringBuilder = new StringBuilder; ... HtmlTextWriter htmlTextWriter = new HtmlTextWriter(new ...
    (microsoft.public.dotnet.framework.aspnet)
  • C# checkbox - what am I doing wrong?
    ... checkbox, then hit a button, then for the value of the DataKeyField in ... the DataGrid to show up as the Text property in a Label. ... StringBuilder sb = new StringBuilder; ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Setting Focus on Edit Row in Datagrid - how do I reference new cli
    ... REALLY LOST. ... When I edit some row below pages 1 the post refreshes back to ... when I view source, ofcourse the datagrid ... > Dim strBuilder As StringBuilder = New StringBuilder ...
    (microsoft.public.dotnet.framework.aspnet)