473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

DataGrid Combo Box problem

I have a dataset whose source is a SQL 2k stored procedure that I am trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values in
combo boxes in the grid and instead of displaying the numeric values, have
the combo box display a string that corresponds to the numeric value (i.e.
No Access for 0, Read for 1, Create for 3, and Edit for 7). I have written
the code below to try to implement this, but it throws an error on
rendering. The error is:
An unhandled exception of type 'System.InvalidCastException'
occurred in system.windows.forms.dll
Additional information: Specified cast is not valid.
I suspect, but can't be sure, that the cast error has to do with the binding
of the dataset to the pulldown. The column names that I am trying to bind
to are "TSL", "HCT", and "MCT"

Can anyone tell me what I am doing wrong here?
TIA,
Ron L

The code:
' Setup the permissions grid
' Setup the list of Display/Value pairs for the combo
boxes
Dim permsList As DataTable
permsList = New DataTable
permsList.Columns.Add(New DataColumn("Display", GetType(String)))
permsList.Columns.Add(New DataColumn("Id", GetType(Integer)))
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows(0)(0) = "No Access"
permsList.Rows(0)(1) = 0
permsList.Rows(1)(0) = "Read"
permsList.Rows(1)(1) = 1
permsList.Rows(2)(0) = "Create"
permsList.Rows(2)(1) = 3
permsList.Rows(3)(0) = "Edit"
permsList.Rows(3)(1) = 7

' Fill the DataTable from the user data dataset (includes user
permissions)
Dim dt As DataTable = dsUserData.Tables(0)

Dim tableStyle As New DataGridTableStyle
tableStyle.GridColumnStyles.Clear()
tableStyle.MappingName = "Table"
tableStyle.MappingName = dt.TableName.ToString

' Setup the Subsystems column
Dim TextCol As New DataGridTextBoxColumn
TextCol.MappingName = dt.Columns(15).ColumnName
TextCol.HeaderText = dt.Columns(15).ColumnName
tableStyle.GridColumnStyles.Add(TextCol)

' Setup the permissions columns

Dim i As Integer
For i = 2 To 4
'Dim textcol2 As New DataGridTextBoxColumn
'textcol2.MappingName = dt.Columns(i).ColumnName
'textcol2.HeaderText = dt.Columns(i).ColumnName
'tableStyle.GridColumnStyles.Add(textcol2)
Dim ComboTextCol As New DataGridComboBoxColumn
ComboTextCol.MappingName = dt.Columns(i).ColumnName
ComboTextCol.HeaderText = dt.Columns(i).ColumnName
ComboTextCol.Width = 120
ComboTextCol.ColumnComboBox.Items.Clear()
ComboTextCol.ColumnComboBox.DataSource = permsList
ComboTextCol.ColumnComboBox.DisplayMember = "Display"
ComboTextCol.ColumnComboBox.ValueMember =
dt.Columns(i).ColumnName
' for the above line I have also tried setting it equal to "Id"

tableStyle.PreferredRowHeight =
ComboTextCol.ColumnComboBox.Height + 2

tableStyle.GridColumnStyles.Add(ComboTextCol)
Next

grdPermissions.TableStyles.Clear()
grdPermissions.TableStyles.Add(tableStyle)
grdPermissions.DataSource = dt
Dim grdStyle As DataGridTableStyle

'no adding of new rows thru dataview...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(grdPermissions.DataSource,
grdPermissions.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False
Nov 21 '05 #1
6 3733
After some more experimentation (and hair pulling), it seems that the line
that is causing the problem is this one:

ComboTextCol.MappingName = dt.Columns(i).ColumnName

Can anyone tell mw what I am doing wrong here?

TIA
Ron L

"Ron L" <ro**@bogus.Address.com> wrote in message
news:uk*************@TK2MSFTNGP10.phx.gbl...
I have a dataset whose source is a SQL 2k stored procedure that I am trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values
in combo boxes in the grid and instead of displaying the numeric values,
have the combo box display a string that corresponds to the numeric value
(i.e. No Access for 0, Read for 1, Create for 3, and Edit for 7). I have
written the code below to try to implement this, but it throws an error on
rendering. The error is:
An unhandled exception of type 'System.InvalidCastException'
occurred in system.windows.forms.dll
Additional information: Specified cast is not valid.
I suspect, but can't be sure, that the cast error has to do with the
binding of the dataset to the pulldown. The column names that I am trying
to bind to are "TSL", "HCT", and "MCT"

Can anyone tell me what I am doing wrong here?
TIA,
Ron L

The code:
' Setup the permissions grid
' Setup the list of Display/Value pairs for the combo
boxes
Dim permsList As DataTable
permsList = New DataTable
permsList.Columns.Add(New DataColumn("Display", GetType(String)))
permsList.Columns.Add(New DataColumn("Id", GetType(Integer)))
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows(0)(0) = "No Access"
permsList.Rows(0)(1) = 0
permsList.Rows(1)(0) = "Read"
permsList.Rows(1)(1) = 1
permsList.Rows(2)(0) = "Create"
permsList.Rows(2)(1) = 3
permsList.Rows(3)(0) = "Edit"
permsList.Rows(3)(1) = 7

' Fill the DataTable from the user data dataset (includes user
permissions)
Dim dt As DataTable = dsUserData.Tables(0)

Dim tableStyle As New DataGridTableStyle
tableStyle.GridColumnStyles.Clear()
tableStyle.MappingName = "Table"
tableStyle.MappingName = dt.TableName.ToString

