Last post Dec 15, 2016 03:17 AM by Eric Du
Dec 14, 2016 04:27 AM|Shortstuff81000|LINK
I am working on a shopping cart application using the tutorial
Getting Started with ASP.NET 4.5 Web Forms. I am on the section about creating the Shopping Cart page. I am using a ListView instead of a GridView to make the cart more responsive and easier to look at than just a bunch of rows and columns. I'm not entirely
sure, but I think I should replace "GridViewRow" with "ListViewItem". Unfortunately, I have no idea what should replace DataControlFieldCell and the "ExtractValuesFromCell" method. Any ideas would be most welcome!
Public Shared Function GetValues(row As GridViewRow) As IOrderedDictionary
Dim values As IOrderedDictionary = New OrderedDictionary()
For Each cell As DataControlFieldCell In row.Cells
If cell.Visible Then
' Extract values from the cell.
cell.ContainingField.ExtractValuesFromCell(values, cell, row.RowState, True)
Dec 15, 2016 03:17 AM|Eric Du|LINK
I'm not entirely sure, but I think I should replace "GridViewRow" with "ListViewItem".
According to your description, GridViewRow is the class of the GridView, ListViewItem is the class of the ListView, you use ListViewItem is right.
I have no idea what should replace DataControlFieldCell and the "ExtractValuesFromCell" method. Any ideas would be most welcome!
As far as I know, these is the data control method, gridview or listview is the table, these are suitable for table, you can check more details in the following links:
DataControlField.ExtractValuesFromCell Method (IOrderedDictionary, DataControlFieldCell, DataControlRowState, Boolean):