Click here to Skip to main content
15,910,787 members
Home / Discussions / C#
   

C#

 
GeneralRe: Get Message ID after Sending in Message Q Pin
leppie18-Aug-05 6:36
leppie18-Aug-05 6:36 
GeneralRe: Get Message ID after Sending in Message Q Pin
DeepToot18-Aug-05 6:52
DeepToot18-Aug-05 6:52 
GeneralRe: Get Message ID after Sending in Message Q Pin
eggie518-Aug-05 14:04
eggie518-Aug-05 14:04 
GeneralConverting string Pin
zaboboa18-Aug-05 6:20
zaboboa18-Aug-05 6:20 
GeneralRe: Converting string Pin
theStorminMormon18-Aug-05 7:46
theStorminMormon18-Aug-05 7:46 
GeneralWindows User Control Performance vs. Embedded Code Performance Pin
AnneThorne18-Aug-05 4:56
AnneThorne18-Aug-05 4:56 
GeneralRe: Windows User Control Performance vs. Embedded Code Performance Pin
Mohamad Al Husseiny18-Aug-05 5:10
Mohamad Al Husseiny18-Aug-05 5:10 
Generaltrying to access rows in a table Pin
theStorminMormon18-Aug-05 4:55
theStorminMormon18-Aug-05 4:55 
I have a nice table that I create and show in a datagrid. The data loads perfectly, and then displays nicely. But I need to do some things with it. For starters, I want to add another column that is for display only. So I've tried to add the column "Date" as shown, but it never shows up in the datagrid.

I also want to be able to set the Date column, which I thought would entail cycling through the rows. However when I try to cycle through the rows (in the foreach statement) nothing happens. The MessageBox.Show never pops up.

Any idea why my new column won't show up and why I can't cycle through the rows of my table?

If there's an easier way to just add a column and dynamically change the entries for each row, let me know. And if there's a way to keep data in the data set/data table and NOT show it in the datagrid, I'd like to know that too (I don't want my primary and foreign keys showing up at all but i need to keep track of them).

Thanks!

strClaimsSQL = this.GetClaimsSQL();
da = new OleDbDataAdapter(strClaimsSQL, strConn);
ds = new DataSet();
ClaimsTable = new DataTable();
da.Fill(ds, "ClaimsTable");
DataColumn claimDates = ClaimsTable.Columns.Add("Date");
claimDates.ColumnName = "Date";
this.dgrClaimsData.DataSource = ds;
this.dgrClaimsData.DataMember = "ClaimsTable";
foreach (DataRow row in ClaimsTable.Rows)
{
MessageBox.Show("This is a row in the Claims Table.", "Testing Output");
int i = 0;
row["Date"] = i.ToString();
i++;
row["Premiums"] = i.ToString();
}

The ends can never justify the means. It is the means that determine the ends.
GeneralRe: trying to access rows in a table Pin
Mohamad Al Husseiny18-Aug-05 5:38
Mohamad Al Husseiny18-Aug-05 5:38 
GeneralRe: trying to access rows in a table Pin
theStorminMormon18-Aug-05 5:41
theStorminMormon18-Aug-05 5:41 
Generalone more question - Pin
theStorminMormon18-Aug-05 5:42
theStorminMormon18-Aug-05 5:42 
GeneralRe: one more question - Pin
Mohamad Al Husseiny18-Aug-05 6:09
Mohamad Al Husseiny18-Aug-05 6:09 
GeneralRe: one more question - Pin
Dan Neely18-Aug-05 7:13
Dan Neely18-Aug-05 7:13 
GeneralRe: one more question - Pin
Mohamad Al Husseiny18-Aug-05 7:17
Mohamad Al Husseiny18-Aug-05 7:17 
GeneralRe: one more question - Pin
Dan Neely18-Aug-05 7:33
Dan Neely18-Aug-05 7:33 
GeneralRe: one more question - Pin
Mohamad Al Husseiny18-Aug-05 7:41
Mohamad Al Husseiny18-Aug-05 7:41 
GeneralRe: one more question - Pin
Dan Neely18-Aug-05 8:52
Dan Neely18-Aug-05 8:52 
GeneralRe: trying to access rows in a table Pin
theStorminMormon18-Aug-05 5:39
theStorminMormon18-Aug-05 5:39 
GeneralRe: trying to access rows in a table Pin
Mohamad Al Husseiny18-Aug-05 5:45
Mohamad Al Husseiny18-Aug-05 5:45 
GeneralListBox problem with focus Pin
Blashyrkh#18-Aug-05 4:41
Blashyrkh#18-Aug-05 4:41 
GeneralRe: ListBox problem with focus Pin
Mohamad Al Husseiny18-Aug-05 5:00
Mohamad Al Husseiny18-Aug-05 5:00 
GeneralRe: ListBox problem with focus Pin
Blashyrkh#18-Aug-05 20:40
Blashyrkh#18-Aug-05 20:40 
GeneralRe: ListBox problem with focus Pin
S. Senthil Kumar18-Aug-05 6:51
S. Senthil Kumar18-Aug-05 6:51 
GeneralRe: ListBox problem with focus Pin
Blashyrkh#18-Aug-05 11:42
Blashyrkh#18-Aug-05 11:42 
GeneralRe: ListBox problem with focus Pin
S. Senthil Kumar18-Aug-05 20:25
S. Senthil Kumar18-Aug-05 20:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.