Ejemplo n.º 1
0
        /// <summary>
        /// 增加数组到表行
        /// </summary>
        /// <param name="list"></param>
        public void add(object array)
        {
            JsArray       arr  = array as JsArray;
            List <string> list = new List <string>();

            for (int i = 0; i < arr.Length; i++)
            {
                list.Add(arr.get(i).ToString());
            }

            Table.ExpandRow(Table.Rows.Count);
            DataRow dr = Table.Rows[Table.Rows.Count - 1];

            for (int i = 0; i < list.Count; i++)
            {
                int col = i;
                Table.ExpandColumn(col);
                dr[col] = string.IsNullOrEmpty(list[i]) ? "" : list[i];
            }
            OnDataUpdate(Table);
        }