AddColumn() public method

public AddColumn ( string columnTitle, string columnName ) : void
columnTitle string
columnName string
return void
Esempio n. 1
0
        private void usage()
        {
            var textCollectionList = new AWBTextCollectionList();

            //--- Goes In Contructor ---//
            textCollectionList.AddColumn("Title 1", "col1");
            textCollectionList.AddColumn("Title 2", "col2");

            //--- Goes in DataToControls ---//
            DataGridViewRow row = textCollectionList.AddRow();

            textCollectionList.AddColumnData(row, "col1", "cell 1 data");
            textCollectionList.AddColumnData(row, "col2", "cell 2 data");
            row = textCollectionList.AddRow();
            textCollectionList.AddColumnData(row, "col1", "more cell 1 data");
            textCollectionList.AddColumnData(row, "col2", "more cell 2 data");

            //--- Goes in ControlsToData ---//
            List <List <string> > table = textCollectionList.GetTable();

            foreach (var tableRow in table)
            {
                foreach (string rowColumn in tableRow)
                {
                }
            }
        }
        private void usage()
        {
            var textCollectionList = new AWBTextCollectionList();

            //--- Goes In Contructor ---//
            textCollectionList.AddColumn("Title 1", "col1");
            textCollectionList.AddColumn("Title 2", "col2");

            //--- Goes in DataToControls ---//
            DataGridViewRow row = textCollectionList.AddRow();
            textCollectionList.AddColumnData(row, "col1", "cell 1 data");
            textCollectionList.AddColumnData(row, "col2", "cell 2 data");
            row = textCollectionList.AddRow();
            textCollectionList.AddColumnData(row, "col1", "more cell 1 data");
            textCollectionList.AddColumnData(row, "col2", "more cell 2 data");

            //--- Goes in ControlsToData ---//
            List<List<string>> table = textCollectionList.GetTable();
            foreach (var tableRow in table)
            {
                foreach (string rowColumn in tableRow)
                {
                }
            }
        }