|
Is there any way to acheive other than User control?
|
|
|
|
|
1. Create a button column
2. Add padding using datagridviewcellstyle property.
3. Handle cellpainting event to create another button in the cell.
My idea of ideal life : Eat, Sleep, Repeat
|
|
|
|
|
I have created an application using C# 2003
It runs well sometimes, and sometimes it gives the following error
"unable to find a version of the runtime to run this application"
Everytime this message appear, I have to rebuild my application
How to resolve this
Mohammed Gouda
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
|
Hello,
i have a little problem with some Controls, which i have in Forms, UserControls and so on...
in VB.NET it is possible to access them easily with a code like this:
Dim myControl As MyNewUserControl
myControl.Label1.Text = "here's a text"
... now something like that isn't possible in C#, i cannot access for this example a Label, because all labels and other controls aren't there, i get an error, that these Controls doesnt exists. My Code:
MyNewUserControl myControl = new MyNewUserControl();
myControl.Label1.Text = "here's a text"; //Here it doesn't works
What to do now? Thanks for your help.
|
|
|
|
|
|
stancrm wrote: Try to make a property for that
or set Label1 to public.
Ugh!
Don't make labels properties. Make the things you want to change about a label properties. If you make the label a property you can completely lose control over what happens to the label.
Making the label public is worse! Have you never heard of "encapsulation" (aka "information hiding"). It is one of the basic tenets of Object Oriented programming - and you are willfully breaking it without good reason.
|
|
|
|
|
Oh XD
now i've seen that they all are private XD the label was only an example, because if i wanted to change a background or something else and so on it wasn't possible. I could only acces my own methods and variables (of course they was public)
thanks, because VB.net setted those properties automatically to public.
|
|
|
|
|
hi all,
How can i add the shortcut key in my window application. I have a datagridview, after i click on certain row,after that if press "Ctrl + A" then some event will fire.
Any tips are welcome,
Thanks in advance.
regards
cocoocwls
|
|
|
|
|
The DataGridView has a KeyDown event. Use this. In it, check if the keys being pressed are Ctrl and A. If they are then you can perform whatever action it is that you want to do.
Simon
|
|
|
|
|
Hi Simon,
yes, thanks for your suggestion
|
|
|
|
|
hi friends...
how to know SQL server Express is installed in XP and Vista.Anyway to check that ?..registry keys or somethin like that.I hav to create a setup ..before that I need to check whether SQL Server Express 2005 is installed or not.It wil be very helpful for me if you explains with sufficient codes.
With warm regards
denver
|
|
|
|
|
|
Not sure if this is what you're asking, but you can make SQL Server Express 2005 a prerequisite in your installation:
In your deployment project:
- right click, select properties
- click prerequisites
- Check SQL Server and whatever options
|
|
|
|
|
Hi,
I have a C# application which I need to recognize any user activity within the application only.
This I do for the reason of timeout after zero activity.
in the appliction I have differnet usercontrols. what I would like is when ever the user press key ,move mouse , or click to reset a timer. and if there is zero activity whith 20min to throw in a msg.
tnks,
Leeoze
|
|
|
|
|
All you need is a timer that counts down from 20m to 0
then reset the timer to 20 in each event (e.g. mouse move, button click, ...)
when the timer reach 0, fire your msg
Mohammed Gouda
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
I'm not aware of a global event that does that. You'll have to respond to all the different events that you want to treat as activity, and call code to reset your timer from there.
on a From there is a property called KeyPreview. If you set this to true, then key presses on controls on the form will also trigger the key events on the form as well. This will save you responding to key events on all controls.
(There is an Application.Idle event that gets fired whenever the application has finished processing and is about to become idle. I don't think that will help you though)
Simon
|
|
|
|
|
Thx,
It works just the way I needed.
Application.Idle is the way.
|
|
|
|
|
Cool.
Just don't do lots of processing in the Application.Idle because it gets fired everytime the app is about to go idle, so you'll just max out your cpu if you put lots of work in it because it will just keep getting called over and over.
Simon
|
|
|
|
|
if you use timer to count down then in each Tick the App fire the Idle event.
then I would suggest not to count down rether use the intreval and fire your event on the Tick;
Plus since there is cross-threading issue use Bool (i.e. ISTiCked) to set whether it has been ticked and in ur App.Idle even fucntion check for (true/fals) in ISTiCked.
|
|
|
|
|
Hi
Can anyone help me for the following issue?
I have a windows form with Gridview control and other server controls.while form load i'm filling the Gridview control. but i dont want the Rowchanged event to be fired.
what i need to do to solve the above issue?
Thanks in advance
regards
sri
|
|
|
|
|
hey
just don't handle the event, leave the method blank... or is there some reason why this wont work?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi Harvey,
Thanks a lot for your immediate response. I have some functionality in Row changed event. but Filling Gridview while form loading. At that time i dont want to fire row changed event. that's y
Regards
sri
|
|
|
|
|
Hello,
I have a order string where a user shipping, billing and product details are saved and then passed to the webservice to process it.
Rightnow i am stroing the value in a string and store in a session variable to be used at multiple other places. I know the size of the string can be large enoughf hence no issues.
But would like to know what will be the best option to perform this type of Job?
I want to retain the value of the order string in different aspx pages.
Please suggest
Regards,
Pavas
|
|
|
|
|
I think session would be the best method. Also this question has to be in ASP.NET forums.
|
|
|
|