' Setup the Subsystems column
Dim TextCol As New DataGridTextBoxColumn
TextCol.MappingName = dt.Columns(15).ColumnName
TextCol.HeaderText = dt.Columns(15).ColumnName
tableStyle.GridColumnStyles.Add(TextCol)

' Setup the permissions columns

Dim i As Integer
For i = 2 To 4
'Dim textcol2 As New DataGridTextBoxColumn
'textcol2.MappingName = dt.Columns(i).ColumnName
'textcol2.HeaderText = dt.Columns(i).ColumnName
'tableStyle.GridColumnStyles.Add(textcol2)
Dim ComboTextCol As New DataGridComboBoxColumn
ComboTextCol.MappingName = dt.Columns(i).ColumnName
ComboTextCol.HeaderText = dt.Columns(i).ColumnName
ComboTextCol.Width = 120
ComboTextCol.ColumnComboBox.Items.Clear()
ComboTextCol.ColumnComboBox.DataSource = permsList
ComboTextCol.ColumnComboBox.DisplayMember = "Display"
ComboTextCol.ColumnComboBox.ValueMember =
dt.Columns(i).ColumnName
' for the above line I have also tried setting it equal to "Id"

tableStyle.PreferredRowHeight =
ComboTextCol.ColumnComboBox.Height + 2

tableStyle.GridColumnStyles.Add(ComboTextCol)
Next

grdPermissions.TableStyles.Clear()
grdPermissions.TableStyles.Add(tableStyle)
grdPermissions.DataSource = dt
Dim grdStyle As DataGridTableStyle

'no adding of new rows thru dataview...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(grdPermissions.DataSource,
grdPermissions.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False

Nov 21 '05 #2
Hi,

Post the code for the column style

Ken
----------------
"Ron L" <ro**@bogus.Address.com> wrote in message
news:uk*************@TK2MSFTNGP10.phx.gbl...
I have a dataset whose source is a SQL 2k stored procedure that I am trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values in
combo boxes in the grid and instead of displaying the numeric values, have
the combo box display a string that corresponds to the numeric value (i.e.
No Access for 0, Read for 1, Create for 3, and Edit for 7). I have written
the code below to try to implement this, but it throws an error on
rendering. The error is:
An unhandled exception of type 'System.InvalidCastException'
occurred in system.windows.forms.dll
Additional information: Specified cast is not valid.
I suspect, but can't be sure, that the cast error has to do with the binding
of the dataset to the pulldown. The column names that I am trying to bind
to are "TSL", "HCT", and "MCT"

Can anyone tell me what I am doing wrong here?
TIA,
Ron L

The code:
' Setup the permissions grid
' Setup the list of Display/Value pairs for the combo
boxes
Dim permsList As DataTable
permsList = New DataTable
permsList.Columns.Add(New DataColumn("Display", GetType(String)))
permsList.Columns.Add(New DataColumn("Id", GetType(Integer)))
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows(0)(0) = "No Access"
permsList.Rows(0)(1) = 0
permsList.Rows(1)(0) = "Read"
permsList.Rows(1)(1) = 1
permsList.Rows(2)(0) = "Create"
permsList.Rows(2)(1) = 3
permsList.Rows(3)(0) = "Edit"
permsList.Rows(3)(1) = 7

' Fill the DataTable from the user data dataset (includes user
permissions)
Dim dt As DataTable = dsUserData.Tables(0)

Dim tableStyle As New DataGridTableStyle
tableStyle.GridColumnStyles.Clear()
tableStyle.MappingName = "Table"
tableStyle.MappingName = dt.TableName.ToString

' Setup the Subsystems column
Dim TextCol As New DataGridTextBoxColumn
TextCol.MappingName = dt.Columns(15).ColumnName
TextCol.HeaderText = dt.Columns(15).ColumnName
tableStyle.GridColumnStyles.Add(TextCol)

' Setup the permissions columns

Dim i As Integer
For i = 2 To 4
'Dim textcol2 As New DataGridTextBoxColumn
'textcol2.MappingName = dt.Columns(i).ColumnName
'textcol2.HeaderText = dt.Columns(i).ColumnName
'tableStyle.GridColumnStyles.Add(textcol2)
Dim ComboTextCol As New DataGridComboBoxColumn
ComboTextCol.MappingName = dt.Columns(i).ColumnName
ComboTextCol.HeaderText = dt.Columns(i).ColumnName
ComboTextCol.Width = 120
ComboTextCol.ColumnComboBox.Items.Clear()
ComboTextCol.ColumnComboBox.DataSource = permsList
ComboTextCol.ColumnComboBox.DisplayMember = "Display"
ComboTextCol.ColumnComboBox.ValueMember =
dt.Columns(i).ColumnName
' for the above line I have also tried setting it equal to "Id"

tableStyle.PreferredRowHeight =
ComboTextCol.ColumnComboBox.Height + 2

tableStyle.GridColumnStyles.Add(ComboTextCol)
Next

grdPermissions.TableStyles.Clear()
grdPermissions.TableStyles.Add(tableStyle)
grdPermissions.DataSource = dt
Dim grdStyle As DataGridTableStyle

'no adding of new rows thru dataview...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(grdPermissions.DataSource,
grdPermissions.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False

Nov 21 '05 #3
Ken
Thanks for the response. I forgot to mention that this is the code from
Ken Shepard's www.syncfusion.com site, the data grid bound combo box column.

Here it is.

Ron L

