Exemple #1
0
        private void DGVKrepselis_CellContextMenuStripNeeded(object sender, DataGridViewCellContextMenuStripNeededEventArgs e)
        {
            int a = e.RowIndex;

            DGVKrepselis.ClearSelection();
            DGVKrepselis.Rows[a].Selected = true;
        }
Exemple #2
0
        public Form1()
        {
            InitializeComponent();
            gridPr    = new BindingList <Preke>();
            gridKreps = new BindingList <Preke>();
            Krps      = new Krepselis();
            Snta      = new Siunta();

            LoadFromFile();
            DGVprekiuSarasas.DataSource = gridPr;
            DGVprekiuSarasas.Columns["Ilgis"].Visible   = false;
            DGVprekiuSarasas.Columns["Plotis"].Visible  = false;
            DGVprekiuSarasas.Columns["Aukstis"].Visible = false;
            DGVprekiuSarasas.ClearSelection();

            DGVKrepselis.DataSource = gridKreps;
            DGVKrepselis.Columns["Ilgis"].Visible   = false;
            DGVKrepselis.Columns["Plotis"].Visible  = false;
            DGVKrepselis.Columns["Aukstis"].Visible = false;
            DGVKrepselis.ClearSelection();
        }