Beispiel #1
0
        private void FillGrid()
        {
            _listConnections = CentralConnections.GetForGroup(ConnectionGroupCur.ConnectionGroupNum);
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            GridColumn col;

            col = new GridColumn("Database", 320);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Note", 300);
            gridMain.ListGridColumns.Add(col);
            gridMain.ListGridRows.Clear();
            GridRow row;

            for (int i = 0; i < _listConnections.Count; i++)
            {
                row = new GridRow();
                if (_listConnections[i].DatabaseName == "")               //uri
                {
                    row.Cells.Add(_listConnections[i].ServiceURI);
                }
                else
                {
                    row.Cells.Add(_listConnections[i].ServerName + ", " + _listConnections[i].DatabaseName);
                }
                row.Cells.Add(_listConnections[i].Note);
                //row.Tag=_listConnections[i];
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }