need some help

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
instead of binding, write a little loop to iterate the dataset
for(string str in dataset1.tables[0].rows)
label1.text = str + ", ";

roughly
 
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 ...
 
Back
Top