Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Working with bindinglist

$
0
0

Hi,

I have a datagridview and a bindinglist. They work together pretty ok, but I want to make the properties appear in the rows´ headers, not on the column. Other thing I want to do is to make the headers´ text be different from the properties name. Is there any way to achieve that ? My code for anyone who is interested.

PublicClass Form1Dim listaBindingSource AsNew BindingList(Of pessoa)PrivateSub Form1_Load(sender AsObject, e As EventArgs)HandlesMyBase.LoadDim b1 AsNew pessoa()
    listaBindingSource.Add(b1)
    dgv.DataSource = listaBindingSourceEndSub

End Class

PublicClass pessoaDim sells_Month1 AsStringPublicSubNew()'ByVal nome_fora As String)

    sells_Month1 ="0"EndSubProperty vendas1 AsStringGetReturn sells_Month1EndGetSet(value AsString)
        sells_Month1 = valueEndSetEndProperty

The other properties are vendas2, vendas3.. and are the same as this one. Thanks, Ricardo S.


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>