i need to create a datasource on the fly...

T

trint

i have a gridview that I want to fill with a combination of sql and
strings:

foreach (XmlNode rate in rates)
{
the first column needs to be "/images/ups.gif" every time.
the second column, I'll get from sql server with a select. the result
will be like "Next Day Air", "2nd Day Air" or something like that.
the third column will be the total charges that i have in a string
totalCharges.

string firstColumn = "/images/ups.gif";
string secondColumn = "2nd Day Air";
string thirdColumn = "75.44";
}

I know how to get each of these in this foreach loop, but I don't know
how to create a datasource for the gridview to bind to.
Any help is appreciated.
Thanks,
Trint
 
T

trint

i have a gridview that I want to fill with a combination of sql and
strings:

foreach (XmlNode rate in rates)
{
the first column needs to be "/images/ups.gif" every time.
the second column, I'll get from sql server with a select. the result
will be like "Next Day Air", "2nd Day Air" or something like that.
the third column will be the total charges that i have in a string
totalCharges.

string firstColumn = "/images/ups.gif";
string secondColumn = "2nd Day Air";
string thirdColumn = "75.44";
}

I know how to get each of these in this foreach loop, but I don't know
how to create a datasource for the gridview to bind to.
Any help is appreciated.
Thanks,
Trint

In other words, I want to add a column that isn't coming from sql
server, but from a string.
Thanks,
Trint
 

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