We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

update cell value in unbound gdbg

Thread ID:

Created:

Updated:

Platform:

Replies:

74135 May 30,2008 03:39 PM May 30,2008 08:19 PM Windows Forms 1
loading
Tags: GridControl
Patrick Rumery
Asked On May 30, 2008 03:39 PM

How do I update a cell value in a column that has been moved? When I do this now the wrong cell gets the value I'm trying to set it to.

Dim cc As GridCurrentCell = dgEng.CurrentCell
Dim cm As CurrencyManager = CType(Me.BindingContext(Me.dgEng.DataSource, Me.dgEng.DataMember), CurrencyManager)
Dim dr As DataRow = CType(cm.Current, DataRowView).Row

dgEng(cc.RowIndex, dr.Table.Columns("PlatMap").Ordinal + 1).CellValue = PMfile

the problem is the ordinal value doesn't move with the colum. Do I need to update the datasource and then rebind? Or can I find the column position another way?

Thanks,
Patrick


Administrator [Syncfusion]
Replied On May 30, 2008 08:19 PM

Maybe this will work for you. Instead of trying to update the grid cell, try to change the datarow directly.

Dim dr As DataRow = CType(cm.Current, DataRowView).Row

dr("PlatMap") = PMfile


If you still want to find the column index, you can try

dim colIndex as Integer = grid.Binder.NameToColIndex("PlatMap")





CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;