Saturday, June 30, 2012

Difference between Panel and GroupBox classes in .NET

The both classes that is Panel and GroupBox can be used as a container for other controls such as check box control, radio button control etc. But the difference between these two classes is 
• In case of Panel class captions cannot be displayed i.e. we can’t set caption but in GroupBox class captions can be displayed. 
• The Panel class can have scroll bars but GroupBox class cannot have scroll bar.

Thursday, June 28, 2012

Add row to bound Datagrideview


        Dim dr As DataRow = CType(DgviewDetail.DataSource, DataTable).NewRow
        dr.Item(1) = "anand"

        'DgviewDetail.Rows.Add(dr)

        CType(DgviewDetail.DataSource, DataTable).Rows.Add(dr)

Wednesday, June 13, 2012

excel connection string



ExcelCon = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + WorkBook + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1;';")