' DataGridComboBoxColumn.vb - From George Shepard's www.syncfusion.com site.
(The bound
' data grid combo box example.)
Option Strict Off
Option Explicit On

Imports Microsoft.VisualBasic
Imports System
Imports System.ComponentModel
Imports System.Data
Imports System.Data.Common
Imports System.Data.OleDb
Imports System.Drawing
Imports System.Windows.Forms

' Step 1. Derive a custom column style from DataGridTextBoxColumn
' a) add a ComboBox member
' b) track when the combobox has focus in Enter and Leave events
' c) override Edit to allow the ComboBox to replace the TextBox
' d) override Commit to save the changed data
Public Class DataGridComboBoxColumn
Inherits DataGridTextBoxColumn
Public ColumnComboBox As NoKeyUpCombo
Private _source As System.Windows.Forms.CurrencyManager
Private _rowNum As Integer
Private _isEditing As Boolean
Public Shared _RowCount As Integer
Public Sub New()
_source = Nothing
_isEditing = False
_RowCount = -1

ColumnComboBox = New NoKeyUpCombo()
ColumnComboBox.DropDownStyle = ComboBoxStyle.DropDownList

AddHandler ColumnComboBox.Leave, AddressOf LeaveComboBox
AddHandler ColumnComboBox.SelectionChangeCommitted, AddressOf
ComboStartEditing
End Sub 'New

Private Sub HandleScroll(ByVal sender As Object, ByVal e As
EventArgs)
If ColumnComboBox.Visible Then
ColumnComboBox.Hide()
End If
End Sub 'HandleScroll

Private Sub ComboStartEditing(ByVal sender As Object, ByVal e As
EventArgs)
_isEditing = True
MyBase.ColumnStartedEditing(sender)
End Sub 'ComboMadeCurrent
Private Sub LeaveComboBox(ByVal sender As Object, ByVal e As
EventArgs)
If _isEditing Then
SetColumnValueAtRow(_source, _rowNum, ColumnComboBox.Text)
_isEditing = False
Invalidate()

End If
ColumnComboBox.Hide()
AddHandler Me.DataGridTableStyle.DataGrid.Scroll, New
EventHandler(AddressOf HandleScroll)
End Sub 'LeaveComboBox
Protected Overloads Overrides Sub Edit(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal bounds
As System.Drawing.Rectangle, ByVal [readOnly] As Boolean, ByVal instantText
As String, ByVal cellIsVisible As Boolean)

MyBase.Edit([source], rowNum, bounds, [readOnly], instantText,
cellIsVisible)

_rowNum = rowNum
_source = [source]

ColumnComboBox.Parent = Me.TextBox.Parent
ColumnComboBox.Location = Me.TextBox.Location
ColumnComboBox.Size = New Size(Me.TextBox.Size.Width,
ColumnComboBox.Size.Height)
ColumnComboBox.SelectedIndex =
ColumnComboBox.FindStringExact(Me.TextBox.Text)
ColumnComboBox.Text = Me.TextBox.Text
Me.TextBox.Visible = False
ColumnComboBox.Visible = True
AddHandler Me.DataGridTableStyle.DataGrid.Scroll, AddressOf
HandleScroll

ColumnComboBox.BringToFront()
ColumnComboBox.Focus()
End Sub 'Edit
Protected Overrides Function Commit(ByVal dataSource As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer) As Boolean

If _isEditing Then
_isEditing = False
SetColumnValueAtRow(dataSource, rowNum, ColumnComboBox.Text)
End If
Return True
End Function 'Commit
Protected Overrides Sub ConcedeFocus()
Console.WriteLine("ConcedeFocus")
MyBase.ConcedeFocus()
End Sub 'ConcedeFocus

Protected Overrides Function GetColumnValueAtRow(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer) As Object

Dim s As Object = MyBase.GetColumnValueAtRow([source], rowNum)
Dim dv As DataView = CType(Me.ColumnComboBox.DataSource,
DataView)
Dim rowCount As Integer = dv.Count
Dim i As Integer = 0
Dim s1 As Object

'if things are slow, you could order your dataview
'& use binary search instead of this linear one
While i < rowCount
s1 = dv(i)(Me.ColumnComboBox.ValueMember)
If (Not s1 Is DBNull.Value) AndAlso _
(Not s Is DBNull.Value) AndAlso _
s = s1 Then
Exit While
End If
i = i + 1
End While

If i < rowCount Then
Return dv(i)(Me.ColumnComboBox.DisplayMember)
End If
Return DBNull.Value
End Function 'GetColumnValueAtRow
Protected Overrides Sub SetColumnValueAtRow(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal value
As Object)
Dim s As Object = value

Dim dv As DataView = CType(Me.ColumnComboBox.DataSource,
DataView)
Dim rowCount As Integer = dv.Count
Dim i As Integer = 0
Dim s1 As Object

'if things are slow, you could order your dataview
'& use binary search instead of this linear one
While i < rowCount
s1 = dv(i)(Me.ColumnComboBox.DisplayMember)
If (Not s1 Is DBNull.Value) AndAlso _
s = s1 Then
Exit While
End If
i = i + 1
End While
If i < rowCount Then
s = dv(i)(Me.ColumnComboBox.ValueMember)
Else
s = DBNull.Value
End If
MyBase.SetColumnValueAtRow([source], rowNum, s)
End Sub 'SetColumnValueAtRow
End Class 'DataGridComboBoxColumn

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
Hi,

Post the code for the column style

Ken
----------------
"Ron L" <ro**@bogus.Address.com> wrote in message
news:uk*************@TK2MSFTNGP10.phx.gbl...
I have a dataset whose source is a SQL 2k stored procedure that I am
trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values
in
combo boxes in the grid and instead of displaying the numeric values, have
the combo box display a string that corresponds to the numeric value (i.e.
No Access for 0, Read for 1, Create for 3, and Edit for 7). I have
written
the code below to try to implement this, but it throws an error on
rendering. The error is:
An unhandled exception of type 'System.InvalidCastException'
occurred in system.windows.forms.dll
Additional information: Specified cast is not valid.
I suspect, but can't be sure, that the cast error has to do with the
binding
of the dataset to the pulldown. The column names that I am trying to bind
to are "TSL", "HCT", and "MCT"

Can anyone tell me what I am doing wrong here?
TIA,
Ron L

The code:
' Setup the permissions grid
' Setup the list of Display/Value pairs for the combo
boxes
Dim permsList As DataTable
permsList = New DataTable
permsList.Columns.Add(New DataColumn("Display", GetType(String)))
permsList.Columns.Add(New DataColumn("Id", GetType(Integer)))
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows(0)(0) = "No Access"
permsList.Rows(0)(1) = 0
permsList.Rows(1)(0) = "Read"
permsList.Rows(1)(1) = 1
permsList.Rows(2)(0) = "Create"
permsList.Rows(2)(1) = 3
permsList.Rows(3)(0) = "Edit"
permsList.Rows(3)(1) = 7

' Fill the DataTable from the user data dataset (includes user
permissions)
Dim dt As DataTable = dsUserData.Tables(0)

