Click here to Skip to main content
16,006,594 members
Home / Discussions / C#
   

C#

 
AnswerRe: to produce full exe Pin
Christian Graus26-Jan-09 0:19
protectorChristian Graus26-Jan-09 0:19 
GeneralRe: to produce full exe Pin
Dan Neely26-Jan-09 2:14
Dan Neely26-Jan-09 2:14 
Questioncan any body tell,how to add a table in a column of c#.net datagrid. Pin
s_aslam9825-Jan-09 19:55
s_aslam9825-Jan-09 19:55 
AnswerRe: can any body tell,how to add a table in a column of c#.net datagrid. Pin
Not Active25-Jan-09 20:34
mentorNot Active25-Jan-09 20:34 
GeneralRe: can any body tell,how to add a table in a column of c#.net datagrid. Pin
s_aslam9825-Jan-09 21:29
s_aslam9825-Jan-09 21:29 
GeneralRe: can any body tell,how to add a table in a column of c#.net datagrid. Pin
Not Active25-Jan-09 21:54
mentorNot Active25-Jan-09 21:54 
GeneralRe: can any body tell,how to add a table in a column of c#.net datagrid. [modified] Pin
s_aslam9825-Jan-09 22:09
s_aslam9825-Jan-09 22:09 
QuestionDataGridView to XLS/CSV Pin
Vandretta25-Jan-09 19:52
Vandretta25-Jan-09 19:52 
G'day all,

I'm writing an application that requires me to output the values stored within a DataGridView to an cls/csv file (or basically anything that M$ Excel can read). This is as far as i have gotten:
string strValue = " ";
for (int i = 0; i < stocksDataGridView.Rows.Count - 1; i++)
{
    for (int j = 0; j < stocksDataGridView.Rows[i].Cells.Count; j++)
    {
        if (!string.IsNullOrEmpty(stocksDataGridView[j, i].Value.ToString()))
        {
            if (j > 0)
                strValue += "," + stocksDataGridView[j, i].Value.ToString();
            else
            {
                if (!String.IsNullOrEmpty(strValue))
                    strValue = stocksDataGridView[j, i].Value.ToString();
                else
                    strValue = strValue + Environment.NewLine + stocksDataGridView[j, i].Value.ToString();
            }
        }
    }
    strValue = strValue + Environment.NewLine;
}

string fileName = @saveFileDialog1.FileName;
if (File.Exists(fileName) && !String.IsNullOrEmpty(strValue))
{
    File.WriteAllText(fileName, strValue);
}

I'm sure its not very pretty and i have no idea how/where/why i have it in there, but all i can say is that it doesn't actually output anything.

Any and all help will be greatly appreciated.

Thanks in Advance,
Tom
AnswerRe: DataGridView to XLS/CSV Pin
SeMartens25-Jan-09 23:57
SeMartens25-Jan-09 23:57 
GeneralRe: DataGridView to XLS/CSV Pin
Vandretta26-Jan-09 9:23
Vandretta26-Jan-09 9:23 
QuestionHow to save listview data to database? Pin
Tuntgerhuu25-Jan-09 16:08
Tuntgerhuu25-Jan-09 16:08 
AnswerRe: How to save listview data to database? Pin
N a v a n e e t h25-Jan-09 17:27
N a v a n e e t h25-Jan-09 17:27 
GeneralRe: How to save listview data to database? Pin
CooperWu25-Jan-09 17:48
CooperWu25-Jan-09 17:48 
GeneralRe: How to save listview data to database? Pin
N a v a n e e t h25-Jan-09 18:02
N a v a n e e t h25-Jan-09 18:02 
GeneralRe: How to save listview data to database? Pin
Tuntgerhuu25-Jan-09 18:30
Tuntgerhuu25-Jan-09 18:30 
QuestionCalling a stored procedure with a return value help please Pin
stored25-Jan-09 15:08
stored25-Jan-09 15:08 
AnswerRe: Calling a stored procedure with a return value help please Pin
ToddHileHoffer25-Jan-09 16:07
ToddHileHoffer25-Jan-09 16:07 
GeneralRe: Calling a stored procedure with a return value help please Pin
stored25-Jan-09 16:23
stored25-Jan-09 16:23 
GeneralRe: Calling a stored procedure with a return value help please Pin
stored25-Jan-09 17:33
stored25-Jan-09 17:33 
QuestionC# Reporting.. Application settings Pin
Jacob D Dixon25-Jan-09 13:10
Jacob D Dixon25-Jan-09 13:10 
AnswerRe: C# Reporting.. Application settings Pin
Not Active25-Jan-09 13:52
mentorNot Active25-Jan-09 13:52 
QuestionLoad corrupted HTML into XML document Pin
Lutosław25-Jan-09 12:39
Lutosław25-Jan-09 12:39 
AnswerRe: Load corrupted HTML into XML document Pin
Ravi Bhavnani25-Jan-09 15:19
professionalRavi Bhavnani25-Jan-09 15:19 
GeneralRe: Load corrupted HTML into XML document Pin
Lutosław26-Jan-09 7:18
Lutosław26-Jan-09 7:18 
AnswerRe: Load corrupted HTML into XML document Pin
Bruce Duncan25-Jan-09 18:59
Bruce Duncan25-Jan-09 18:59 

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.