Esempio n. 1
0
        private void load_data_2_grid()
        {
            DataSet v_ds_hoc_vien = new DataSet();

            TOSApp.SCMServices.SyncData v_ws = new TOSApp.SCMServices.SyncData();
            string v_str_key_search          = HelpUtils.gen_string_call_scm_get_sinh_vien_ws("", m_txt_key_search.Text.Trim(), "", "", "20", m_cbo_truong.Text);

            v_ds_hoc_vien = v_ws.TOS_search_info_hoc_vien(HelpUtils.gen_string_call_scm_get_sinh_vien_ws("", m_txt_key_search.Text.Trim(), "", "", "20", m_cbo_truong.Text));
            m_fg.Redraw   = false;
            CGridUtils.Dataset2C1Grid(v_ds_hoc_vien, m_fg, m_obj_trans);
            m_fg.Sort(SortFlags.Ascending, (int)e_col_Number.MA_TRUONG, (int)e_col_Number.MA_LOP);
            set_tree_on_grid();
            m_fg.Redraw = true;
            make_stt();
            m_fg.Focus();
            if (m_fg.Rows.Count > 3)
            {
                m_fg.Row = 3;
            }
            m_fg.Col = 3;
            if (m_fg.Rows.Count == 1)
            {
                m_lb_thong_bao_ket_qua.Visible = true;
                SizeConverter v_size = new SizeConverter();

                m_lb_thong_bao_ket_qua.Font      = new System.Drawing.Font(new FontFamily("Microsoft Sans Serif"), 12);
                m_lb_thong_bao_ket_qua.ForeColor = Color.FromArgb(129, 12, 21);
            }
            else
            {
                m_lb_thong_bao_ket_qua.Visible = false;
            }
        }
Esempio n. 2
0
        private void _flex_BeforeSort(object sender, C1.Win.C1FlexGrid.SortColEventArgs e)
        {
            // cancel built-in sorting
            e.Cancel = true;

            // sort using custom comparer
            IComparer comp = new NullComparer(sender as C1FlexGrid, e);

            _flex.Sort(comp);

            // update display and current sort order
            _flex.ShowSortAt(e.Order, e.Col);
        }
Esempio n. 3
0
        private void _flex_BeforeSort(object sender, C1.Win.C1FlexGrid.SortColEventArgs e)
        {
            // use custom sorting for column "Name" (sort files by extension)
            if (_flex.Cols[e.Col].Name == "Name")
            {
                // hadle the sort ourselves
                Cursor = Cursors.WaitCursor;
                _flex.Sort(new FileNameComparer(_flex, e.Order));
                Cursor = null;

                // tell control we handled it
                e.Handled = true;
            }
        }
Esempio n. 4
0
 // apply custom sort
 private void _btnCustomSort_Click(object sender, System.EventArgs e)
 {
     _flex.Sort(new MyComparer(_flex));
 }