need some help

G

Guest

I'm stuck on a few things and really can't find anything yet online to help
me out.

1. I'm using a Web Service to return all my data from my databas as a
Dataset. I can bind a datalist, datagrid, and my drop downs with no problem,
but how can i bind a data item from the dataset to a label?

2. Some of the dataitems are coming back as 0, if they come back as 0 I do
not want to display that I want blank. So how can i search the XML dataset
and replace 0 with " " so nothing is displayed?

thx
 
A

Alvin Bruney [MVP]

instead of binding, write a little loop to iterate the dataset
for(string str in dataset1.tables[0].rows)
label1.text = str + ", ";

roughly
 
T

Thomas Dodds

1.if you have a primary key in your dataset then you can use a datarow to
map to a specific row, then bind the text property of the label to a
specific item of the row ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top