|
In a datagrid code which is like this
<asp:datagrid id="dgAllCircles" style="Z-INDEX: 102; LEFT: 256px; POSITION: absolute; TOP: 136px" runat="server" pagesize="5" showfooter="True" allowpaging="True" onitemcommand="MyFunct" autogeneratecolumns="False">
<itemstyle font-size="Smaller" font-names="Verdana" horizontalalign="Center">
<headerstyle font-size="Smaller" font-names="Verdana" font-bold="True" horizontalalign="Center">
<columns>
<asp:boundcolumn datafield="SrNo" headertext="Sr No">
<asp:boundcolumn datafield="CircleZip" headertext="Circle Zip">
<asp:boundcolumn datafield="CircleName" headertext="Circle Name">
<asp:templatecolumn headertext="Edit">
<itemtemplate>
<asp:button id="cmdInfo" text="More Info" commandname="Info" runat="server">
<asp:templatecolumn headertext="Delete">
<itemtemplate>
<asp:imagebutton id="Imagebutton3" runat="server" causesvalidation="False" commandname="Delete" imageurl="images\g_Delete.jpg">
<pagerstyle nextpagetext="Next" font-size="Smaller" font-names="Verdana" prevpagetext="Prev">
I am getting event when I click on Next or Prev link of page But I am not hetting the events when I click on button .Any Idea please.
Thank you.
|
|
|
|
|
Sorry ,I don't know where the code has gone but the code was having a datagrid which is havig 5 columns 3 showing data and 2 columns of buttons .
|
|
|
|
|
Hi,
I am writing windows forms with c#, but
from switching from one form to another form,
there is 2 or 3 seconds that require the application to
process some stuff underlined, so the form on the screen
appear to be in messy due to not refresh yet. How
do I solve this problem ?
Thanks
|
|
|
|
|
Do you mean that your app takes 2-3 seconds to do something and so does not process paint messages ? If so, do it in another thread.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yes, the app need to save the stuff in database from the previous form
and then load another new form. So you mean process the database operation
in another thread ? Any other simple methods, does it relate to
double buffering problem or other issues ?
Thanks
|
|
|
|
|
ppp001 wrote: does it relate to
double buffering problem or other issues ?
Most probably not. Are you doing some heavy duty painting? If not, it's because of the paint messages not being processed by your application for the 2-3 seconds it takes to save to the database.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
The painting is light, just simple form. So it is the application
processing that block the painting process. Are there any methods
to solve this problem beside using another thread ?
Thanks
|
|
|
|
|
You can try calling Application.DoEvents at various points in your long running operation, but that's not really recommended. Do you have any restriction on using threads, they should be fairly simple to implement, IMO.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Anybody tried it? The NDoc wiki presumably contains a hint how, but the wiki is out of order currently.
Thanks,
Wout
|
|
|
|
|
|
Should have checked the sourceforge forum before!
Hmmm, works but generics doesn't yet.
Wout
|
|
|
|
|
|
I'm creating a copy of IE using System.Diagnostics.Process and I can pass it any URL at startup, but can't find a way to check what page is open, or to send a new page.
I'm implementing this for html help, and only want to change hte page if the user has navigated away from the current target, otherwise I just want to give the broswer focus again. I'm reluctant to use the help provider class because it opens using the system default browser and our (client provided) style sheets don't work in FF.
|
|
|
|
|
Hi,
I need to convert an hex datetime value 0x43599f4e to a .net datetime. I tried to convert the hex value to an int, but couldn't convert that to a datetime since System.Convert doesn't support conversion of long/int values to datetime. Any ideas?
Thanks
Paul
paul
|
|
|
|
|
PaulLou wrote: I need to convert an hex datetime value 0x43599f4e to a .net datetime.
How is this hex value a datetime ? Where did it come from ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Is it ANSI C time? ie: The number of seconds since 1/1/1970 midnight, the Unix time epoch? If so, then do this...
int intTime = 0x43599f4e;
DateTime myTime = new DateTime(1970, 1, 1);
myTime = myTime.AddSeconds((double)intTime);
|
|
|
|
|
Hi Joshua,
Your solution works great. The values got converted correctly. Thanks a lot for your reply. Can you pl tell me to me why 1970 0101 is taken as the seed value, or the reason behind it. I somehow thought year 1900 would be the year from which the calculations takes place and it is not in .net.
Thanks
Paul
|
|
|
|
|
Hi Paul. I'm glad to hear that it's working for you.
PaulLou wrote: Can you pl tell me why 1970/01/01 is taken as the seed value, or the reason behind it.
The time value that you had was in ANSI C time. It's a 32 bit time_t type (just a signed int really) in the C language which is used by other standard ANSI C time functions. 1970/01/01 00:00:00 is what's called the UNIX epoch. Time is stored as seconds since the UNIX time epoch.
So, 0 would be 1970/01/01 00:00:00.
60 would be 1970/01/01 00:01:00.
Why did they choose 1970? I don't know. Probably because it sounded like a good idea at the time. Unfortunately, since it is a signed 32 bit integer, it'll overflow sometime in the year 2038. So some of our old C and C++ apps will go through the equivalent of a Y2K issue at that time.
Java time apparently starts at 1970 too, but it uses milliseconds instead of seconds.
I think MS Access' timestamp field starts at 1900.
Well, that's my 2 cents.
|
|
|
|
|
hi everyone,
i have gathered some image resources from devenv of Microsoft.net vs, and i saw some bitmaps of 16x256 size (a list of 16x16 but 16 images) for example.
I understood devenv uses these bitmaps as images in program but divides into 16x16 images first.
how can i divide this large images into small images (any type) programatically?
thanx.
|
|
|
|
|
The most obvious way would be to write code to load the image, then copy each section into a 16x16 bitmap and save it
Bitmap [] bitmaps = new Bitmap[16];
for(int i=0; i < 16; ++i)
{
bitmaps[i] = new Bitmap(16, 16, toolstrip.PixelFormat);
using (Graphics gr = Graphics.FromImage(bitmaps[i]))
{
gr.DrawImageUnscaled(toolstrip, i*16, 0, 16, 16);
}
}
That's not been run, so it could have errors, but you get the idea. bitmaps should contain an array of images for each icon. You can call Bitmap.Save to save them to disc.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Because you're not passing the item by reference, it's being copied every time you call the function.
If you check 'Ignore HTML tags in this message (good for code snippets)' below, we'll be able to see all of your code and comment further
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hmm array is created using the new keyword, that makes it a reference type doesn t it?
|
|
|
|
|
yes, that is true, but you still need to specify ref if you want to pass by reference.
Like I said, I'm guessing because you didn't post your code legibly. In .NET, reference types are reference counted. A new object is created when your old object is modified, unless it's passed by ref.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: yes, that is true, but you still need to specify ref if you want to pass by reference.
I think you misread the question. The OP asked about copies of the *array* being created when accessing the SomeArray property, he doesn't want to pass the result of obj.SomeArray[i] by reference or by value. Arrays are reference types, so they are *not* copied. In the OP's code, only the reference to the array is copied when he does obj.SomeArray.
Christian Graus wrote: In .NET, reference types are reference counted. A new object is created when your old object is modified, unless it's passed by ref
Huh? I thought reference counting is solely for the purpose of garbage collection. It definitely is *not* used to implement copy on write semantics.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|