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

DATAGRID IN USER CONTROL

P: n/a
Hi,

I want to create a UserControl using DataGrid,ComboBox and DataTimePicker Control. I want to DataGrid's TableStyle Collection at user Level. I wrote following lines on my user control, but it is fail.

Private _DtGrTableStyle As TableStyles

Public Property DtGrTableStyle() As TableStyles

Get

Return _DtGrTableStyle

End Get

Set(ByVal Value As TableStyles)

_DtGrTableStyle = Value

Invalidate()

End Set

End Property

What is wrong ?

Any hint will be sincerely appreciated.

Hardik Shah.


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


P: n/a
Hardik,

What do you mean with fail? With the code that you show you can set a tablestyle using a property. (However it does for the rest nothing).

Cor
Nov 21 '05 #2

P: n/a
Cor,

When I wrote above code , it displays error at design time (blue line),
Hardik

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message news:#7**************@TK2MSFTNGP11.phx.gbl...
Hardik,

What do you mean with fail? With the code that you show you can set a tablestyle using a property. (However it does for the rest nothing).

Cor

Nov 21 '05 #3

P: n/a
Hardik,

And when you delete this code does the form in design time than again shows
well?

Cor
Nov 21 '05 #4

P: n/a
Hi,

I think I can't explain my question effectively, So I repeat it in brief.

I create a UserControl using DataGrid,ComboBox and DataTimePicker Control.
I want to use following propery at user level.
1) Combobox's => datasource,value member etc.
2) DateTimePickers => Value
3) DataGrid's => TableStyles Collection

I write following commands at usercontrol

--------------------------------------------------------------------------------
Private _DtGrTableStyle As TableStyles

Public Property DtGrTableStyle() As TableStyles

Get

Return _DtGrTableStyle

End Get

Set(ByVal Value As TableStyles)

_DtGrTableStyle = Value

Invalidate()

End Set

End Property
--------------------------------------------------------------------------------

means there are error in my code, I can't understand why it occur?

Hardik Shah
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message news:eP**************@tk2msftngp13.phx.gbl...
Hardik,

And when you delete this code does the form in design time than again shows
well?

Cor



Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.