BrightIdeasSoftware.ObjectListView.GetModelObject C# (CSharp) Method

GetModelObject() public method

Return the model object at the given index
public GetModelObject ( int index ) : object
index int Index of the model object to be returned
return object
        public virtual object GetModelObject(int index)
        {
            OLVListItem item = this.GetItem(index);
            return item == null ? null : item.RowObject;
        }

Usage Example

        private static string RowToString(ObjectListView listView, int rowIndex, string[] values)
        {
            var columns = listView.ColumnsInDisplayOrder;
            int nbCol = columns.Count;

            var modelObject = listView.GetModelObject(rowIndex);
            for (int i = 0; i < nbCol; i++)
            {
                var col = columns[i];
                string val = col.GetStringValue(modelObject);
                string escapeVal = StringHelpers.Escape(val);
                values[i] = escapeVal;
            }
            return string.Join("\t", values);
        }
All Usage Examples Of BrightIdeasSoftware.ObjectListView::GetModelObject
ObjectListView