Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
Edits not changing GridRecordItem
posted

 I have a WebDataGrid bound to a DataSource. The columns are not being autogenerated. I've made edits to the items in the WebDataGrid.  However,  I'm not seeing the changes reflected in the GridRecordItem when I loop thru the rows. I was expecting to see the changed values in objGridRecordItem.Text,  but  I'm still seeing the original values prior to my edits.
What am I doing wrong?

Ed T

    Private Sub WebDataGridLoop()
        Dim strColumnName As String
        Dim objGridRecordItem As GridRecordItem
        Dim objBoundDataField As BoundDataField
        Dim i As Integer


        For Each row As GridRecord In Me.wdgInvoiceServiceFeeDefault.Rows

            Dim objInvoiceServiceFeeDefault As New InvoiceServiceFeeDefault

            i = row.Items.Count

            For i = 0 To (i - 1)

                objGridRecordItem = row.Items(i)
                objBoundDataField = row.Items(i).Column
                strColumnName = objBoundDataField.DataFieldName

                Select Case strColumnName
                    Case AutoSignupDefaultInvoiceServiceFeeDCSchema.InvoiceServiceTypeID
                        objInvoiceServiceFeeDefault.InvoiceServiceTypeID = objGridRecordItem.Text
                    Case AutoSignupDefaultInvoiceServiceFeeDCSchema.ServiceUnitID
                        objInvoiceServiceFeeDefault.ServiceUnitID = objGridRecordItem.Text
                    Case AutoSignupDefaultInvoiceServiceFeeDCSchema.ServiceFreeQty
                        objInvoiceServiceFeeDefault.ServiceFreeQty = objGridRecordItem.Text
                    Case AutoSignupDefaultInvoiceServiceFeeDCSchema.ServiceFee
                        objInvoiceServiceFeeDefault.ServiceFee = objGridRecordItem.Text
                End Select

            Next

            Me.InvoiceServiceFeeDefaultInsert(objInvoiceServiceFeeDefault)

        Next

    End Sub 

 

Parents Reply Children