Display database field as part of string in a label control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Hope someone can help me with a bit of a newbie question.

I want to diplay a field from the last row of a table as part of a string in
a label control and would like to know the best way of doing it.

Most of the posts or books I've read are directed towards binding controls
or datagrids to datasets and I can do this ok. What I am having trouble with
is selecting a single field and adding that field to the text string to be
added to the label control.

eg. the text string might be something like this "the result is <field>"

Appreciate any assistance.
 
ilr,

As bill suggested, you can certainly get the column value to look like "the
result is <field>" using an expression'ed column.

However, do you need it to not appear in a datagrid .. instead appear it on
... say labels or textboxes .. with back next buttons? Is that what you are
trying to acheive? .. If so, you'd just have to bind it differently .. let
me know if that is what you are trying to acheive.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 
Thanks Bill

I'll work through the example and see how I go (I use vb but should be able
to get the gist). I'll let you know how I go.

Regards
Ian
 
Thanks for your reply Sahil

I think the suggestion bill made is what I need. I don't need navigation
buttons in this example. It is just a static label that requires data from
the table to be displayed as part of a string when the form is loaded. I
don't have a datagrid but have a dataset that displays in a graph.

I'll give it a go and let you know

Ian
 
Back
Top