|
|
Where are you getting RichControl? Or do you mean UserControl? I have never seen a RichControl in .NET before.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I created an application that opens Word documents inside an axwebbrowser object in the windows form. However, if i run 2 instances of the application and open 2 files - FileA.doc and FileB.doc, i lose control of the toolbar icons on FileA.doc as soon as i open FileB.doc in the second instance of the application....ie... i am no longer able to click on the toolbar buttons. The toolbar buttons are visible but do not function and cannot be clicked on. Please help.
|
|
|
|
|
Hi,
I am currently working on a WinForms application in which I am displaying database table in DataGridView control.
I want to implement feature of record locking when a user starts modifying a row in the DataGridView. In such case, the system should give alert message to other user that someone else has already opened the record for editing.
Also, when two users try to save the same record, the first to click save button will get access & the second user will get message that record has already modified by someone.
How can this be done? If anyone can share the code for this then it would be great.
Thanks in advance,
HR
|
|
|
|
|
You are not going to get any code for this as it is a philosophical question.
First thing to ask is this a real world situation, lots of business people raise this sort of ? when in reality it almost never happens.
Second, think about how your system works,
You get a set of records (no lock) that are copies of the data and not connected to the database.
Now the user begins editing, you want the UI to inform the database the records is being edited, the database must retain the identities of all the users who have a copy of the record and inform them that the record is being edited.
Now the user either cancels the edit of saves the record the UI must save back the record, first checking that this is the master copy and should be locked!
When the record is saved the adta should be pushed to the other holders of the record.
The above scenario is a nightmare of pushmepullme horrors.
Answer the first question, and then if it is still an absolute requirement then I suggest the following design.
Do not allow in grid editing. Make the user open a dialog with the 1 record to be edited. If you think this is unreasonable I have 5 major apps in production and there are precisely 2 forms with inline editing. You then lock the record as being edited when passing it to the dialog (use a flag on the record). Only when a SECOND person attempts to edit the exact record do you actually need to do anything, ie tell the second user it is a read only record! If you flag it with an ID you can tell the second use who has it locked.
Caveat - you will inevitably end up with incorrect falgs on records (incomplete edits) make sure you have a maintenance program to clear them down.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Excellent answer. Well put.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi
Am creating setup project for my application
how to make my primary output shortcut to be installed to all users of the system.
Thanks for the help
ngrj
|
|
|
|
|
make a shortcut with
msiexec.exe /I Setup.msi ALLUSERS=1
that will install it to all users of the system.
Emimmortal
|
|
|
|
|
I read that as "all users on the network", had to reread the question as I didn't beleive you answer!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have windows form application project named foo and I have created two solution/project configurations namely foo_STD and foo_PROF. Now, when I build all configurations It generates two folders under bin i.e. foo_STD and foo_PROF and executable created in both folder has name foo.exe
Is there any way to change executable name through Post-Build/Command line parameters in project configuration so, that foo_STD.exe is created in foo_STD directory and foo_PROF.exe is created in foo_PROF directory.
Regards,
MaulikCE
modified on Tuesday, July 22, 2008 12:38 PM
|
|
|
|
|
I found the solution from here-
http://www.fearlessdog.com/posts/2005/03/04/net-post-build-script-to-rename-appconfig
Here's the exact copy-paste script to set executable name according to project configuration
Paste the following in "Post-build event command line"
rename $(TargetFileName) $(ConfigurationName)$(TargetExt)
rename $(TargetFileName).config $(ConfigurationName)$(TargetExt).config and
select "When build updates the project output" in "Run the Post-build event:" dropdown.
then hit -F6 to build the solution.
Regards,
MaulikCE
|
|
|
|
|
I mostly use ASP.net but have spent the day wrestling with a date view grid. I have a column which has a dropdown so when I populate the grid I programatically add a combo (DataGridViewComboBoxCell) to the row and can populate the items with data. The column is a normal DataViewGridTextBoxColumn because I want to have a completely free hand in what I put in the cells in this column.
But... the dropdowns have a blank entry at the top which I'd like to get rid of and also there is no property to select an item in the dropdown such as selectedIndex. How han I get rid of the space at the top (blank entry) and how can I set the selected index property?
Also, when I want to read the value from the combo and have a reference to the DataGridViewComboBoxCell object in that cell, how do I read the selected value from the combo?
|
|
|
|
|
From MSDN:
"Unlike the ComboBox control, the DataGridViewComboBoxCell does not have SelectedIndex and SelectedValue properties. Instead, selecting a value from a drop-down list sets the cell Value property."
I am not sure what will happen when you set the value, although I will assume that it will change the selection. You can then read the Value property to get the value back.
There is a way you can make your own selected index property by comparing each item to the Value property and returning the index when the objects match.
Hope this helps.
|
|
|
|
|
How can I bind to radio buttons. I have an object with a property called gender that can be either 1 or 2. 1 is male and 2 is female. On my form I have a gender group box with 2 radio buttons. One male and another female of course. How can I bind these. I know I can do it with if statements but since the rest of my form is binded, I figured it would be good to keep it consistent. Thanks
|
|
|
|
|
|
What if I wanted to use a value of a property in a specific object. In the current example I have a gender radio button. I have an property of an object that can be 1 or 2 and I would like 1 to be male and 2 to be female. I say this because I have many sets of radio buttons that are much more complex that just male and female. As in the text of each radio button will be in some cases 10-15 words.
|
|
|
|
|
Don't bind data to radiobuttons. You will run into Problems[^]
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi,
How can i design message box?
If i give messagebox.show() means it appear different types colour and different types of fonts.How can i get this?
If anyone to know this plz reply..
|
|
|
|
|
You will have to copy all the implementation of the standard messagebox. There is no feasible way to customise the existing one.
|
|
|
|
|
Hi,
This can be done via custom coding, take a look at the following article which demonstrates how can we create our own customised version of MessageBox.
Click Here for Article 1[^]
Click Here for Article 2[^]
Hope this helps
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
You should be able to create a new form that looks like the messagebox that you desire. Then just show the new messagebox instead of the old.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I created an application that opens Word documents inside an axwebbrowser object in the windows form. However, if i run 2 instances of the application and open 2 files - FileA.doc and FileB.doc, i lose control of the toolbar icons on FileA.doc as soon as i open FileB.doc in the second instance of the application....ie... i am no longer able to click on the toolbar buttons. The toolbar buttons are visible but do not function and cannot be clicked on. Please help.
|
|
|
|
|
To add more clarity... here is what i happening
1. Run 1st instance of the application and open FileA.doc - All toolbar icons of word for FileA.doc working
2. Open 2nd instance of application and open FileB.doc -All toobar icons working in FileB.doc
3. Coming back to FileA.doc(switching focus back to FileA) - Toolbar icons visible but not working.
4. note: no mater how many times i change focus between FileA and FileB it is only FileB word toolbar icons that is working now.
HOWEVER:...................
if i refresh or reopen FileA.doc in the First instance of the application, Control now shifts to FileA.doc and FileB loses functionality of the toolbar icons.
|
|
|
|
|
Hi!
I want to sending and receiving file over TCP/IP,but I don't do...
Can any tell me how to do this?
Thanks.
|
|
|
|
|
Please rephrase and let people know what you have tried thus far...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|