Dim tableStyle As New DataGridTableStyle
tableStyle.GridColumnStyles.Clear()
tableStyle.MappingName = "Table"
tableStyle.MappingName = dt.TableName.ToString

' Setup the Subsystems column
Dim TextCol As New DataGridTextBoxColumn
TextCol.MappingName = dt.Columns(15).ColumnName
TextCol.HeaderText = dt.Columns(15).ColumnName
tableStyle.GridColumnStyles.Add(TextCol)

' Setup the permissions columns

Dim i As Integer
For i = 2 To 4
'Dim textcol2 As New DataGridTextBoxColumn
'textcol2.MappingName = dt.Columns(i).ColumnName
'textcol2.HeaderText = dt.Columns(i).ColumnName
'tableStyle.GridColumnStyles.Add(textcol2)
Dim ComboTextCol As New DataGridComboBoxColumn
ComboTextCol.MappingName = dt.Columns(i).ColumnName
ComboTextCol.HeaderText = dt.Columns(i).ColumnName
ComboTextCol.Width = 120
ComboTextCol.ColumnComboBox.Items.Clear()
ComboTextCol.ColumnComboBox.DataSource = permsList
ComboTextCol.ColumnComboBox.DisplayMember = "Display"
ComboTextCol.ColumnComboBox.ValueMember =
dt.Columns(i).ColumnName
' for the above line I have also tried setting it equal to "Id"

tableStyle.PreferredRowHeight =
ComboTextCol.ColumnComboBox.Height + 2

tableStyle.GridColumnStyles.Add(ComboTextCol)
Next

grdPermissions.TableStyles.Clear()
grdPermissions.TableStyles.Add(tableStyle)
grdPermissions.DataSource = dt
Dim grdStyle As DataGridTableStyle

'no adding of new rows thru dataview...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(grdPermissions.DataSource,
grdPermissions.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False

Nov 21 '05 #4
One of my co-workers found the problem. I needed the .DefaultView on the
table in my Datasource mapping:

ComboTextCol.ColumnComboBox.DataSource = permsList.Copy.DefaultView

Ron L

"Ron L" <ro**@bogus.Address.com> wrote in message
news:uk*************@TK2MSFTNGP10.phx.gbl...
I have a dataset whose source is a SQL 2k stored procedure that I am trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values
in combo boxes in the grid and instead of displaying the numeric values,
have the combo box display a string that corresponds to the numeric value
(i.e. No Access for 0, Read for 1, Create for 3, and Edit for 7). I have
written the code below to try to implement this, but it throws an error on
rendering. The error is:
An unhandled exception of type 'System.InvalidCastException'
occurred in system.windows.forms.dll
Additional information: Specified cast is not valid.
I suspect, but can't be sure, that the cast error has to do with the
binding of the dataset to the pulldown. The column names that I am trying
to bind to are "TSL", "HCT", and "MCT"

Can anyone tell me what I am doing wrong here?
TIA,
Ron L

The code:
' Setup the permissions grid
' Setup the list of Display/Value pairs for the combo
boxes
Dim permsList As DataTable
permsList = New DataTable
permsList.Columns.Add(New DataColumn("Display", GetType(String)))
permsList.Columns.Add(New DataColumn("Id", GetType(Integer)))
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows(0)(0) = "No Access"
permsList.Rows(0)(1) = 0
permsList.Rows(1)(0) = "Read"
permsList.Rows(1)(1) = 1
permsList.Rows(2)(0) = "Create"
permsList.Rows(2)(1) = 3
permsList.Rows(3)(0) = "Edit"
permsList.Rows(3)(1) = 7

' Fill the DataTable from the user data dataset (includes user
permissions)
Dim dt As DataTable = dsUserData.Tables(0)

Dim tableStyle As New DataGridTableStyle
tableStyle.GridColumnStyles.Clear()
tableStyle.MappingName = "Table"
tableStyle.MappingName = dt.TableName.ToString

' Setup the Subsystems column
Dim TextCol As New DataGridTextBoxColumn
TextCol.MappingName = dt.Columns(15).ColumnName
TextCol.HeaderText = dt.Columns(15).ColumnName
tableStyle.GridColumnStyles.Add(TextCol)

