Click here to Skip to main content
11,478,066 members (71,412 online)
   

C#

 
GeneralRe: how can I access to a DGV column contents? Pin
babak1410-Sep-13 23:47
memberbabak1410-Sep-13 23:47 
GeneralRe: how can I access to a DGV column contents? Pin
OriginalGriff11-Sep-13 0:10
protectorOriginalGriff11-Sep-13 0:10 
GeneralRe: how can I access to a DGV column contents? Pin
babak1411-Sep-13 2:29
memberbabak1411-Sep-13 2:29 
GeneralRe: how can I access to a DGV column contents? Pin
OriginalGriff11-Sep-13 3:23
protectorOriginalGriff11-Sep-13 3:23 
Questiondisplay loading processes on SplashScreen Pin
Jassim Rahma10-Sep-13 11:15
memberJassim Rahma10-Sep-13 11:15 
AnswerRe: display loading processes on SplashScreen Pin
SledgeHammer0110-Sep-13 11:26
memberSledgeHammer0110-Sep-13 11:26 
AnswerRe: display loading processes on SplashScreen Pin
Mycroft Holmes10-Sep-13 16:00
professionalMycroft Holmes10-Sep-13 16:00 
QuestionHow can I solve this error : " Provided column already belongs to the DataGridView control" Pin
babak1410-Sep-13 8:14
memberbabak1410-Sep-13 8:14 
I studied many questions in this forum that related to this problem.but I couldn't solve my problem.can you help me?the error happens in the line which was indicated by "****"
        private static DataGridView Firstdgv;    
        private static DataGridView Finaldgv = new DataGridView();     
        private static List<string> SelectedColumns = new List<string>();  
        private static List<string> AvailableColumns = new List<string>();  
 
 
   public  void Print_DataGridView(DataGridView dgv1)
        {
            PrintPreviewDialog ppvw;
            try
            {
                // Getting DataGridView object to print
                Firstdgv = dgv1;
                 
 
                // Getting all Coulmns Names in the DataGridView
                AvailableColumns.Clear();
                foreach (DataGridViewColumn c in Firstdgv.Columns)
                {
                    if (!c.Visible) continue;
                    AvailableColumns.Add(c.HeaderText);
                }
 
                // Showing the PrintOption Form
                FrmPrintOptions dlg = new FrmPrintOptions(AvailableColumns);
                if (dlg.ShowDialog() != DialogResult.OK) return;
 
                PrintTitle = dlg.PrintTitle;
                PrintAllRows = dlg.PrintAllRows;
                FitToPageWidth = dlg.FitToPageWidth;
                SelectedColumns = dlg.GetSelectedColumns();
 
               // RowsPerPage = 0;
 
                ppvw = new PrintPreviewDialog();
 
                //ppvw.Document = printDoc;
                Finaldgv.AutoGenerateColumns = false;
                foreach (DataGridViewColumn GridCol in Firstdgv.Columns)
                {
                    if (!GridCol.Visible) continue;
                    if (!SelectedColumns.Contains(GridCol.HeaderText)) continue;
                    Finaldgv.Columns.Add(GridCol); ****
                     
                 }   
 
                DGVPrinter obj = new DGVPrinter();
                obj.PrintPreviewDataGridView(Finaldgv);
 
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
}

AnswerRe: How can I solve this error : " Provided column already belongs to the DataGridView control" Pin
Richard Deeming10-Sep-13 8:22
professionalRichard Deeming10-Sep-13 8:22 
GeneralRe: How can I solve this error : " Provided column already belongs to the DataGridView control" Pin
babak1410-Sep-13 9:03
memberbabak1410-Sep-13 9:03 
GeneralRe: How can I solve this error : " Provided column already belongs to the DataGridView control" Pin
babak1410-Sep-13 9:16
memberbabak1410-Sep-13 9:16 
QuestionMessageBox with textbox WPF Pin
juliogyn10-Sep-13 4:57
memberjuliogyn10-Sep-13 4:57 
AnswerRe: MessageBox with textbox WPF Pin
Richard MacCutchan10-Sep-13 6:17
mvpRichard MacCutchan10-Sep-13 6:17 
QuestionTake the first day of the month and the last day of the month ? [modified] Pin
Member 24584679-Sep-13 23:59
memberMember 24584679-Sep-13 23:59 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
Richard MacCutchan10-Sep-13 0:43
mvpRichard MacCutchan10-Sep-13 0:43 
GeneralRe: Take the first day of the month and the last day of the month ? Pin
Pete O'Hanlon10-Sep-13 1:44
protectorPete O'Hanlon10-Sep-13 1:44 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
Pete O'Hanlon10-Sep-13 1:38
protectorPete O'Hanlon10-Sep-13 1:38 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
Pete O'Hanlon10-Sep-13 3:22
protectorPete O'Hanlon10-Sep-13 3:22 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
ExcellentOrg10-Sep-13 6:27
groupExcellentOrg10-Sep-13 6:27 
GeneralRe: Take the first day of the month and the last day of the month ? Pin
jschell10-Sep-13 9:52
memberjschell10-Sep-13 9:52 
QuestionUnable to change default color of Progress Bar control in winforms Pin
superselector8-Sep-13 22:02
membersuperselector8-Sep-13 22:02 
AnswerRe: Unable to change default color of Progress Bar control in winforms Pin
Abhinav S8-Sep-13 23:28
mvpAbhinav S8-Sep-13 23:28 
AnswerRe: Unable to change default color of Progress Bar control in winforms Pin
Eddy Vluggen8-Sep-13 23:33
mvpEddy Vluggen8-Sep-13 23:33 
QuestionC# code making prolem when calling secure conection. Pin
Shinu K8-Sep-13 21:15
memberShinu K8-Sep-13 21:15 
AnswerRe: C# code making prolem when calling secure conection. Pin
Abhinav S8-Sep-13 23:25
mvpAbhinav S8-Sep-13 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 22 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid