Click here to Skip to main content
15,890,336 members
Home / Discussions / C#
   

C#

 
QuestionTrain free @Microsoft Pin
vikas amin4-Nov-05 22:50
vikas amin4-Nov-05 22:50 
QuestionCreate Array In Method Paremeters Pin
budidharma4-Nov-05 19:54
budidharma4-Nov-05 19:54 
AnswerRe: Create Array In Method Paremeters Pin
leppie4-Nov-05 20:52
leppie4-Nov-05 20:52 
AnswerRe: Create Array In Method Paremeters Pin
Jon Rista8-Nov-05 7:06
Jon Rista8-Nov-05 7:06 
QuestionReading XML attribute and write into datagrid Pin
dunbshy4-Nov-05 14:47
dunbshy4-Nov-05 14:47 
AnswerRe: Reading XML attribute and write into datagrid Pin
Jon Rista4-Nov-05 16:04
Jon Rista4-Nov-05 16:04 
GeneralRe: Reading XML attribute and write into datagrid Pin
dunbshy5-Nov-05 3:32
dunbshy5-Nov-05 3:32 
GeneralRe: Reading XML attribute and write into datagrid Pin
Jon Rista5-Nov-05 9:55
Jon Rista5-Nov-05 9:55 
Alright. Let me break it down, to make sure I understand everything. First thing, DateToday is a string variable that you populate elsewhere, correct? I am assuming that your allowing the user to change the date through the UI somewhere?

There are two things that I'm wondering about. First is, are you sure the table in the DataSet that you want to display is called "Log"? Second, are you calling .DataBind() on the DataGrid? If the code was broken down a bit into more granular pieces, say something like this:

<br />
DataSet dsEvent = new DataSet("Log");<br />
dsEvent.ReadXml("../Debug/EventLog.xml");<br />
<br />
// This next line assumes that the xml file EventLog.xml <br />
// creates a table in the DataSet named "Log". NOTE that<br />
// the name of the dataset and the name of the table are<br />
// NOT neccesarily the same. A DataSet contains tables, <br />
// but it is not a table itself. The default table name <br />
// is usually "Table1" if a table name is not found anywhere<br />
// e, then table names are in sequence<br />
// after that.<br />
DataView dv = new DataView(dsEvent.Tables["Log"]);<br />
dv.RowFilter = "TheDate='11/1/2005'"; // Is this what your DateToday string looks like?<br />
dv.RowStateFilter = DataViewRowState.CurrentRows;<br />
<br />
// If a sort was desired, set dv.Sort here<br />
<br />
dataGrid1.CaptionText = "NetWatcher Event Log";<br />
<br />
dataGrid1.DataSource = dv;<br />
// The following line is not needed when using a DataView, only when using a DataSet<br />
// dataGrid1.DataMember = "Log";<br />
dataGrid1.DataBind(); // You MUST call this to populate the grid<br />


Does any of that help? Make sure you know what the table in your DataSet is called. The DataSet is called "Log", but is the table really called "Log", or is it something else? And at the end of it all, make sure you call .DataBind() on your datagrid.
GeneralRe: Reading XML attribute and write into datagrid Pin
dunbshy5-Nov-05 11:46
dunbshy5-Nov-05 11:46 
GeneralRe: Reading XML attribute and write into datagrid Pin
Jon Rista8-Nov-05 6:58
Jon Rista8-Nov-05 6:58 
Questioncalling a C# dll from an unmanaged C++ dll Pin
tmp04-Nov-05 13:56
tmp04-Nov-05 13:56 
AnswerRe: calling a C# dll from an unmanaged C++ dll Pin
Rob Graham4-Nov-05 15:29
Rob Graham4-Nov-05 15:29 
QuestionDatagrid Pin
mrnoname4-Nov-05 13:36
mrnoname4-Nov-05 13:36 
QuestionIDownloadManager COM Component in C# Pin
timothymfox4-Nov-05 12:58
timothymfox4-Nov-05 12:58 
QuestionDetecting a port Pin
picasso24-Nov-05 11:19
picasso24-Nov-05 11:19 
AnswerRe: Detecting a port Pin
enjoycrack4-Nov-05 11:41
enjoycrack4-Nov-05 11:41 
QuestionElegant check for .Net Framework 1.1 or 2.0? Pin
Tom Ollar4-Nov-05 9:21
Tom Ollar4-Nov-05 9:21 
AnswerRe: Elegant check for .Net Framework 1.1 or 2.0? Pin
Carl Mercier4-Nov-05 10:22
Carl Mercier4-Nov-05 10:22 
GeneralRe: Elegant check for .Net Framework 1.1 or 2.0? Pin
Tom Ollar5-Nov-05 3:58
Tom Ollar5-Nov-05 3:58 
AnswerRe: Elegant check for .Net Framework 1.1 or 2.0? Pin
leppie4-Nov-05 21:51
leppie4-Nov-05 21:51 
GeneralRe: Elegant check for .Net Framework 1.1 or 2.0? Pin
Tom Ollar5-Nov-05 4:15
Tom Ollar5-Nov-05 4:15 
QuestionConsuming image-generating web service in Excel Pin
julian_l4-Nov-05 8:41
julian_l4-Nov-05 8:41 
Questionwinform app Pin
Manu_814-Nov-05 8:25
Manu_814-Nov-05 8:25 
AnswerRe: winform app Pin
IdUnknown4-Nov-05 9:15
IdUnknown4-Nov-05 9:15 
GeneralRe: winform app Pin
Manu_814-Nov-05 9:19
Manu_814-Nov-05 9:19 

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.