' Setup the permissions columns

Dim i As Integer
For i = 2 To 4
'Dim textcol2 As New DataGridTextBoxColumn
'textcol2.MappingName = dt.Columns(i).ColumnName
'textcol2.HeaderText = dt.Columns(i).ColumnName
'tableStyle.GridColumnStyles.Add(textcol2)
Dim ComboTextCol As New DataGridComboBoxColumn
ComboTextCol.MappingName = dt.Columns(i).ColumnName
ComboTextCol.HeaderText = dt.Columns(i).ColumnName
ComboTextCol.Width = 120
ComboTextCol.ColumnComboBox.Items.Clear()
ComboTextCol.ColumnComboBox.DataSource = permsList
ComboTextCol.ColumnComboBox.DisplayMember = "Display"
ComboTextCol.ColumnComboBox.ValueMember =
dt.Columns(i).ColumnName
' for the above line I have also tried setting it equal to "Id"

tableStyle.PreferredRowHeight =
ComboTextCol.ColumnComboBox.Height + 2

tableStyle.GridColumnStyles.Add(ComboTextCol)
Next

grdPermissions.TableStyles.Clear()
grdPermissions.TableStyles.Add(tableStyle)
grdPermissions.DataSource = dt
Dim grdStyle As DataGridTableStyle

'no adding of new rows thru dataview...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(grdPermissions.DataSource,
grdPermissions.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False

Nov 21 '05 #5
Hi,

I dont see any line of code with an error. What i would suggest
is to place a break point in the start of each procedure in the columnstyle.
Step through the code line by line until you find the error.

Ken
----------------
"Ron L" <ro**@bogus.Address.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Ken
Thanks for the response. I forgot to mention that this is the code from
Ken Shepard's www.syncfusion.com site, the data grid bound combo box column.

Here it is.

Ron L

' DataGridComboBoxColumn.vb - From George Shepard's www.syncfusion.com site.
(The bound
' data grid combo box example.)
Option Strict Off
Option Explicit On

Imports Microsoft.VisualBasic
Imports System
Imports System.ComponentModel
Imports System.Data
Imports System.Data.Common
Imports System.Data.OleDb
Imports System.Drawing
Imports System.Windows.Forms

' Step 1. Derive a custom column style from DataGridTextBoxColumn
' a) add a ComboBox member
' b) track when the combobox has focus in Enter and Leave events
' c) override Edit to allow the ComboBox to replace the TextBox
' d) override Commit to save the changed data
Public Class DataGridComboBoxColumn
Inherits DataGridTextBoxColumn
Public ColumnComboBox As NoKeyUpCombo
Private _source As System.Windows.Forms.CurrencyManager
Private _rowNum As Integer
Private _isEditing As Boolean
Public Shared _RowCount As Integer
Public Sub New()
_source = Nothing
_isEditing = False
_RowCount = -1

ColumnComboBox = New NoKeyUpCombo()
ColumnComboBox.DropDownStyle = ComboBoxStyle.DropDownList

AddHandler ColumnComboBox.Leave, AddressOf LeaveComboBox
AddHandler ColumnComboBox.SelectionChangeCommitted, AddressOf
ComboStartEditing
End Sub 'New

Private Sub HandleScroll(ByVal sender As Object, ByVal e As
EventArgs)
If ColumnComboBox.Visible Then
ColumnComboBox.Hide()
End If
End Sub 'HandleScroll

Private Sub ComboStartEditing(ByVal sender As Object, ByVal e As
EventArgs)
_isEditing = True
MyBase.ColumnStartedEditing(sender)
End Sub 'ComboMadeCurrent
Private Sub LeaveComboBox(ByVal sender As Object, ByVal e As
EventArgs)
If _isEditing Then
SetColumnValueAtRow(_source, _rowNum, ColumnComboBox.Text)
_isEditing = False
Invalidate()

End If
ColumnComboBox.Hide()
AddHandler Me.DataGridTableStyle.DataGrid.Scroll, New
EventHandler(AddressOf HandleScroll)
End Sub 'LeaveComboBox
Protected Overloads Overrides Sub Edit(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal bounds
As System.Drawing.Rectangle, ByVal [readOnly] As Boolean, ByVal instantText
As String, ByVal cellIsVisible As Boolean)

MyBase.Edit([source], rowNum, bounds, [readOnly], instantText,
cellIsVisible)

_rowNum = rowNum
_source = [source]

ColumnComboBox.Parent = Me.TextBox.Parent
ColumnComboBox.Location = Me.TextBox.Location
ColumnComboBox.Size = New Size(Me.TextBox.Size.Width,
ColumnComboBox.Size.Height)
ColumnComboBox.SelectedIndex =
ColumnComboBox.FindStringExact(Me.TextBox.Text)
ColumnComboBox.Text = Me.TextBox.Text
Me.TextBox.Visible = False
ColumnComboBox.Visible = True
AddHandler Me.DataGridTableStyle.DataGrid.Scroll, AddressOf
HandleScroll

ColumnComboBox.BringToFront()
ColumnComboBox.Focus()
End Sub 'Edit
Protected Overrides Function Commit(ByVal dataSource As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer) As Boolean

If _isEditing Then
_isEditing = False
SetColumnValueAtRow(dataSource, rowNum, ColumnComboBox.Text)
End If
Return True
End Function 'Commit
Protected Overrides Sub ConcedeFocus()
Console.WriteLine("ConcedeFocus")
MyBase.ConcedeFocus()
End Sub 'ConcedeFocus

Protected Overrides Function GetColumnValueAtRow(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer) As Object

Dim s As Object = MyBase.GetColumnValueAtRow([source], rowNum)
Dim dv As DataView = CType(Me.ColumnComboBox.DataSource,
DataView)
Dim rowCount As Integer = dv.Count
Dim i As Integer = 0
Dim s1 As Object

'if things are slow, you could order your dataview
'& use binary search instead of this linear one
While i < rowCount
s1 = dv(i)(Me.ColumnComboBox.ValueMember)
If (Not s1 Is DBNull.Value) AndAlso _
(Not s Is DBNull.Value) AndAlso _
s = s1 Then
Exit While
End If
i = i + 1
End While

If i < rowCount Then
Return dv(i)(Me.ColumnComboBox.DisplayMember)
End If
Return DBNull.Value
End Function 'GetColumnValueAtRow
Protected Overrides Sub SetColumnValueAtRow(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal value
As Object)
Dim s As Object = value

Dim dv As DataView = CType(Me.ColumnComboBox.DataSource,
DataView)
Dim rowCount As Integer = dv.Count
Dim i As Integer = 0
Dim s1 As Object

'if things are slow, you could order your dataview
'& use binary search instead of this linear one
While i < rowCount
s1 = dv(i)(Me.ColumnComboBox.DisplayMember)
If (Not s1 Is DBNull.Value) AndAlso _
s = s1 Then
Exit While
End If
i = i + 1
End While
If i < rowCount Then
s = dv(i)(Me.ColumnComboBox.ValueMember)
Else
s = DBNull.Value
End If
MyBase.SetColumnValueAtRow([source], rowNum, s)
End Sub 'SetColumnValueAtRow
End Class 'DataGridComboBoxColumn

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
Hi,

Post the code for the column style

Ken
----------------
"Ron L" <ro**@bogus.Address.com> wrote in message
news:uk*************@TK2MSFTNGP10.phx.gbl...
I have a dataset whose source is a SQL 2k stored procedure that I am
trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values
in
combo boxes in the grid and instead of displaying the numeric values, have
the combo box display a string that corresponds to the numeric value (i.e.
No Access for 0, Read for 1, Create for 3, and Edit for 7). I have
written
the code below to try to implement this, but it throws an error on
rendering. The error is:
An unhandled exception of type 'System.InvalidCastException'
occurred in system.windows.forms.dll
Additional information: Specified cast is not valid.
I suspect, but can't be sure, that the cast error has to do with the
binding
of the dataset to the pulldown. The column names that I am trying to bind
to are "TSL", "HCT", and "MCT"

Can anyone tell me what I am doing wrong here?
TIA,
Ron L

The code:
' Setup the permissions grid
' Setup the list of Display/Value pairs for the combo
boxes
Dim permsList As DataTable
permsList = New DataTable
permsList.Columns.Add(New DataColumn("Display", GetType(String)))
permsList.Columns.Add(New DataColumn("Id", GetType(Integer)))
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows(0)(0) = "No Access"
permsList.Rows(0)(1) = 0
permsList.Rows(1)(0) = "Read"
permsList.Rows(1)(1) = 1
permsList.Rows(2)(0) = "Create"
permsList.Rows(2)(1) = 3
permsList.Rows(3)(0) = "Edit"
permsList.Rows(3)(1) = 7

' Fill the DataTable from the user data dataset (includes user
permissions)
Dim dt As DataTable = dsUserData.Tables(0)

