DataGridView's column Bindings with Class

Hi,

please help, im using datagridview to present my database.

Infomations of columns in DataGridView like "visible" save it to XML file,

the columns information will be load from XML in the next time user run the program.

Everything is ok.

But now i have trouble to bindings column with my Class with property "visible",

because column in DataGridView no have "Bindings" property.



Answer this question

DataGridView's column Bindings with Class

  • Norge

    hi,

    i didn't understand what do you mean,  would you clarify more

    datagridview has datasource property

    you can take a look to this link

    http://msdn.microsoft.com/vbasic/atthemovies/dataandxml/default.aspx

    bye



  • Freiling

    hi,

    so basicly you want to add column to your datagridview from another source, sorry my friend i don't know much about datagridview even i study it now in this link

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/vbcon/html/vbtskbindingthedatagridcontroltoanadodataset.asp

    hope that like will be usefull to you

    bye



  • hangar18

    Anywhere thanks to you my friend.

    Can i have your email address hope we can keep contact each other.


  • prog.gabi

    hi,

    Example i have datagridview1, inside have column01, coulmn02, column03,

    i also have a class that is used to save the columns propery "Visible", the code is like this:

    Public Class Class01

         Public Sub New()

              MyBase.New()

         End Sub

         Private blnVisible As Boolean

         Public Property Visible() As Boolean

               Get

                    Return blnVisible

               End Get

               Set(ByVal value As Boolean)

                    blnVisible = value

               End Set

         End Property

    End Class

    When loading program, i want Binding Columns Visible with my class above. Normally Control have a function call Binding, for example:
    MyCheckBox.DataBindings.Add(New Binding("Checked", Class01, "Visible"))

    but i cannot found Binding inside the Column [In DatagridView]. But it can find in 'design mode' not in 'code mode'.
    Any idea


  • Auri

    hi,

    you are welcome i found this link also

    http://msdn2.microsoft.com/library/system.windows.forms.datagridview.aspx

    the first link is out of date or talking about something else in previous versions of vb in particular i guess this is what you asking about the code looks like yours even though i don't understand it yet but god willing one day i'll

    http://msdn2.microsoft.com/library/7tas5c80.aspx

    unfortunatly my friend i can't post my e mail  here, even i don't use the e mail that i sign in with it here , i leave it for spammers to fill it with all their non sense stuff but i have intention to visit this forum regularly

    best regards



  • DataGridView's column Bindings with Class