Click here to Skip to main content
15,881,600 members
Home / Discussions / C#
   

C#

 
GeneralRe: Excel Problem Pin
snouto28-May-10 11:59
snouto28-May-10 11:59 
GeneralRe: Excel Problem Pin
Eddy Vluggen29-May-10 0:37
professionalEddy Vluggen29-May-10 0:37 
QuestionDateTimePicker as only Time Picker help - need dropdown to only show times (not calendar) or show nothing at all Pin
roman_s28-May-10 8:53
roman_s28-May-10 8:53 
AnswerRe: DateTimePicker as only Time Picker help - need dropdown to only show times (not calendar) or show nothing at all Pin
Alan N28-May-10 11:05
Alan N28-May-10 11:05 
AnswerRe: DateTimePicker as only Time Picker help - need dropdown to only show times (not calendar) or show nothing at all Pin
Isaac Gordon29-May-10 2:04
Isaac Gordon29-May-10 2:04 
QuestionFighting for Top-Most Window in WinCE Pin
notsotragichero28-May-10 6:51
notsotragichero28-May-10 6:51 
AnswerRe: Fighting for Top-Most Window in WinCE Pin
PIEBALDconsult28-May-10 13:13
mvePIEBALDconsult28-May-10 13:13 
QuestionDatagridview Databinding Problem? Pin
Pawan Kiran28-May-10 2:31
Pawan Kiran28-May-10 2:31 
Hi,

when i am binding datatable to datagridview, it is not showing all the records in the datagridview..

it is displaying only 1 Record in datagridview..
actual records in datatable are 12.

have any idea,let me know..

here is my code


public static DataTable dtable = new DataTable();
private void ScheduledJobs_Load(object sender, EventArgs e)
{
try
{
FillGrid();
if (dtable.Rows.Count > 0)
{
dgrid.DataSource = dtable;
}
}
catch { }
}
private void FillGrid()
{
try
{
if (dtable.Rows.Count == 0)
{
ProcessStartInfo ps = new ProcessStartInfo("SCHTASKS", "/QUERY /fo table");
ps.RedirectStandardOutput = true;
ps.UseShellExecute = false;
Process p = Process.Start(ps);
p.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived);
p.BeginOutputReadLine();
}
}
catch { }
}
System.Collections.ArrayList ar = new System.Collections.ArrayList();
int first = 0;
void p_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
try
{
if (first == 0 && dtable.Columns.Count == 0)
{
dtable.Columns.Add("Task Name");
dtable.Columns.Add("Next RunTime");
dtable.Columns.Add("Status");
}
ar.Add(e.Data);
if (first > 2 && ar[first] != null)
{
DataRow dr = dtable.NewRow();
dr[0] = ar[first].ToString().Substring(0, ar[first].ToString().IndexOf(':') - 2).Trim();
dr[1] = ar[first].ToString().Substring(ar[first].ToString().IndexOf(':') - 2, 20).Trim();
dr[2] = ar[first].ToString().Substring(ar[first].ToString().IndexOf(':') + 18).Trim();
dtable.Rows.Add(dr);
}
first++;
}
catch { }
}


Thanks in advance.

Pawan.
AnswerRe: Datagridview Databinding Problem? Pin
T M Gray28-May-10 10:54
T M Gray28-May-10 10:54 
GeneralRe: Datagridview Databinding Problem? Pin
Pawan Kiran31-May-10 18:15
Pawan Kiran31-May-10 18:15 
QuestionWrite Assembly code in C# Pin
shahramkeyboard28-May-10 2:18
shahramkeyboard28-May-10 2:18 
AnswerRe: Write Assembly code in C# Pin
Eddy Vluggen28-May-10 2:48
professionalEddy Vluggen28-May-10 2:48 
AnswerRe: Write Assembly code in C# Pin
Pete O'Hanlon28-May-10 2:50
mvePete O'Hanlon28-May-10 2:50 
GeneralRe: Write Assembly code in C# Pin
AspDotNetDev28-May-10 9:45
protectorAspDotNetDev28-May-10 9:45 
GeneralRe: Write Assembly code in C# Pin
harold aptroot28-May-10 9:54
harold aptroot28-May-10 9:54 
GeneralRe: Write Assembly code in C# Pin
AspDotNetDev28-May-10 16:33
protectorAspDotNetDev28-May-10 16:33 
GeneralRe: Write Assembly code in C# Pin
harold aptroot28-May-10 21:17
harold aptroot28-May-10 21:17 
GeneralRe: Write Assembly code in C# PinPopular
harold aptroot28-May-10 2:54
harold aptroot28-May-10 2:54 
GeneralRe: Write Assembly code in C# Pin
AspDotNetDev28-May-10 16:36
protectorAspDotNetDev28-May-10 16:36 
GeneralRe: Write Assembly code in C# Pin
Luc Pattyn28-May-10 17:35
sitebuilderLuc Pattyn28-May-10 17:35 
GeneralRe: Write Assembly code in C# Pin
AspDotNetDev28-May-10 18:21
protectorAspDotNetDev28-May-10 18:21 
AnswerRe: Write Assembly code in C# Pin
snouto28-May-10 10:48
snouto28-May-10 10:48 
AnswerRe: Write Assembly code in C# Pin
Henry Minute28-May-10 11:49
Henry Minute28-May-10 11:49 
AnswerRe: Write Assembly code in C# Pin
AspDotNetDev28-May-10 14:18
protectorAspDotNetDev28-May-10 14:18 
QuestionInsert byte[] to database Pin
dataminers28-May-10 1:49
dataminers28-May-10 1:49 

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.