Dim tableStyle As New DataGridTableStyle
tableStyle.GridColumnStyles.Clear()
tableStyle.MappingName = "Table"
tableStyle.MappingName = dt.TableName.ToString

' Setup the Subsystems column
Dim TextCol As New DataGridTextBoxColumn
TextCol.MappingName = dt.Columns(15).ColumnName
TextCol.HeaderText = dt.Columns(15).ColumnName
tableStyle.GridColumnStyles.Add(TextCol)

' Setup the permissions columns

Dim i As Integer
For i = 2 To 4
'Dim textcol2 As New DataGridTextBoxColumn
'textcol2.MappingName = dt.Columns(i).ColumnName
'textcol2.HeaderText = dt.Columns(i).ColumnName
'tableStyle.GridColumnStyles.Add(textcol2)
Dim ComboTextCol As New DataGridComboBoxColumn
ComboTextCol.MappingName = dt.Columns(i).ColumnName
ComboTextCol.HeaderText = dt.Columns(i).ColumnName
ComboTextCol.Width = 120
ComboTextCol.ColumnComboBox.Items.Clear()
ComboTextCol.ColumnComboBox.DataSource = permsList
ComboTextCol.ColumnComboBox.DisplayMember = "Display"
ComboTextCol.ColumnComboBox.ValueMember =
dt.Columns(i).ColumnName
' for the above line I have also tried setting it equal to "Id"

tableStyle.PreferredRowHeight =
ComboTextCol.ColumnComboBox.Height + 2

tableStyle.GridColumnStyles.Add(ComboTextCol)
Next

grdPermissions.TableStyles.Clear()
grdPermissions.TableStyles.Add(tableStyle)
grdPermissions.DataSource = dt
Dim grdStyle As DataGridTableStyle

'no adding of new rows thru dataview...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(grdPermissions.DataSource,
grdPermissions.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False


