Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: how can I access to a DGV column contents? Pin
babak1410-Sep-13 22:47
babak1410-Sep-13 22:47 
GeneralRe: how can I access to a DGV column contents? Pin
OriginalGriff10-Sep-13 23:10
mveOriginalGriff10-Sep-13 23:10 
GeneralRe: how can I access to a DGV column contents? Pin
babak1411-Sep-13 1:29
babak1411-Sep-13 1:29 
GeneralRe: how can I access to a DGV column contents? Pin
OriginalGriff11-Sep-13 2:23
mveOriginalGriff11-Sep-13 2:23 
Questiondisplay loading processes on SplashScreen Pin
Jassim Rahma10-Sep-13 10:15
Jassim Rahma10-Sep-13 10:15 
AnswerRe: display loading processes on SplashScreen Pin
SledgeHammer0110-Sep-13 10:26
SledgeHammer0110-Sep-13 10:26 
AnswerRe: display loading processes on SplashScreen Pin
Mycroft Holmes10-Sep-13 15:00
professionalMycroft Holmes10-Sep-13 15:00 
QuestionHow can I solve this error : " Provided column already belongs to the DataGridView control" Pin
babak1410-Sep-13 7:14
babak1410-Sep-13 7: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 "****"
C#
        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 7:22
mveRichard Deeming10-Sep-13 7:22 
GeneralRe: How can I solve this error : " Provided column already belongs to the DataGridView control" Pin
babak1410-Sep-13 8:03
babak1410-Sep-13 8:03 
GeneralRe: How can I solve this error : " Provided column already belongs to the DataGridView control" Pin
babak1410-Sep-13 8:16
babak1410-Sep-13 8:16 
QuestionMessageBox with textbox WPF Pin
juliogyn10-Sep-13 3:57
juliogyn10-Sep-13 3:57 
AnswerRe: MessageBox with textbox WPF Pin
Richard MacCutchan10-Sep-13 5:17
mveRichard MacCutchan10-Sep-13 5:17 
QuestionTake the first day of the month and the last day of the month ? Pin
Member 24584679-Sep-13 22:59
Member 24584679-Sep-13 22:59 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
Richard MacCutchan9-Sep-13 23:43
mveRichard MacCutchan9-Sep-13 23:43 
GeneralRe: Take the first day of the month and the last day of the month ? Pin
Pete O'Hanlon10-Sep-13 0:44
mvePete O'Hanlon10-Sep-13 0:44 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
Pete O'Hanlon10-Sep-13 0:38
mvePete O'Hanlon10-Sep-13 0:38 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
Pete O'Hanlon10-Sep-13 2:22
mvePete O'Hanlon10-Sep-13 2:22 
AnswerRe: Take the first day of the month and the last day of the month ? Pin
ExcellentOrg10-Sep-13 5:27
ExcellentOrg10-Sep-13 5:27 
GeneralRe: Take the first day of the month and the last day of the month ? Pin
jschell10-Sep-13 8:52
jschell10-Sep-13 8:52 
QuestionUnable to change default color of Progress Bar control in winforms Pin
superselector8-Sep-13 21:02
superselector8-Sep-13 21:02 
AnswerRe: Unable to change default color of Progress Bar control in winforms Pin
Abhinav S8-Sep-13 22:28
Abhinav S8-Sep-13 22:28 
AnswerRe: Unable to change default color of Progress Bar control in winforms Pin
Eddy Vluggen8-Sep-13 22:33
professionalEddy Vluggen8-Sep-13 22:33 
QuestionC# code making prolem when calling secure conection. Pin
Shinu K8-Sep-13 20:15
Shinu K8-Sep-13 20:15 
AnswerRe: C# code making prolem when calling secure conection. Pin
Abhinav S8-Sep-13 22:25
Abhinav S8-Sep-13 22:25 

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.