|
Managed String objects are immutable under .NET. You can't change an existing string, you can only return a new string. A StringBuilder object can do what you want though, since it's treated as an array of characters instead of a string. You can get the string equivilent out of the StringBuilder by calling it's ToString method.
|
|
|
|
|
Thanks a lot. I'm going to look for the StringBuilder object then.
/edit: I managed to get exactòy what I wanted with the StringBuilder object.
How annoying there's not a clear() method for it, BTW.
Is setting the string length to 0 the best method to clear it or there's a smarter way to do that?
Thanks again
modified on Tuesday, May 6, 2008 11:23 AM
|
|
|
|
|
Ciccio7 wrote: Is setting the string length to 0 the best method to clear it or there's a smarter way to do that?
Setting the length to 0 works just fine. If the length property is increased, any new characters added to the existing length are automatically initialized to 0, or Unicode NULL. This prevents the previous contents of the stringbuilder from being recovered and prevents the stringbuilder from being used to "capture" the previous contents of memory, closing a possible security hole.
|
|
|
|
|
Hello Everybody,
Hope all are doing well.
I have an application where I have to show data in a gridview.
I want that when user scroll the horizontal scrollbar first 3 columns should not be scrolled i.e. first 3 columns should always shown like we shown the header of the gridview to the user always at the time of vertical scrolling. Like this also I want a row in the bottom should always shown to the user(it could be the footer).Plz send me the sample if u have otherwise
tell me how to achieve this.
Thanks in Advance.
Happy Coding!!!!!!
A key to every Solution
|
|
|
|
|
Both the DataGridViewColumn and DataGridViewRow classes expose a Frozen property that does this. All you have to do is set the Frozen property of the columns you want not to scroll.
myDGV.Columns(0).Frozen = True
|
|
|
|
|
Hi All,
I want to generate a table and add the rows (it contains 2 TDs) dynamically and this table should be in just like div and this div should be present like a popup when I do right click on the link. This should be done using JSON like in each TD, we are displaying links dynamically and calling webservices by clicking on those links
Thanks
Visala
modified on Monday, May 5, 2008 5:56 AM
|
|
|
|
|
I assume you want the ASP.NET forum then ?
JSON just returns data, it's up to you to turn that into rows in your table.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Actually, we are generating dynamic controls instead static controls. So, i just want to generate the dynamic popup when we do right click on the link and popup should contain just like table and the rows will be increased depending on the data retrieved.
So, if you provide the logic for this scenario, its fine.
But, the answer you have given is not appropriate
Thanks
Visala
|
|
|
|
|
visala wrote: But, the answer you have given is not appropriate
What lofty criteria must a reply then meet, before you grace it with your mighty seal of appropriateness?
Pits fall into Chuck Norris.
|
|
|
|
|
We are doing the UI part in JSON format. we got new feature for the next release. I have searched so many links, but I got only javascript with this requirement, not the json. So, I have posted here.
I am not saying that your answer is not correct, but I think that the answer, which he has given is not suitable to my question.
Thanks,
Visala
|
|
|
|
|
Oh, maybe it was just your wording that threw me into judgemental waters. You can't program with JSON, only with JavaScript, which will use your JSON data to manipulate DHTML elements to present tables, selects etc. Try looking for some resources on DHTML and JSON serialisation. I'm can't help more than that, 'cos I don't really know more.
Pits fall into Chuck Norris.
|
|
|
|
|
I created table dynamically, but I am not getting the right click option even I use setcapture() and it is not displayed like a popup.
The function, which I have written to generate the table is as follows. If you find anything to do, please let me know
function createDynTable(row, col)
{
oContextMenu.innerHTML="";
//oContextObject=oTarget;
iMenuItems=0;
oContextMenu.setCapture();
// get the reference for the body
var mybody = document.getElementsByTagName("body")[0];
var mydiv = document.createElement("div");
// creates a <table> element and a <tbody> element
mytable = document.createElement("table");
mytablebody = document.createElement("tbody");
// creating all cells
for(var j = 0; j < row; j++) {
// creates a <tr> element
mycurrent_row = document.createElement("tr");
for(var i = 0; i < col; i++) {
// creates a <td> element
mycurrent_cell = document.createElement("td");
// add edit cell;
mycurrent_cell.ondblclick = function (evt) { editCell(this);};
// creates a text node
currenttext = document.createTextNode("cell is row "+j+", column "+i);
// appends the text node we created into the cell <td>
mycurrent_cell.appendChild(currenttext);
// appends the cell <td> into the row <tr>
mycurrent_row.appendChild(mycurrent_cell);
}
// appends the row <tr> into <tbody>
mytablebody.appendChild(mycurrent_row);
}
// appends <tbody> into <table>
mytable.appendChild(mytablebody);
mydiv.appendChild(mytable);
// appends <table> into <body>
mybody.appendChild(mytable);
// sets the border attribute of mytable to 2;
mytable.setAttribute("border", "2");
//return mytable;
oContextMenu.innerHTML=mytable;
iMenuItems++;
}
Thanks,
Visala
|
|
|
|
|
visala wrote: So, if you provide the logic for this scenario, its fine.
But, the answer you have given is not appropriate
Actually, the answer is spot on. This is NOT the forum for this question. There is an ASP.NET and a web programming forum on this site. Either would have been a more appropriate choice. There are reasons that we don't just have one forum here on the site - it's so that people can find answers to problems in readily accessible locations without having to wade through questions about technology's they couldn't care less about.
|
|
|
|
|
Hi all,
I want to know.. that how many serial ports can be
supported by Windows OS:
Windows 98
Windows XP
Windows 2000
Windows 2003
The Serial Ports (COM ) in d sense//
Physicaly present
and Virtualy also..
plz reply I m waitng..
thanks in advance..
|
|
|
|
|
hi all,
i develope one application in VS2005
and it requires .NET framework 2.0 installed to execute
at Client side.
so can anyone tell me the details of
min System requirements for the framework 2.0.
Actualy i dont have the access to microsoft right now..
so plz dont give me Microsoft site's reference.
thanks in advance..
waiting for ur reply...
|
|
|
|
|
One way around this is to google the question and view googles cache of a MS page.
Supported Operating Systems: Windows 2000 Service Pack 3; Windows 98; Windows 98 Second Edition; Windows ME; Windows Server 2003; Windows XP Service Pack 2
More than I thought....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
* Supported Operating Systems: Windows 2000 Service Pack 3; Windows 98; Windows 98 Second Edition; Windows ME; Windows Server 2003; Windows XP Service Pack 2
* Required Software:
o Windows Installer 3.0 (except for Windows 98/ME, which require Windows Installer 2.0 or later). Windows Installer 3.1 or later is recommended.
o IE 5.01 or later: You must also be running Microsoft Internet Explorer 5.01 or later for all installations of the .NET Framework.
* Disk Space Requirements: 280 MB (x86), 610 MB (x64)
|
|
|
|
|
I am using windows installer. I need to find where A product was installed and copy the packed dlls to the installed folder. So users are forbidden to change the install path.
My questions are:
1. How to invalid the “browser” button so that users cannot change the install path?
2. How can I run some code(e.g. call a dll) at the very beginning of installation? By over writting "Install" and "BeforeInstall" methods, it can only run after the dlls were copied to installed path!
thanks so much!
do it.
|
|
|
|
|
please any one give me help on that
i want to work with primavera V5.0 integration API from the visual studio 2008
and i don't know how i call them and work with them
|
|
|
|
|
Do they not have a website ? I've never heard of it, and I assume many others here are the same, how can we help ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thx for your reply and yes thay have
and that's it
www.primavera.com
and i just want to know how to deal with the API in .net
|
|
|
|
|
Looks like it's a Java control. Which means, you can't. Unless you create a java window and write tons of code to communicate between C# and the fake child window that is really a Java app.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
I am planning to develop a website which have a simulator where allows users to design thier nail design online. This will be something drag and drop the design to the fingernail in 3D mode.
I would like to ask can this implement in C# with Managed DirectX? And, how do I implement this using C# wi9th Managed DirectX?
Thanks.
|
|
|
|
|
I have a very large application and I am trying to get a handle on its working set, I suspect the same methods are being repeatedly jitted and chucked out of memory because of memory constraints.
How can confirm this, is there a tool that will let me watch or log what the runtime is up to ? I have already confirmed using the .NET performance counters that methods are continually being jitted when I repeat the same actions in application. Now I want to drill down an determine exactly which methods are being repeatedly jitted when I repeat these actions ?
Regards
Ray
"Je Suis Mort De Rire"
Blogging @ Keratoconus Watch
'Cos the righteous truth is, there ain't nothing worse than
some fool lying on some Third World beach wearing
spandex, psychedelic trousers, smoking damn dope
pretending he gettin' consciousness expansion. I want
consciousness expansion, I go to my local tabernacle
an' I sing with the brothers and sisters -- Alabama 3
|
|
|
|
|
The full version of .NET Framework does not implement code pitching (discarding JITted code). Only .NET Compact Framework currently does this. See http://msdn.microsoft.com/en-us/library/ms231445.aspx[^] for a note on this.
Do watch out for dynamic assemblies for XML serialization, which if I recall correctly can end up being repeatedly recompiled if you don't use the right options to cache the serializer assembly. These are built by generating C# code and invoking the C# compiler so their cost is very high indeed. See XmlSerializing your way to a Memory Leak[^].
Otherwise, be sure you're disposing all objects you use which have a Dispose method or implement IDisposable . If you don't, the object's finalizer may need to be run, which causes it to survive the first GC and pushes it into an older generation. See "Finalization and Performance" in Garbage Collector Basics and Performance Hints[^].
Finally, for tools, FxCop will tell you if you haven't called Dispose on your member variables in your class's Dispose method, if your member variables implement IDisposable. To follow what allocations are happening where, try CLR Profiler[^].
DoEvents: Generating unexpected recursion since 1991
|
|
|
|