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

            if (item != null)
            {
                item.Control.Text = text;
            }
        }
示例#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;
            }
        }
示例#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;
            }
        }
示例#4
0
        //
        public String GetItemText(int row, int col)
        {
            GridViewItem item = GetItem(row, col);

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

            return("");
        }
示例#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;
     }
 }
示例#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);
        }
示例#7
0
 //
 public virtual void OnClickItem(GridViewItem clickItem)
 {
     if (clickItem.VisibleOnClick)
     {
         if (clickItem is GridViewComboItem)
         {
             ShowCombo((GridViewComboItem)clickItem);
         }
         else
         {
             m_CmbItem.Visible = false;
         }
     }
 }
示例#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);
        }
示例#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);
            }
        }
示例#10
0
 //
 public void AddItem(int row, int col, GridViewItem item)
 {
 }
示例#11
0
 //
 public void AddItem(GridViewItem item)
 {
     m_List.Add(item);
 }