|
Let me make this more generic:
- how, in code, can I stop and get the stack trace up to that line of code? Hopefully I can do this without stopping and throwing an exception and reading the stack trace from the Exception object. I'm sure that's a performance hit...
|
|
|
|
|
By using System.Diagnostics.StackFrame like this:
public static void Main()
{
Func();
RL();
}
public static void Func()
{
//Get stack with line numbers
System.Diagnostics.StackTrace Stack = new System.Diagnostics.StackTrace(true);
foreach(System.Diagnostics.StackFrame Frame in Stack.GetFrames())
{
WL(Frame);
}
}
|
|
|
|
|
Thanks. That is exactly what I was looking for. Unfortunately, I never got email about your reply! So I went through the Help files and found this myself. I was just coming back to answer my own question when I saw your reply.
However, I'm curious how expensive *this* is, too...
|
|
|
|
|
hi
i want that where i click on dataGridView1, his value
will apire in textbox2
how to do that ?
|
|
|
|
|
http://www.codeproject.com/KB/cs/Drag_Drop_from_GridView.aspx
from the above mentioned article see how to detect which cell is pressed when u get the right cell than it will be easy for u to show it's value in textbox
|
|
|
|
|
Hi All,
I am working on a project using C# 2.0. I need the functionality in my project that at the runtime, when I resize the form by dragging its border using the mouse , all the controls within the form should resize as well. Please help.
Thank you.
A.Asif
|
|
|
|
|
|
u have to use Anchor and Dock property intelligently.
|
|
|
|
|
Putting all your controls in a table layout panel will make it easy.
Until you realize this message has nothing to say, its too late to stop reading
|
|
|
|
|
scenario:
when i click the datagridview's cell, immediately i need to pass this cell to a WHERE condition to select the remaining fields of the same row.(ie)the gridcell value is an ID value , remaining fields of the ID should be retrieved to textboxes.
I wrote code as
private void DataGrdVw1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dsGridToTxtBx == obj._selectGridCellAreaDetails(DataGrdVw1.CurrentCell.Value.ToString()))
{
txtAreaName.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[1].ToString();
txtRegion.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[2].ToString();
txtLocORinterSt.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[3].ToString();
}
}
Pls help me. I cant trace the datagridview's click event. My above code has no effect in form.
ssk
|
|
|
|
|
Hi,
First of all check whether the Handler you have defined is handling the cell's content click. It will be called only when you click on the cell's content.
Its better to define a Handler for CellClick Event.
To access the current cell's value you can use following :
GridView1.CurrentRow.Cells("ID").Value
Regards,
Ujjaval Modi
|
|
|
|
|
Hi, I am new in vb.net 2003, I am using C# and i want to retrive the control in one form to another form. i am using like this.
public static frmDocumentMaster m_Childform;
public static frmDocumentMaster GetChildInstance()
{
if (m_Childform==null || m_Childform.IsDisposed) //if not created yet, Create an instance
m_Childform = new frmDocumentMaster();
return m_Childform; //just created or created earlier.Return it
}
But its shows only Label control not another control. Please anybody help me.....
f
|
|
|
|
|
- Please use something useful in your title: "Anybody help me???????" is not clear, use "retrieve control in another form" eg.
You can make your controls available in several ways. Personally I find using "static" a bad idea. better is to make your control public, even more better would be to create a public property that exposes the control, even more better than that is to create a public property exposing a property of that control (eg the Text property of a TextBox)
My advice would be to redesign your code.
Hope this helps.
|
|
|
|
|
Hi,
I am using datagrid in Winforms.
How can i set the autogenerate columns =false
I just want only those columns to show up whihc i have added no other columns apart from that.
Thanks.
Deepak Surana
|
|
|
|
|
Hi,
I think you don't have any such property "autogenerate columns" in datagrid for winforms.
Just select the fields you require to display in your database query.
Or else you can set the "Visible" property equal to 'False' for particular column in the datagrid which you dont want to display.
|
|
|
|
|
hello experts,
I have one question... Why ASPX pages are running more slower than any other web technology...?
I saw php sites are running too fast than the any ASP.NET application.
The latest example of it is Code Project it self. When it was in classic ASP than it run smoothly, but since the upgradation is apply on it using ASP.NET technology it running more slower and slower.
one more intersting aspect of ASP.NET is : This is the only web technology which having the compiled code and other technologies are run whole code every time. So .NET should run fast as compare to other...
How to over come with this particular problem...?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
This is a dumb question. Many tests have been done, for example between J2EE and ASP.NET. No matter what the result, examining the code used will result in people pointing out ways to optimise one version or the other. There's really no way to compare apples for apples, the core benefit of ASP.NET is being able to write structured code, no-one said it was faster, although I also don't think it's slower. Each app needs to be written, performance tested and, yes, worked on when it fails to perform as hoped under extreme load. That doesn't mean ASP.NET is slow.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Christian Graus wrote: This is a dumb question.
I strongly opine that the above statement was not at all necessary...coz i think we are all here to help and if you find some question not "up-to-your mark" , then please better do not answer the question than to fire rude words like this.
I have been noticing this kind of behavior from some "experts" as well, on this community. If the users are expected to maintain the decorum and dignity of this community, so are all the "heads" of this community.
Being the owner of this area, doesnt mean that you have got all rights to insult and humiliate the naive users.
I am sure, after reading this long post of protest, my message either would be deleted or I would be barred or even worse, both could happen. But i am not gonna backtrack just due to this. Even if you do any of this to me, you would definitely prove me right.
|
|
|
|
|
Hi friends,
gladiatron said right.
Some people are thining they are only experts and no one else can give answer.
Its helping forum. We should help people in anyway..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I have to disagree with you. Given that the OP's question was both inappropriate and ill-informed, Christian's remarks were quite reasonable. Most people who answer questions in the programming forums do so in a reasonable and understanding manner, which is often difficult with the high volume of 'noise' posts. This is a free site and no one is being paid for offering their assistance. If you are not happy with the standards of response, maybe you should be encouraging those that post to ask more intelligent questions.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Exactly well said.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
I also disagree, although people can seem a little harsh at times, it is usualy because people do not pay attention to the rules... or ask a question that is so obviously a peice of homework.
Also, CP doesn't delete posts, or ban / suspend its members for their opinions. If enough people regard your post as inapropriate, or spam then it will automaticaly be removed. But thats down to the community, not because of one person.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Pankaj - Joshi wrote: The latest example of it is Code Project it self.
Adding CG's post, who said CP became slow after upgradation ? Then better change your internet connection. I felt it's faster than the ASP version, and AFAIK, CP team has not completed the full upgradation process. So they might be uploading something and it cause recompilation of the site which will make it slower. For getting good performance on ASP.NET pages, optimize it, follow best practices and understand well about how it works.
|
|
|
|
|
Well said Navaneeth.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Their is no way to prove you wrong... otherwise I'll definitely give you speed demo between ASP and ASP.net version of Code project.
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|