public void LoadData(FieldList flds)
        {
            fields = (FieldList)flds.Clone();
            ListViewItem v;

            for (int i = 0; i < fields.Count; i++)
            {
                v = new ListViewItem(fields[i].Name);
                v.SubItems.Add(EPField.TypeString(fields[i].OleDbType));
                v.SubItems.Add(fields[i].DataSize.ToString());
                if (fields[i].Value == null)
                {
                    v.SubItems.Add("");
                }
                else
                {
                    v.SubItems.Add(fields[i].Value.ToString());
                }
                listView1.Items.Add(v);
            }
            if (listView1.Items.Count > 0)
            {
                listView1.Items[0].Selected = true;
            }
        }
Exemplo n.º 2
0
        public void LoadData(EasyQuery qry)
        {
            query  = (EasyQuery)qry.Clone();
            fields = query.Fields;
            ListViewItem v;

            for (int i = 0; i < fields.Count; i++)
            {
                v = new ListViewItem(fields[i].Name);
                v.SubItems.Add(EPField.TypeString(fields[i].OleDbType));
                v.SubItems.Add(fields[i].IsIdentity.ToString());
                v.SubItems.Add(fields[i].IsFile.ToString());
                v.SubItems.Add(fields[i].ColumnWidth.ToString());
                v.SubItems.Add(fields[i].Visible.ToString());
                v.SubItems.Add(fields[i].ReadOnly.ToString());
                listView1.Items.Add(v);
            }
            if (listView1.Items.Count > 0)
            {
                listView1.Items[0].Selected = true;
            }
        }