Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datagrid problems
Message
From
27/11/2004 17:50:08
 
 
To
22/11/2004 08:51:17
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP1
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
00963454
Message ID:
00965155
Views:
11
You must trap the datatable.columnchanging event, i pass you an example ,the me.total() method performs the calculatio of the totals invoice., "movdet" is the name for the details table in my case.

HTH

AddHandler dt.RowChanged, New DataRowChangeEventHandler(AddressOf Cambio_fila)
AddHandler dt.ColumnChanging, New DataColumnChangeEventHandler(AddressOf Cambio_columna)

Sub Cambio_columna(ByVal sender As Object, ByVal e As DataColumnChangeEventArgs)
e.Row.EndEdit()
Me.BindingContext(ds, ds.Tables("movdet").TableName).EndCurrentEdit()
End Sub
Sub Cambio_fila(ByVal sender As Object, ByVal e As DataRowChangeEventArgs)
Me.total()

End Sub
>I have three problems with the MS Datagrid.
>
>1.) When i change the value in in cell, changes are not written to the Datatble until i move to the next row.
>Is there a way to write the change to the Datatable when i move to the a new cell in the same row or force the changes to be written to the datatable.
>
>2.) I have expression columns, and have almost the same problem, i change a value in a cell, but the expression column is not refreshes until i move to the next row.
>
>3.) This is weird, not sure if it is a Datagrid or DataTable problem.
>I have a master detail form, i am using databinding, i have an dataadater to fill the detail table, this dataadapater has a parameter which is the primary key of the master table. this is what i do:
>-add a new record through the currency manager in the master table
>-Clear Datatable
>-Cancel changes and call Datatable clear method and fill it again.
>-I get an error that says that i will have duplicate rows and it show repeated rows, but the table doesn't have repeated keys.
>
>It looks like the Datatable is not being cleared.
>
>This only happens if i have one record in the Master table.
>
>If i have two records in the Master table, i don't have this problem.
Previous
Reply
Map
View

Click here to load this message in the networking platform