change label text

in my application i have 2 different forms

1 form

a datagrid view control is present with 5 different colums and some data inside the grid from sqlserver database

2 form

five 5 different lables and a datanavigator control

and my requirement is to when ever the data navigator control is navigated

the lables in the form should change their text according to the colum text present in the datagrid view of the first form

can any one help me how to solve this problem

[516 byte] By [Rajeshbatchu] at [2007-12-24]
# 1

The datagridview is probably bound to a datasource. If so then use a bindingsource control and just bind the labels to the same datasource.

The bindingsource control will ensure that when you change in the datagridview the current record in the bindingsource control will change and all the controls bound to that bindingsource will be refreshed to display the new current records contents.

spotty at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...