Re: Display results from a DataGrid in labels

Tech-Archive recommends: Fix windows errors by optimizing your registry




"lukegregory" <lukegregory@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1023A022-1FC9-423E-8DCC-77E7A05FDD9C@xxxxxxxxxxxxxxxx
>I have a datagrid containing data from an xml file. Is it possible that
>when
> a row on the datagrid is clicked these results can update a series of
> corresponding labels elsewhere on the form? e.g. the datagrid contains the
> columns, FirstName and LastName. When a row is highlighted I'd like the
> selected FirstName and LastName to appear in labels at the top of the
> form.

Yes, easily possible

Process the grid's Click event, in which you will access values from the
grid's currently active row, like this:

Grid.Columns.item(n).Text

where n is either the column position or the field name of the recordset
column that underlies the grid.

-Mark


.



Relevant Pages

  • Re: Flex RL ?
    ... labels that contain each 1 character. ... to initialize which is ok for a flash game I guess. ... It's possible to fill out a DataGrid manually, ... I could see doing something like this for inventory displays: ...
    (rec.games.roguelike.development)
  • Re: complicated scenario -- possible easy solution?!
    ... I gave up on attempting to do nested DataGrid... ... Datagrid with multiple controls but the ones in question are 3 ... Basically the three labels should be showing data pulled from ... The data is basically a Cycle, Day, Info scenario. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Display results from a DataGrid in labels
    ... Sorry Mark, ... also appear in corresponding labels else on the form. ... >>I have a datagrid containing data from an xml file. ... > column that underlies the grid. ...
    (microsoft.public.data.ado)
  • Getting Text from DataGridItem object directly
    ... I have a DataGrid that has fields that are either Labels or ... Dim lblAnswer as Label = CType,Label) ... having to set it to an object first? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Newbie Webform DataList Question
    ... > web application that displays information on a datagrid. ... > easy dragging and aligning textboxes and labels. ... > There's more than one way to display the information but looking for ...
    (microsoft.public.outlook.general)