Click here to Skip to main content
15,900,461 members
Home / Discussions / C#
   

C#

 
AnswerRe: Type casting classes with different namespaces Pin
Michael Potter8-Jun-06 5:24
Michael Potter8-Jun-06 5:24 
QuestionDrag Drop event not firing Pin
MphasisThomas8-Jun-06 5:04
MphasisThomas8-Jun-06 5:04 
AnswerRe: Drag Drop event not firing Pin
AmithaRaghu5-Jan-10 2:05
AmithaRaghu5-Jan-10 2:05 
Questiondatagridview currentrow changed ? Pin
cmpeng348-Jun-06 5:01
cmpeng348-Jun-06 5:01 
AnswerRe: datagridview currentrow changed ? Pin
leckey8-Jun-06 5:27
leckey8-Jun-06 5:27 
QuestionASP.NET webservice uses COM object and causes System.UnauthorizedAccessException: Access is denied [LONG!] Pin
klanglieferant8-Jun-06 4:31
klanglieferant8-Jun-06 4:31 
Questionhowto transfer data from datagridview to MS Word and MS Excel ? Pin
cmpeng348-Jun-06 3:51
cmpeng348-Jun-06 3:51 
AnswerRe: howto transfer data from datagridview to MS Word and MS Excel ? Pin
Suamal9-Jun-06 0:51
Suamal9-Jun-06 0:51 
try this code to transferring Datagrid control to excelfile

Response.ContentType = "application/vnd.ms-excel";

//create a string writer
string xlFileName = "Report - " + System.DateTime.Now.Ticks.ToString() +".xls";
string xlFilePath = Server.MapPath("../Reports/") + xlFileName;

System.IO.FileStream FS = new FileStream(xlFilePath,FileMode.Create);
StreamWriter Sw = new StreamWriter(FS);

System.IO.StringWriter oStringWriter = new System.IO.StringWriter();

//create an htmltextwriter which uses the stringwriter
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);

DataGRid1.RenderControl(oHtmlTextWriter);

Sw.Write(oStringWriter.ToString());
Sw.Close();
FS.Close();

Response.AddHeader("content-disposition","attachment;filename="+xlFileName);
Response.WriteFile(xlFilePath);

Response.Flush();
Response.End();
GeneralMessage Closed Pin
9-Jun-06 1:43
cmpeng349-Jun-06 1:43 
GeneralRe: howto transfer data from datagridview to MS Word and MS Excel ? Pin
Mairaaj Khan9-Jun-06 20:08
professionalMairaaj Khan9-Jun-06 20:08 
Questionhello Stephan Samuel Pin
Mahmood Ilyas8-Jun-06 2:22
Mahmood Ilyas8-Jun-06 2:22 
AnswerRe: hello Stephan Samuel Pin
J4amieC8-Jun-06 3:01
J4amieC8-Jun-06 3:01 
QuestionCopy content of Excel cells Pin
sydney_sider8-Jun-06 2:19
sydney_sider8-Jun-06 2:19 
QuestionChanging data in DataTable does not update bound DataGridView Pin
iswoolley8-Jun-06 1:30
iswoolley8-Jun-06 1:30 
AnswerRe: Changing data in DataTable does not update bound DataGridView Pin
alyeasad8-Jun-06 1:49
alyeasad8-Jun-06 1:49 
GeneralRe: Changing data in DataTable does not update bound DataGridView Pin
iswoolley8-Jun-06 2:02
iswoolley8-Jun-06 2:02 
GeneralRe: Changing data in DataTable does not update bound DataGridView Pin
PyroManiak8-Jun-06 7:52
PyroManiak8-Jun-06 7:52 
GeneralRe: Changing data in DataTable does not update bound DataGridView Pin
iswoolley8-Jun-06 22:26
iswoolley8-Jun-06 22:26 
Questionusing C# code in VC++(MFC) application Pin
Shailesh Ha8-Jun-06 1:16
Shailesh Ha8-Jun-06 1:16 
AnswerRe: using C# code in VC++(MFC) application Pin
Jun Du8-Jun-06 7:57
Jun Du8-Jun-06 7:57 
GeneralRe: using C# code in VC++(MFC) application Pin
Shailesh Ha12-Jun-06 21:31
Shailesh Ha12-Jun-06 21:31 
AnswerRe: using C# code in VC++(MFC) application Pin
Koushik Biswas8-Jun-06 8:04
Koushik Biswas8-Jun-06 8:04 
GeneralRe: using C# code in VC++(MFC) application Pin
Shailesh Ha9-Jun-06 2:06
Shailesh Ha9-Jun-06 2:06 
GeneralRe: using C# code in VC++(MFC) application Pin
Koushik Biswas9-Jun-06 6:25
Koushik Biswas9-Jun-06 6:25 
GeneralRe: using C# code in VC++(MFC) application Pin
Shailesh Ha11-Jun-06 19:03
Shailesh Ha11-Jun-06 19:03 

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.