By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,326 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,326 IT Pros & Developers. It's quick & easy.

User control

P: n/a
Hi
I have a form and a user control

In my usercontrol i have a datagrid who need a customerGuid to display
customer information

When i load my form i need to tell the userControl that the guid of the
custormer is customerGuid

I don't have success to do this :(

Someone could help ?

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"ucasesoftware" <uc***********@hotmail.fr> schrieb:
I have a form and a user control

In my usercontrol i have a datagrid who need a customerGuid to display
customer information

When i load my form i need to tell the userControl that the guid of the
custormer is customerGuid


Add a property to the usercontrol which accepts the customer's GUID. Then
set this property to the desired GUID. Inside the property's implementation
you can assign the GUID to the datagrid control.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
i did that :
in the usercontrol :

Private m_customerGuid As Guid
Public Property customerGuid () As Guid
Get
Return m_customerGuid
End Get
Set(ByVal Value As Guid)
m_customerGuid = Value
End Set
End Property

Public Sub New(ByVal customerGuid As Guid)
MyBase.New()

'Cet appel est requis par le Concepteur Windows Form.
InitializeComponent()

'Ajoutez une initialisation quelconque après l'appel
InitializeComponent()
m_customerGuid = customerGuid

End Sub
But when i drag and drop the usercontrol in the form i have an error ?

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.