Nov 21 '05 #6
Ken
As you can see from my later post, we found the problem. I had tried
the single stepping that you suggested, but the error didn't show up in any
line of code I had written. My subroutines finished without errors, but the
error was thrown when the form tried to render. Apparently the lack of the
..DefaultView call caused some problem when the rendering occurred.

Thanks for the help.
Ron L

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I dont see any line of code with an error. What i would
suggest
is to place a break point in the start of each procedure in the
columnstyle.
Step through the code line by line until you find the error.

Ken
----------------
"Ron L" <ro**@bogus.Address.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Ken
Thanks for the response. I forgot to mention that this is the code
from
Ken Shepard's www.syncfusion.com site, the data grid bound combo box
column.

Here it is.

Ron L

' DataGridComboBoxColumn.vb - From George Shepard's www.syncfusion.com
site.
(The bound
' data grid combo box example.)
Option Strict Off
Option Explicit On

Imports Microsoft.VisualBasic
Imports System
Imports System.ComponentModel
Imports System.Data
Imports System.Data.Common
Imports System.Data.OleDb
Imports System.Drawing
Imports System.Windows.Forms

' Step 1. Derive a custom column style from DataGridTextBoxColumn
' a) add a ComboBox member
' b) track when the combobox has focus in Enter and Leave events
' c) override Edit to allow the ComboBox to replace the TextBox
' d) override Commit to save the changed data
Public Class DataGridComboBoxColumn
Inherits DataGridTextBoxColumn
Public ColumnComboBox As NoKeyUpCombo
Private _source As System.Windows.Forms.CurrencyManager
Private _rowNum As Integer
Private _isEditing As Boolean
Public Shared _RowCount As Integer
Public Sub New()
_source = Nothing
_isEditing = False
_RowCount = -1

ColumnComboBox = New NoKeyUpCombo()
ColumnComboBox.DropDownStyle = ComboBoxStyle.DropDownList

AddHandler ColumnComboBox.Leave, AddressOf LeaveComboBox
AddHandler ColumnComboBox.SelectionChangeCommitted, AddressOf
ComboStartEditing
End Sub 'New

Private Sub HandleScroll(ByVal sender As Object, ByVal e As
EventArgs)
If ColumnComboBox.Visible Then
ColumnComboBox.Hide()
End If
End Sub 'HandleScroll

Private Sub ComboStartEditing(ByVal sender As Object, ByVal e As
EventArgs)
_isEditing = True
MyBase.ColumnStartedEditing(sender)
End Sub 'ComboMadeCurrent
Private Sub LeaveComboBox(ByVal sender As Object, ByVal e As
EventArgs)
If _isEditing Then
SetColumnValueAtRow(_source, _rowNum, ColumnComboBox.Text)
_isEditing = False
Invalidate()

End If
ColumnComboBox.Hide()
AddHandler Me.DataGridTableStyle.DataGrid.Scroll, New
EventHandler(AddressOf HandleScroll)
End Sub 'LeaveComboBox
Protected Overloads Overrides Sub Edit(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal
bounds
As System.Drawing.Rectangle, ByVal [readOnly] As Boolean, ByVal
instantText
As String, ByVal cellIsVisible As Boolean)

MyBase.Edit([source], rowNum, bounds, [readOnly], instantText,
cellIsVisible)

_rowNum = rowNum
_source = [source]

ColumnComboBox.Parent = Me.TextBox.Parent
ColumnComboBox.Location = Me.TextBox.Location
ColumnComboBox.Size = New Size(Me.TextBox.Size.Width,
ColumnComboBox.Size.Height)
ColumnComboBox.SelectedIndex =
ColumnComboBox.FindStringExact(Me.TextBox.Text)
ColumnComboBox.Text = Me.TextBox.Text
Me.TextBox.Visible = False
ColumnComboBox.Visible = True
AddHandler Me.DataGridTableStyle.DataGrid.Scroll, AddressOf
HandleScroll

ColumnComboBox.BringToFront()
ColumnComboBox.Focus()
End Sub 'Edit
Protected Overrides Function Commit(ByVal dataSource As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer) As Boolean

If _isEditing Then
_isEditing = False
SetColumnValueAtRow(dataSource, rowNum,
ColumnComboBox.Text)
End If
Return True
End Function 'Commit
Protected Overrides Sub ConcedeFocus()
Console.WriteLine("ConcedeFocus")
MyBase.ConcedeFocus()
End Sub 'ConcedeFocus

Protected Overrides Function GetColumnValueAtRow(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer) As Object

Dim s As Object = MyBase.GetColumnValueAtRow([source], rowNum)
Dim dv As DataView = CType(Me.ColumnComboBox.DataSource,
DataView)
Dim rowCount As Integer = dv.Count
Dim i As Integer = 0
Dim s1 As Object

'if things are slow, you could order your dataview
'& use binary search instead of this linear one
While i < rowCount
s1 = dv(i)(Me.ColumnComboBox.ValueMember)
If (Not s1 Is DBNull.Value) AndAlso _
(Not s Is DBNull.Value) AndAlso _
s = s1 Then
Exit While
End If
i = i + 1
End While

If i < rowCount Then
Return dv(i)(Me.ColumnComboBox.DisplayMember)
End If
Return DBNull.Value
End Function 'GetColumnValueAtRow
Protected Overrides Sub SetColumnValueAtRow(ByVal [source] As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal value
As Object)
Dim s As Object = value

Dim dv As DataView = CType(Me.ColumnComboBox.DataSource,
DataView)
Dim rowCount As Integer = dv.Count
Dim i As Integer = 0
Dim s1 As Object

'if things are slow, you could order your dataview
'& use binary search instead of this linear one
While i < rowCount
s1 = dv(i)(Me.ColumnComboBox.DisplayMember)
If (Not s1 Is DBNull.Value) AndAlso _
s = s1 Then
Exit While
End If
i = i + 1
End While
If i < rowCount Then
s = dv(i)(Me.ColumnComboBox.ValueMember)
Else
s = DBNull.Value
End If
MyBase.SetColumnValueAtRow([source], rowNum, s)
End Sub 'SetColumnValueAtRow
End Class 'DataGridComboBoxColumn

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
Hi,

Post the code for the column style

Ken
----------------
"Ron L" <ro**@bogus.Address.com> wrote in message
news:uk*************@TK2MSFTNGP10.phx.gbl...
I have a dataset whose source is a SQL 2k stored procedure that I am
trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values
in
combo boxes in the grid and instead of displaying the numeric values,
have
the combo box display a string that corresponds to the numeric value
(i.e.
No Access for 0, Read for 1, Create for 3, and Edit for 7). I have
written
the code below to try to implement this, but it throws an error on
rendering. The error is:
An unhandled exception of type 'System.InvalidCastException'
occurred in system.windows.forms.dll
Additional information: Specified cast is not valid.
I suspect, but can't be sure, that the cast error has to do with the
binding
of the dataset to the pulldown. The column names that I am trying to
bind
to are "TSL", "HCT", and "MCT"

Can anyone tell me what I am doing wrong here?
TIA,
Ron L

The code:
' Setup the permissions grid
' Setup the list of Display/Value pairs for the combo
boxes
Dim permsList As DataTable
permsList = New DataTable
permsList.Columns.Add(New DataColumn("Display", GetType(String)))
permsList.Columns.Add(New DataColumn("Id", GetType(Integer)))
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows.Add(permsList.NewRow())
permsList.Rows(0)(0) = "No Access"
permsList.Rows(0)(1) = 0
permsList.Rows(1)(0) = "Read"
permsList.Rows(1)(1) = 1
permsList.Rows(2)(0) = "Create"
permsList.Rows(2)(1) = 3
permsList.Rows(3)(0) = "Edit"
permsList.Rows(3)(1) = 7

' Fill the DataTable from the user data dataset (includes user
permissions)
Dim dt As DataTable = dsUserData.Tables(0)

