473,326 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

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

Apr 13 '07 #1
1 1388
On Apr 13, 7:54 am, "trint" <trinity.sm...@gmail.comwrote:
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

Apr 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chad A. Beckner | last post by:
Does anyone know how to make common database connections "common" in all aspx files? In other words, instead of creating a SQLConnection, then a DataAdapter in every ASPX file for my application,...
1
by: Neven Klofutar | last post by:
Hi, I need some advice about a project I'm working on ... I have a form (create.aspx) containing a HTML Button with JavaScript (window.open('select.aspx')) attached to it. Form select.aspx is...
4
by: dyw55a | last post by:
Donna Mar 15, 10:11 am show options Newsgroups: microsoft.public.dotnet.framework.adonet From: "Donna" <dyw...@yahoo.com> - Find messages by this author Date: 15 Mar 2005 10:11:56 -0800...
5
by: Greg McKnight | last post by:
This may be the second time this post is showing, I accidentally shut down my browser. Sorry if it is a repeat. I am a newbie to VB.net, so please forgive me if these are simple questions. ...
12
by: Doug Bell | last post by:
Hi, I am having problems trying to create a (temporary) DataTable from a selection from a DataGrid (dgOrders). dtOrdDetails is declared as a Public DataTable Sub is: Dim stFilter as String...
5
by: manmit.walia | last post by:
Hello All, I am stuck on a conversion problem. I am trying to convert my application which is written in VB.NET to C# because the project I am working on currently is being written in C#. I tried...
1
by: TN | last post by:
I just don't get the BindingSource class when it is bound to a class. Consider this code snip: ..... Private bSource As New BindingSource() Private dgv As New DataGridView() Public Sub New()...
6
by: mike11d11 | last post by:
My program has to tables in it. One is the Accounts table with all personal information and then there is also my Memos table with all the notes for each account. My program displays one record...
0
by: shahiz | last post by:
This the error i get when i try to run my program Error: Unable to realize com.sun.media.amovie.AMController@18b81e3 Basically i have a mediapanel class that initialize and play the media as...
5
by: ElPresidente | last post by:
Now that I have your attention haha... I have this weekly file that contains several hundred invoices that need to be given batch letters in according to the following hierarchy. Employee...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.