Beispiel #1
0
        //
        public void SetItemText(int row, int col, String text)
        {
            GridViewItem item = GetItem(row, col);

            if (item != null)
            {
                item.Control.Text = text;
            }
        }
Beispiel #2
0
        // Rethink like Android....
        public virtual void GetView(int position, GridViewItem convertView)
        {
            PropertyObject obj = (PropertyObject)convertView.m_ItemData;

            if (obj != null)
            {
                convertView.Control.Text = obj.Text;
            }
        }
Beispiel #3
0
        //
        public virtual void UpdateData(GridViewItem view)
        {
            PropertyObject obj = (PropertyObject)view.m_ItemData;

            if (obj != null)
            {
                //obj.Text = view.Control.Text;
                obj.TextNew = view.Control.Text;
            }
        }
Beispiel #4
0
        //
        public String GetItemText(int row, int col)
        {
            GridViewItem item = GetItem(row, col);

            if (item != null)
            {
                return(item.Control.Text);
            }

            return("");
        }
Beispiel #5
0
 //
 public void AddItem(GridViewItem item, int row)
 {
     // Last Item
     if (row >= m_List.Count)
     {
         m_List.Add(item);
     }
     else
     {
         m_List[row] = item;
     }
 }
Beispiel #6
0
        //
        public GridViewItem AddItem(String text, ITEM_TYPE type)
        {
            GridViewItem item = CreateItem(type);

            item.Control.Text = text;
            // m_iRowHeight for Col header
            item.Y = m_iColHeaderHeight + m_iRowHeight * m_List.Count + m_iPadding;
            item.X = m_Header.X;
            item.SetColumn(m_Header);
            m_List.Add(item);
            return(item);
        }
Beispiel #7
0
 //
 public virtual void OnClickItem(GridViewItem clickItem)
 {
     if (clickItem.VisibleOnClick)
     {
         if (clickItem is GridViewComboItem)
         {
             ShowCombo((GridViewComboItem)clickItem);
         }
         else
         {
             m_CmbItem.Visible = false;
         }
     }
 }
Beispiel #8
0
        //
        public GridViewItem AddItem(int row, int col, String text, ITEM_TYPE type)
        {
            GridViewColumn colObj = GetColumn(col);

            if (colObj != null)
            {
                GridViewItem item = colObj.AddItem(text, type);
                item.SetParent(this);
                this.Controls.Add(item.GetControl());
                return(item);
            }

            return(null);
        }
Beispiel #9
0
        public void OnModify(object sender, EventArgs e)
        {
            GridViewItem   item = (GridViewItem)sender;
            GridViewColumn col  = GetColumn(item.Column.ColumnIndex);

            if (col != null)
            {
                col.UpdateData(item);
            }

            if (m_DataChangeObserver != null)
            {
                m_DataChangeObserver.OnModify(item.m_ItemData, e);
            }
        }
Beispiel #10
0
 //
 public void AddItem(int row, int col, GridViewItem item)
 {
 }
Beispiel #11
0
 //
 public void AddItem(GridViewItem item)
 {
     m_List.Add(item);
 }