Beispiel #1
0
        void PopualteData()
        {
            MyDa = new MyDabaseDataContext(Properties.Settings.Default.Style_King_Dev);
            List <USP_VP_GET_PRODUCTResult> lstCategory = new List <USP_VP_GET_PRODUCTResult>();

            lstCategory = MyDa.USP_VP_GET_PRODUCT("", null, null, Datalayer.iT001_COMPANYID.ToString()).ToList();
            dgDisplayData.DataSource = lstCategory;

            dgDisplayData.Columns["TM01_PRODUCTID"].Visible = false;
            dgDisplayData.Columns["TM01_ISSET"].Visible     = false;

            dgDisplayData.Columns["TM01_NAME"].HeaderText    = "Name";
            dgDisplayData.Columns["TM01_HSNCODE"].HeaderText = "HSN Code";
            dgDisplayData.Columns["TM01_PRICE"].HeaderText   = "Price";

            this.dgDisplayData.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dgDisplayData.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(Datalayer.sGridHeaderColor1, Datalayer.sGridHeaderColor2, Datalayer.sGridHeaderColor3);
            dgDisplayData.EnableHeadersVisualStyles = false;

            // dgCategory.CurrentRow.DefaultCellStyle.BackColor = Color.White;
            dgDisplayData.ColumnHeadersHeightSizeMode             = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
            dgDisplayData.ColumnHeadersHeight                     = 30;
            dgDisplayData.ColumnHeadersDefaultCellStyle.Font      = new System.Drawing.Font("Tahoma", 12F, FontStyle.Bold, GraphicsUnit.Pixel);
            dgDisplayData.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;

            dgDisplayData.Columns["TM01_NAME"].Width = 500;
        }