|
|
Hello,
I would like to show the properties of an objet that contains another object .
Here is a simplified example :
'Imports
<DefaultPropertyAttribute("Gestion parametres")> _
<Serializable()> _
<XmlRootAttribute(Namespace:="", ElementName:="PARAM", IsNullable:=False)> _
Public Class Cls_Param
Public _MyclsTest As new clsTest
Public Property MyclsTest() As clsTest
Get
Return _MyclsTest
End Get
Set(ByVal value As clsTest)
_MyclsTest = value
End Set
End Property
<Serializable()> _
Public Class clsTest
Private _AppName As String
<CategoryAttribute("Application"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DesignOnly(False), _
DescriptionAttribute("Le nom de l'application"), _
XmlAttribute(AttributeName:="AppName")> _
Public Property AppName() As String
Get
Return _AppName
End Get
Set(ByVal value As String)
_AppName = value
End Set
End Property
End class
Public Sub New()
_MyclsTest = New clsTest
End Sub
End Class
In my form :
Public G_Param As New Cls_Param
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.PropertyGrid1.SelectedObject = G_Param
End Sub
if i choose :
Me.PropertyGrid1.SelectedObject = G_Param.cls_test , this works fine and i can see the object properties.
In the other hand, i want to give the object :
Me.PropertyGrid1.SelectedObject = G_Param , but this doesn't work.
How can i do this ?
Thanks.
|
|
|
|
|
You may want to look into the ExpandableObjectConvertor class. Add it as an attribute to your property like so: <TypeConvertor(GetType(ExpandableObjectConvertor))>
|
|
|
|
|
I have tried but it doesn't resolved the problem
|
|
|
|
|
how can i delete database records using code?
my code is
me.validate()
me.GuestBindingSource.remove()
but this code is wrong ,what would the right way?
|
|
|
|
|
Guessing doesn't really work, does it. I'd try google, or perhaps even buy a book.
You delete records with SQL.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
how to clear datagridview in vb.net
|
|
|
|
|
Is it bound or not? You want to delete the bound items or just make the DataGridView not viewing them anymore?
Start by reading this[^].
Eslam Afifi
|
|
|
|
|
Depends on what your trying to do. If your just trying to hide the grid itself, you could just set the visible attribute to false.
Example:
gridview1.Visible = False
This would just hide the grid from the user. If you were talking about resting it to a default state you would need to write some logic for the gridview and just update the databinding based on conditions set for the gridview.
Hope this helps.
Matthew Vass
QA Analyst
mvass@hostmysite.com
http://www.hostmysite.com?utm_source=bb[^]
|
|
|
|
|
Hay
I'm developing application with 100 users. How to deploy new version of EXE file in the morning if someone did not close application when he left the office yesterday??
I know that web application is a solution, but because of limitation on the web we really would like to develope "ordinary" windows (exe) application.
I'll be grateful for any advice
|
|
|
|
|
You could restart all computers in the LAN, effectively closing every open application.
What are you going to do about the computers that are turned off in the morning? I tend to shut down my computer before I go home
I are troll
|
|
|
|
|
Restarting all computer is not acceptible, because from 500 PC, only about 100 is using my application. There should be a way to enforce replacing exe file or enforce app exit on demand...
|
|
|
|
|
You can create a small application to loop through all the running processes, and if one of the processes running on the target-computer has the same name as your application - terminate it
500 computers that may be left running at night. I wonder how much energy (and money) that would cost?
I are troll
|
|
|
|
|
Couldn't you create a timer that would implement some type of "inactive" logic and close the application. The other way to think about this is maybe to implement a version number that could be checked and inform the user that a new version is available. I kind of like the timer approach, you could sell it as a security feature, An application should not be left open for the cleaning people to sniff around. Not that I have anything against cleaning people ... jeez you have to be politically correct even when you post.
|
|
|
|
|
David Mujica wrote: An application should not be left open for the cleaning people to sniff around.
Cool idea, easy to implement, and good argumentation. I'm gonna use your idea too, thanks
I are troll
|
|
|
|
|
you are right about cleaning people, but our secure istructions are clear - we shouldn't leave our desk without locking the PC
|
|
|
|
|
I worked at a company where the Network Admin had implemented a Windows Policy that forced the workstation to go to the "workstation locked" logon screen after 15 minutes. It was actually a very good thing because my logon ID gave me access to lots of sensitive data. I always hit the "windows command button+L" key when I left my desk to lock the machine. You can't be too secure when it comes to sensitive data.
|
|
|
|
|
I absolutely agree. I work in the international bank and our policy demand win+L when leaving desk, even if I go to toilete (2 mins).
|
|
|
|
|
I guess that I will solve this problem "my way"
Security revision pointed that no user should work with old vesion if new one exists (even he already run the application)
I have control over class that communicate with DB (oracle). So I will implement
checking before select, insert or update statement if new version exists the mentioned
statements will fail, and user will get the message something like
"close app and start new version..."
On starting shortcut (thin client), application will download new class library (which
have all forms and logic inside)
|
|
|
|
|
I would be very careful where you add those version checks. Don't want to have them execute millions of times. I would see if you could execute them at a higher business-level logical transaction. For example, given a process that posts cash receipts for the day, check the version once at the beginning not for every record you are about to process.
My 2 cents.
|
|
|
|
|
We will not implement version checking on database level.
Because our communication with DB work via webservice on web server it is not difficult to look into web.config file for version. I see our point of increasing DB traffic if for every select statement you check version with another select, so I guess I didn't pointed out web.config checking (which is a least 100 times quicker)
|
|
|
|
|
We have apps that for the client to shut. There is a versions table that the client checks every 5 minutes. If the app version is different, a warning is displayed to the user (so the user can save current work). After about 5 more minutes, the app is auto killed if it's still running.
Can't remember if click once allows you to do that? I recall that you can have the client check for a new version on startup or shutdown, but not sure while running.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Restarting anyone's computer is not acceptable. period.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
There are several ways of doing this. Some companies have mandatory reboot policies in place. If you leave your machine on over the weekend, the machine gets rebooted automatically.
Another would be to have the app close itself after x number of hours of inactivity.
Another would be to have the app check in every so often to see if there was an updated version available on a central source. If there was, notify the user to restart the app. Upon launch, the app would have to launch an updater application that downloads the new version and replaced an files it has to to update the app, or just run an installer. The only problem with this would be the users would need admin rights to do this installation.
An another would be to use some application distribution software, like MS System Center Configuration Manager, or Altiris.
|
|
|
|
|
I prefer 3 or 4, not 1(reboot) or 2(timeout).
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|