The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I need to get the value of a cell from the current row. I want to use the name of the column because the users move them around. I'm using this method and it works fine until the column is moved. I want to replace the call to the datarow object (dr)
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
ADAdministrator Syncfusion Team February 28, 2007 08:57 PM UTC
Hi Prumery,
You can get the ColIndex from column name by using Binder.NameToColIndex method. Please try the code snippet
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 Dim ColIndex As Integer = dgEng.Binder.NameToColIndex("PlatMap") dgEng(cc.RowIndex, ColIndex).Text