Dim tableStyle As New DataGridTableStyle
tableStyle.GridColumnStyles.Clear()
tableStyle.MappingName = "Table"
tableStyle.MappingName = dt.TableName.ToString

' Setup the Subsystems column
Dim TextCol As New DataGridTextBoxColumn
TextCol.MappingName = dt.Columns(15).ColumnName
TextCol.HeaderText = dt.Columns(15).ColumnName
tableStyle.GridColumnStyles.Add(TextCol)

' Setup the permissions columns

Dim i As Integer
For i = 2 To 4
'Dim textcol2 As New DataGridTextBoxColumn
'textcol2.MappingName = dt.Columns(i).ColumnName
'textcol2.HeaderText = dt.Columns(i).ColumnName
'tableStyle.GridColumnStyles.Add(textcol2)
Dim ComboTextCol As New DataGridComboBoxColumn
ComboTextCol.MappingName = dt.Columns(i).ColumnName
ComboTextCol.HeaderText = dt.Columns(i).ColumnName
ComboTextCol.Width = 120
ComboTextCol.ColumnComboBox.Items.Clear()
ComboTextCol.ColumnComboBox.DataSource = permsList
ComboTextCol.ColumnComboBox.DisplayMember = "Display"
ComboTextCol.ColumnComboBox.ValueMember =
dt.Columns(i).ColumnName
' for the above line I have also tried setting it equal to "Id"

tableStyle.PreferredRowHeight =
ComboTextCol.ColumnComboBox.Height + 2

tableStyle.GridColumnStyles.Add(ComboTextCol)
Next

grdPermissions.TableStyles.Clear()
grdPermissions.TableStyles.Add(tableStyle)
grdPermissions.DataSource = dt
Dim grdStyle As DataGridTableStyle

'no adding of new rows thru dataview...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(grdPermissions.DataSource,
grdPermissions.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False


Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
0
by: JL3574 l | last post by:
i have a datagrid with a combo box added in it's columns . the combobox pulls values from a database in it's dropdownlist fashion. my problem is that when i pick a select on the combo box it...
3
by: Doug | last post by:
Hi I have the following code (not mine) that populates a datagrid with some file names. But I want to replace the datagrid with a combo box. private void OnCurrentDataCellChanged(object sender,...
2
by: pmcguire | last post by:
I have derived a ComboBoxColumnStyle that inherits DataGridColumnStyle. It works fine except for one behavior. If the user selects a new value from the ComboBox's pulldown list on a brand new...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
3
by: simchajoy2000 | last post by:
Hi, I have been working with datagrids a lot in the past two weeks and I am running across a lot of problems. Maybe there is no way around these problems but I hope there are and someone out...
6
by: Doug Bell | last post by:
Hi I have a datagrid with a combo box, I need to populate the combo with data dependant on the record value. eg for record 1, field Warehouse = 2R so combo would allow selection of locations...
4
by: Jan Nielsen | last post by:
Hi all I'm a former Access developer who would like to implement a many-to-many relation in about the same way you do in Access: With a subform and a combo box. Is it possible to use a...
4
by: Melson | last post by:
Hi I've a problem. Can anyone help. I would like to use datagrid for data entry. How can I set the number of rows in the datagrid. And use the datagrid to update the ms sql table. regards...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.