ATMLCommonLibrary.controls.awb.AWBTextCollectionList.AddRow C# (CSharp) Method

AddRow() public method

public AddRow ( ) : System.Windows.Forms.DataGridViewRow
return System.Windows.Forms.DataGridViewRow
        public DataGridViewRow AddRow()
        {
            int idx = dgTextData.Rows.Add();
            DataGridViewRow row = dgTextData.Rows[idx];
            return row;
        }

Usage Example

Example #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)
                {
                }
            }
        }
All Usage Examples Of ATMLCommonLibrary.controls.awb.AWBTextCollectionList::AddRow