Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

My datagrid saves all cells that were editted accept the last cell. This happens in any cell if you do not leave the cell and go straight to the "UPDATE" button.

 

I found Microsoft KB aricle 833032 that references this problem, but the code is written in C# and I can't seem to get it to work in VB.NET.

 

DataGridColumnStyle cStyle =

dataGrid2.TableStyles[dvOrderDetails.Table.TableName].GridColumnStyles[dataGrid2.CurrentCell.ColumnNumber];

dataGrid2.EndEdit(cStyle, dataGrid2.CurrentCell.RowNumber, false);

dvOrderDetails.Table.Rows[dataGrid2.CurrentCell.RowNumber].EndEdit();

 

Can anyone help convert this to VB?

  • Moderators
Posted

This should do it....

 

dim cStyle as DataGridColumnStyle

cStyle = dataGrid2.TableStyles(dvOrderDetails.Table.TableName).GridColumnStyles(dataGrid2.CurrentCell.ColumnNumber)

dataGrid2.EndEdit(cStyle, dataGrid2.CurrentCell.RowNumber, false)

dvOrderDetails.Table.Rows(dataGrid2.CurrentCell.RowNumber).EndEdit()

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...