|
You need some javascript function because each postback is a submit in your page. I was with this problem but with linkbutton and I solved it without js just by setting href="" and not href="#" like I did... but it was a linkbutton! Good luck!
Wender Oliveira
.NET Programmer
|
|
|
|
|
just add a regular HTML button input type to the html, and don't rely on the designer to much...:
<br />
<input type="button" onclick="CallSomeJavaScriptFunctionHere()" /><br />
JS code (just googled for it...
<br />
function scrollToBottom() { <br />
document.body.scrollTop = document.body.offsetHeight; <br />
} <br />
<br />
function checkIfScrollToBottomIsNeeded() { <br />
scrollToBottomIsNeeded = ( document.body.scrollTop >= ( document.body.offsetHeight - ( window.innerHeight * 1.2 ) ) ); <br />
} <br />
<br />
function scrollToBottomIfNeeded() { <br />
if( scrollToBottomIsNeeded ) <br />
document.body.scrollTop = document.body.offsetHeight; <br />
} <br />
|
|
|
|
|
Hi,
I cannot find how to create a class at runtime...
if I know the type of the object, and need to create an instance..
foo myObject = new foo();
Type t = myObject.GetType();
// how do I create a new object of type t ??
|
|
|
|
|
|
The way i tend to do it is to get the constructor (usually the parameterless one) and call invoke on it using reflection..
<br />
Type t = ....<br />
<br />
ConstructorInfo constructor = t.GetConstructor(System.Type.EmptyTypes);<br />
<br />
object newObject = constructor.Invoke(null);<br />
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Hi ,
I want to give the color to the particular row of the datagrid at runtime....when....the template column is clicked....so i want to give the backcolor to the entire row at that time that means runtime....
In datagird I have a one column which is a template column...
i have tried like this but this is giving color to the row permanently.....& want to change its color as & when that row's template column clicked....please help me
for(int i=0; i < DGPODetailShow.Columns.Count;i++)
{
DGPODetailShow.Items[0].Cells.[i].BackColor=System.Drawing.ColorTranslator.FromHtml("#EBE5DE");
}
Can anybody help me....
Thanks
|
|
|
|
|
This question belongs in the ASP.NET forum. I'll give you a hint, though: read about ViewState .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi all,
im new to this forum.
i have one issue, i want to do the programming in MSN6 messenger in C#.
do anybody has the idea from where i can get the library, functions for researching for the MSN6 messenger.
its urgent, please help me out.
thanx a lot in advance
Naveen
|
|
|
|
|
Hi !
Search on the codeproject site (with the "msn" keyword), they're some articles.
And on the msdn site
Bye
|
|
|
|
|
Hi all,
im new to this forum.
i have one issue, i want to do the programming in MSN6 messenger in C#.
do anybody has the idea from where i can get the library, functions for researching for the MSN6 messenger.
its urgent, please help me out.
thanx a lot in advance
Naveen
|
|
|
|
|
Well, I just googled for it and discovered I need not have gone so far. The top item in Google's search was right back here at Code Project.
http://www.codeproject.com/com/msn_messenger.asp[^]
Although this example is in in C++, I don't think it would take much to translate it to C#
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
You have to love how cyclical life can be sometimes....
Jeremy Kimball
I have traveled the gutters, lo these many days, with no signs of life. Well met.
-brianwelsch
|
|
|
|
|
...and how Google can find many solutions in most cases; now if only the majority of others would realize that.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Well, you could also try going to the References folder of your project and Add Reference to the COM library "Messenger API Type Library". You'll have to declare an object of type MessengerAPI.Messenger or something close to that. I don't exactly know what it would be because I don't use MSN or have Messenger installed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello!
I wonder if there is a way to access the properties of the controls of another application's forms at runtime...
For example, i want my application to monitor wether a checkbox on another application's form has or has not been checked.
A non-.NET solution would also be useful.
If anyone has ideas, please reply!
10x!
|
|
|
|
|
You're likely looking at using Win32 API P/Invoked calls to FindWindow and GetWindowLong . How comfortable are you with the old APIs?
Jeremy Kimball
I have traveled the gutters, lo these many days, with no signs of life. Well met.
-brianwelsch
|
|
|
|
|
There is no easy way of doing this and no support it in the .NET BCL. Like Jeremy said, "How comfortable are you with the Win32 API?" You'll need to have an in depth knowledge of how windows and controls work and how to pass messages to these windows to get information back from them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have made some 'research' based on Jeremy's suggestions and, indeed, there is no easy way to do that since I'm not very familiar with the Win32 API. I guess i'll wait for future managed implementations..
Thanks anyway!
|
|
|
|
|
Not likely going to happen. What you want to do is difficult because most of the time you have to write custom code to even find the window your looking for, then not all windows are going to expose their properties the same way. Some you can get through send message back and forth, others you have to cast a point to the Win32 Class (not the .NET Framework class!) to get at the properties.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My problem: i have this table, with about 10 to 20 thousand records; applying a rowfilter on a dataview for this table works kind of nice; the thing is that when I have no records matching the given criteria, applying the filter takes way too long (and speed for my program is quite important). I also tried "cheating" (find/rowstatefilter = none), but it seems applying the rowStateFilter lasts about as long as applying the filter. Does anyone have any ideas?
Thx
|
|
|
|
|
Filter it on the database server - that is what it is good at.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
create some index in your software with keyedlist or some array, it demand more memory, but increase speed.
|
|
|
|
|
I agree with Colin, write your SQL so it does the filtering depending on a parameter passed into the stored procedure. There is no reason for you to be passing tens of thousands of records to a client that will only display 10-20 records on the screen at any one time. You might also want to include paging support in the SQL and the Datagrid.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi ,
I want to paint or we can say give the color to the particular row of the datagrid....when....the template column is clicked....so i want to give the backcolor to the entire row at that time....
In datagird I have a one column which is a template column...
Can anybody help me....
Thanks
|
|
|
|
|
The fact that you're mentioning a template column tells me that you're using an ASP.NET DataGrid . If so, this belongs in the ASP.NET forum.
In Windows Forms, you cannot paint an entire row; you can only paint columns by using a custom DataGridColumnStyle implementation.
Microsoft MVP, Visual C#
My Articles
|
|
|
|