Click here to Skip to main content
15,925,723 members
Home / Discussions / C#
   

C#

 
GeneralRe: Enable/Disable Menuitems of MdiParent from MdiChild Pin
zenithmaximus25-Jul-07 21:06
zenithmaximus25-Jul-07 21:06 
GeneralRe: Enable/Disable Menuitems of MdiParent from MdiChild Pin
ashukasama25-Jul-07 21:11
ashukasama25-Jul-07 21:11 
GeneralRe: Enable/Disable Menuitems of MdiParent from MdiChild Pin
zenithmaximus25-Jul-07 21:20
zenithmaximus25-Jul-07 21:20 
GeneralRe: Enable/Disable Menuitems of MdiParent from MdiChild Pin
ashukasama25-Jul-07 22:05
ashukasama25-Jul-07 22:05 
GeneralRe: Enable/Disable Menuitems of MdiParent from MdiChild Pin
zenithmaximus25-Jul-07 22:21
zenithmaximus25-Jul-07 22:21 
GeneralRe: Enable/Disable Menuitems of MdiParent from MdiChild Pin
ashukasama25-Jul-07 22:26
ashukasama25-Jul-07 22:26 
Questionexport data from datagrid to excel sheet Pin
srinivassam25-Jul-07 19:52
srinivassam25-Jul-07 19:52 
AnswerRe: export data from datagrid to excel sheet Pin
zenithmaximus25-Jul-07 20:22
zenithmaximus25-Jul-07 20:22 
Hi,

Hope this code help
private void button1_Click(object sender, System.EventArgs e)
{
SaveFileDialog SD= new SaveFileDialog();
SD.Filter = "csv|*.csv|Comma Seperated Files|*.csv|All Files|*.*";
SD.InitialDirectory = @"C:\";
if (SD.ShowDialog() == DialogResult.OK)
{
using (System.IO.StreamWriter writer = new System.IO.StreamWriter(SD.FileName))
{
int Colcnt = dsResults.Tables["tbl_Master_Pol_Lst"].Columns.Count;
int Rowcnt = dsResults.Tables ["tbl_Master_Pol_Lst"].Rows.Count;
for(int x=0;x<=(Colcnt-1);x++)
{
writer.Write(dsResults.Tables["tbl_Master_Pol_Lst"].Columns[x].ColumnName.Trim()+ ",");
}
writer.WriteLine();
for(int x=0;x<=(Rowcnt-1);x++)
{
for(int y=0;y<=(Colcnt-1);y++)
{
if (y == 2)
{
writer.Write("'" + dsResults.Tables["tbl_Master_Pol_Lst"].Rows[x].ItemArray.GetValue(y)+ ",");
}
else
{
String varData = Convert.ToString(dsResults.Tables["tbl_Master_Pol_Lst"].Rows[x].ItemArray.GetValue(y));
writer.Write(varData.Replace(","," ")+ ",");
}
}
writer.WriteLine();
}
writer.Flush();
MessageBox.Show(SD.FileName + " successfully created");
}
}

-::maximus::-

GeneralRe: export data from datagrid to excel sheet Pin
srinivassam25-Jul-07 20:32
srinivassam25-Jul-07 20:32 
GeneralRe: export data from datagrid to excel sheet Pin
zenithmaximus25-Jul-07 20:58
zenithmaximus25-Jul-07 20:58 
GeneralRe: export data from datagrid to excel sheet Pin
srinivassam25-Jul-07 22:53
srinivassam25-Jul-07 22:53 
QuestionUser Control Pin
Try25-Jul-07 19:31
Try25-Jul-07 19:31 
AnswerRe: User Control Pin
Martin#25-Jul-07 19:52
Martin#25-Jul-07 19:52 
GeneralRe: User Control Pin
Try25-Jul-07 20:21
Try25-Jul-07 20:21 
GeneralRe: User Control Pin
Martin#25-Jul-07 20:52
Martin#25-Jul-07 20:52 
GeneralRe: User Control Pin
Try25-Jul-07 21:31
Try25-Jul-07 21:31 
GeneralRe: User Control Pin
Martin#25-Jul-07 21:41
Martin#25-Jul-07 21:41 
GeneralRe: User Control Pin
Try25-Jul-07 22:45
Try25-Jul-07 22:45 
GeneralRe: User Control Pin
Martin#25-Jul-07 22:49
Martin#25-Jul-07 22:49 
QuestionAGC Control Pin
Rahul.RK25-Jul-07 18:46
Rahul.RK25-Jul-07 18:46 
AnswerRe: AGC Control [modified] Pin
Luis Alonso Ramos25-Jul-07 18:49
Luis Alonso Ramos25-Jul-07 18:49 
AnswerRe: AGC Control Pin
ekynox25-Jul-07 18:56
ekynox25-Jul-07 18:56 
GeneralRe: AGC Control Pin
Rahul.RK25-Jul-07 19:01
Rahul.RK25-Jul-07 19:01 
GeneralRe: AGC Control Pin
ekynox25-Jul-07 23:43
ekynox25-Jul-07 23:43 
QuestionAcessing Outlook Express using C# Pin
jazeelkm25-Jul-07 18:43
jazeelkm25-Jul-07 18:43 

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.