473,569 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom DataGrid nightmare.

I am fairly new to VB.NET, and I am rewriting an application I wrote a while
back, also in VB.NET. I aplied some new things I learned. Anyway, here is my
problem.......

I have a custom DataGrid with a buttonRow that does a delete function for
me. Microsoft support helped me back then to get this done.

Here is part of the code that creates the dataGrid:

Dim ButtonColStyle As DataGridButtonC olumn
ButtonColStyle = New DataGridButtonC olumn(0) 'pass the column#
ButtonColStyle. MappingName = "ink"
ButtonColStyle. ReadOnly = True
ButtonColStyle. HeaderText = "Delete"
ButtonColStyle. Width = 30
' ts.GridColumnSt yles.Add(Button ColStyle)

When I uncomment the last line, the app crashes and does and I get this
error message:

An unhandled exception of type 'System.NullRef erenceException ' occurred in
system.windows. forms.dll

Additional information: Object reference not set to an instance of an
object.

Could you please help me out, maybe I just missed something easy.

Here is some more code in case it's needed.

AddHandler ButtonColStyle. CellButtonClick ed, AddressOf HandleCellButto nClick
AddHandler DG_punch.MouseU p, AddressOf ButtonColStyle. HandleMouseUp
DG_punch.TableS tyles.Add(ts)

Private Sub HandleCellButto nClick(ByVal sender As Object, ByVal e As
DataGridCellBut tonClickEventAr gs)
If MessageBox.Show ("Are you sure you want to delete?", "Delete
Confirm", MessageBoxButto ns.OKCancel, MessageBoxIcon. Warning) =
DialogResult.OK Then
If e.RowIndex < DS1.Tables(0).R ows.Count Then
Dim myCurrencyManag er As CurrencyManager =
CType(BindingCo ntext(DG_punch. DataSource, DG_punch.DataMe mber),
CurrencyManager )
myCurrencyManag er.RemoveAt(e.R owIndex)
End If
If e.RowIndex < DS1.Tables(0).R ows.Count Then
DS1.Tables(0).R ows(e.RowIndex) .Delete()
End If
OleDb_Punch.Upd ate(DS1)
End If
End Sub
Here is the code of the page that microsoft gave me.......

Option Strict Off
Option Explicit On

Imports Microsoft.Visua lBasic
Imports System
Imports System.Drawing
Imports System.Windows. Forms

Public Class DataGridButtonC olumn
Inherits DataGridTextBox Column
Public Event CellButtonClick ed As DataGridCellBut tonClickEventHa ndler

Private _columnNum As Integer
Private _buttonFace As Bitmap

Public Sub New(ByVal colNum As Integer)
_columnNum = colNum
Try
_buttonFace = New Bitmap(Applicat ion.StartupPath & "\trash.gif ")
Catch
End Try
End Sub 'New

Protected Overloads Overrides Sub Edit(ByVal [source] As
System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer, ByVal bounds
As System.Drawing. Rectangle, ByVal [readOnly] As Boolean, ByVal instantText
As String, ByVal cellIsVisible As Boolean)
End Sub 'Edit

Private Sub DrawButton(ByVa l g As Graphics, ByVal bm As Bitmap, ByVal
bounds As Rectangle, ByVal row As Integer)

Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid

g.DrawImage(bm, bounds, 0, 0, bm.Width, bm.Height,
GraphicsUnit.Pi xel)

End Sub

Public Sub HandleMouseUp(B yVal sender As Object, ByVal e As
MouseEventArgs)
Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid
Dim hti As DataGrid.HitTes tInfo = dg.HitTest(New Point(e.X, e.Y))
Dim isClickInCell As Boolean = (hti.Column = Me._columnNum And
hti.Row > -1)

If Not isClickInCell Then Return
Dim rect As New Rectangle(0, 0, 0, 0)

rect = dg.GetCellBound s(hti.Row, hti.Column)
Dim g As Graphics = Graphics.FromHw nd(dg.Handle)
DrawButton(g, Me._buttonFace, rect, hti.Row)
g.Dispose()
RaiseEvent CellButtonClick ed(Me, New
DataGridCellBut tonClickEventAr gs(hti.Row, hti.Column))
End Sub 'HandleMouseUp

Protected Overloads Overrides Sub Paint(ByVal g As
System.Drawing. Graphics, ByVal bounds As System.Drawing. Rectangle, ByVal
[source] As System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer,
ByVal backBrush As System.Drawing. Brush, ByVal foreBrush As
System.Drawing. Brush, ByVal alignToRight As Boolean)
Dim parent As DataGrid = Me.DataGridTabl eStyle.DataGrid
Dim BackColor As Color
BackColor = parent.Alternat ingBackColor

'clear the cell
g.FillRectangle (New SolidBrush(Back Color), bounds)

'draw the value
Dim s As String = Me.GetColumnVal ueAtRow([source],
rowNum).ToStrin g() 'parent[rowNum, 0].ToString() +
((parent[rowNum, 1].ToString())+ " ").Substring(0, 2);
DrawButton(g, _buttonFace, bounds, rowNum)
End Sub 'Paint 'font.Dispose() ;
End Class 'DataGridButton Column

Public Delegate Sub DataGridCellBut tonClickEventHa ndler(ByVal sender As
Object, ByVal e As DataGridCellBut tonClickEventAr gs)

Public Class DataGridCellBut tonClickEventAr gs
Inherits EventArgs
Private _row As Integer
Private _col As Integer
Public Sub New(ByVal row As Integer, ByVal col As Integer)
_row = row
_col = col
End Sub 'New
Public ReadOnly Property RowIndex() As Integer
Get
Return _row
End Get
End Property

Public ReadOnly Property ColIndex() As Integer
Get
Return _col
End Get
End Property
End Class
Nov 20 '05 #1
4 1818
Hi,

Do you have a line like Dim ts as new DatagridTableSt yle ?

Ken
------------------
"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:OB******** ******@tk2msftn gp13.phx.gbl...
I am fairly new to VB.NET, and I am rewriting an application I wrote a
while
back, also in VB.NET. I aplied some new things I learned. Anyway, here is
my
problem.......

I have a custom DataGrid with a buttonRow that does a delete function for
me. Microsoft support helped me back then to get this done.

Here is part of the code that creates the dataGrid:

Dim ButtonColStyle As DataGridButtonC olumn
ButtonColStyle = New DataGridButtonC olumn(0) 'pass the column#
ButtonColStyle. MappingName = "ink"
ButtonColStyle. ReadOnly = True
ButtonColStyle. HeaderText = "Delete"
ButtonColStyle. Width = 30
' ts.GridColumnSt yles.Add(Button ColStyle)

When I uncomment the last line, the app crashes and does and I get this
error message:

An unhandled exception of type 'System.NullRef erenceException ' occurred in
system.windows. forms.dll

Additional information: Object reference not set to an instance of an
object.

Could you please help me out, maybe I just missed something easy.

Here is some more code in case it's needed.

AddHandler ButtonColStyle. CellButtonClick ed, AddressOf
HandleCellButto nClick
AddHandler DG_punch.MouseU p, AddressOf ButtonColStyle. HandleMouseUp
DG_punch.TableS tyles.Add(ts)

Private Sub HandleCellButto nClick(ByVal sender As Object, ByVal e As
DataGridCellBut tonClickEventAr gs)
If MessageBox.Show ("Are you sure you want to delete?", "Delete
Confirm", MessageBoxButto ns.OKCancel, MessageBoxIcon. Warning) =
DialogResult.OK Then
If e.RowIndex < DS1.Tables(0).R ows.Count Then
Dim myCurrencyManag er As CurrencyManager =
CType(BindingCo ntext(DG_punch. DataSource, DG_punch.DataMe mber),
CurrencyManager )
myCurrencyManag er.RemoveAt(e.R owIndex)
End If
If e.RowIndex < DS1.Tables(0).R ows.Count Then
DS1.Tables(0).R ows(e.RowIndex) .Delete()
End If
OleDb_Punch.Upd ate(DS1)
End If
End Sub
Here is the code of the page that microsoft gave me.......

Option Strict Off
Option Explicit On

Imports Microsoft.Visua lBasic
Imports System
Imports System.Drawing
Imports System.Windows. Forms

Public Class DataGridButtonC olumn
Inherits DataGridTextBox Column
Public Event CellButtonClick ed As DataGridCellBut tonClickEventHa ndler

Private _columnNum As Integer
Private _buttonFace As Bitmap

Public Sub New(ByVal colNum As Integer)
_columnNum = colNum
Try
_buttonFace = New Bitmap(Applicat ion.StartupPath &
"\trash.gif ")
Catch
End Try
End Sub 'New

Protected Overloads Overrides Sub Edit(ByVal [source] As
System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer, ByVal
bounds
As System.Drawing. Rectangle, ByVal [readOnly] As Boolean, ByVal
instantText
As String, ByVal cellIsVisible As Boolean)
End Sub 'Edit

Private Sub DrawButton(ByVa l g As Graphics, ByVal bm As Bitmap, ByVal
bounds As Rectangle, ByVal row As Integer)

Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid

g.DrawImage(bm, bounds, 0, 0, bm.Width, bm.Height,
GraphicsUnit.Pi xel)

End Sub

Public Sub HandleMouseUp(B yVal sender As Object, ByVal e As
MouseEventArgs)
Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid
Dim hti As DataGrid.HitTes tInfo = dg.HitTest(New Point(e.X, e.Y))
Dim isClickInCell As Boolean = (hti.Column = Me._columnNum And
hti.Row > -1)

If Not isClickInCell Then Return
Dim rect As New Rectangle(0, 0, 0, 0)

rect = dg.GetCellBound s(hti.Row, hti.Column)
Dim g As Graphics = Graphics.FromHw nd(dg.Handle)
DrawButton(g, Me._buttonFace, rect, hti.Row)
g.Dispose()
RaiseEvent CellButtonClick ed(Me, New
DataGridCellBut tonClickEventAr gs(hti.Row, hti.Column))
End Sub 'HandleMouseUp

Protected Overloads Overrides Sub Paint(ByVal g As
System.Drawing. Graphics, ByVal bounds As System.Drawing. Rectangle, ByVal
[source] As System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer,
ByVal backBrush As System.Drawing. Brush, ByVal foreBrush As
System.Drawing. Brush, ByVal alignToRight As Boolean)
Dim parent As DataGrid = Me.DataGridTabl eStyle.DataGrid
Dim BackColor As Color
BackColor = parent.Alternat ingBackColor

'clear the cell
g.FillRectangle (New SolidBrush(Back Color), bounds)

'draw the value
Dim s As String = Me.GetColumnVal ueAtRow([source],
rowNum).ToStrin g() 'parent[rowNum, 0].ToString() +
((parent[rowNum, 1].ToString())+ " ").Substring(0, 2);
DrawButton(g, _buttonFace, bounds, rowNum)
End Sub 'Paint 'font.Dispose() ;
End Class 'DataGridButton Column

Public Delegate Sub DataGridCellBut tonClickEventHa ndler(ByVal sender As
Object, ByVal e As DataGridCellBut tonClickEventAr gs)

Public Class DataGridCellBut tonClickEventAr gs
Inherits EventArgs
Private _row As Integer
Private _col As Integer
Public Sub New(ByVal row As Integer, ByVal col As Integer)
_row = row
_col = col
End Sub 'New
Public ReadOnly Property RowIndex() As Integer
Get
Return _row
End Get
End Property

Public ReadOnly Property ColIndex() As Integer
Get
Return _col
End Get
End Property
End Class

Nov 20 '05 #2
No, I didn't. I had Dim ts As DataGridTableSt yle, but I added new, and I
still got the same problem. Here is the whole datagridcode.
Thank you for looking into this.
AddHandler mycombo2.TextCh anged, AddressOf Ctrls_TextChang ed2
'OleDb_punch.Fi ll(Ds1)
DG_punch.Contro ls.Add(mycombo2 )
'------dg_punch TABLESTYLE----------------------
Dim ts As New DataGridTableSt yle
DG_punch.DataSo urce = DS1
DG_punch.DataMe mber = "main"
ts = New DataGridTableSt yle
ts.MappingName = "main"
ts.PreferredRow Height = 35
ts.AlternatingB ackColor = System.Drawing. Color.FromArgb( CType(252,
Byte), CType(253, Byte), CType(206, Byte))
ts.HeaderBackCo lor = System.Drawing. Color.Navy
ts.HeaderForeCo lor = System.Drawing. Color.White
'-------dg_punch COLUMNSTYLES----------------------

Dim ButtonColStyle As DataGridButtonC olumn
ButtonColStyle = New DataGridButtonC olumn(0) 'pass the column#
ButtonColStyle. MappingName = "ink"
ButtonColStyle. ReadOnly = True
ButtonColStyle. HeaderText = "Delete"
ButtonColStyle. Width = 30
ts.GridColumnSt yles.Add(Button ColStyle)

Dim tb1a As DataGridTextBox Column
tb1a = New DataGridTextBox Column
' tb1a.HeaderText = ""
tb1a.MappingNam e = "id"
tb1a.NullText = ""
tb1a.Width = 0
ts.GridColumnSt yles.Add(tb1a)

Dim tb1 As DataGridTextBox Column
tb1 = New DataGridTextBox Column
tb1.HeaderText = "Opened"
tb1.MappingName = "misc"
tb1.NullText = ""
tb1.Format = "MM/dd/yy"
tb1.Width = 75
tb1.ReadOnly = True
ts.GridColumnSt yles.Add(tb1)
Dim tb2 As DataGridTextBox Column
tb2 = New DataGridTextBox Column
tb2.HeaderText = "Item"
tb2.MappingName = "itemno"
tb2.NullText = ""
tb2.Width = 45
tb2.ReadOnly = True
ts.GridColumnSt yles.Add(tb2)

Dim tb3 As DataGridTextBox Column
tb3 = New DataGridTextBox Column
tb3.HeaderText = "Room"
tb3.MappingName = "room_desc"
tb3.NullText = ""
tb3.Width = 120
tb3.ReadOnly = True
ts.GridColumnSt yles.Add(tb3)

Dim tb4 As DataGridTextBox ColumnWrap
tb4 = New DataGridTextBox ColumnWrap
tb4.HeaderText = "Item Description"
tb4.MappingName = "text"
tb4.NullText = ""
tb4.Width = 140
tb4.ReadOnly = True
ts.GridColumnSt yles.Add(tb4)

Dim tb5 As DataGridTextBox Column
tb5 = New DataGridTextBox Column
tb5.HeaderText = "Prob"
tb5.MappingName = "problem_ab br"
tb5.NullText = ""
tb5.Width = 50
tb5.ReadOnly = True
ts.GridColumnSt yles.Add(tb5)

Dim tb6 As DataGridTextBox Column
tb6 = New DataGridTextBox Column
tb6.HeaderText = "Resp."
tb6.MappingName = "resp_abbr"
tb6.NullText = ""
tb6.Width = 50
tb6.ReadOnly = True
ts.GridColumnSt yles.Add(tb6)

Dim tb7 As DataGridTextBox Column
tb7 = New DataGridTextBox Column
tb7.HeaderText = "status"
tb7.MappingName = "status"
tb7.NullText = ""
tb7.Width = 70
tb7.ReadOnly = True
ts.GridColumnSt yles.Add(tb7)

Dim tb8 As DataGridTextBox Column
tb8 = New DataGridTextBox Column
tb8.HeaderText = "Closed"
tb8.MappingName = "date_close d"
tb8.Format = "MM/dd/yy"
tb8.NullText = ""
tb8.Width = 75
tb8.ReadOnly = True
ts.GridColumnSt yles.Add(tb8)

AddHandler ButtonColStyle. CellButtonClick ed, AddressOf
HandleCellButto nClick
AddHandler DG_punch.MouseU p, AddressOf ButtonColStyle. HandleMouseUp
DG_punch.TableS tyles.Add(ts)
'----------END TABLESTYLES

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

Do you have a line like Dim ts as new DatagridTableSt yle ?

Ken
------------------
"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:OB******** ******@tk2msftn gp13.phx.gbl...
I am fairly new to VB.NET, and I am rewriting an application I wrote a
while
back, also in VB.NET. I aplied some new things I learned. Anyway, here is my
problem.......

I have a custom DataGrid with a buttonRow that does a delete function for me. Microsoft support helped me back then to get this done.

Here is part of the code that creates the dataGrid:

Dim ButtonColStyle As DataGridButtonC olumn
ButtonColStyle = New DataGridButtonC olumn(0) 'pass the column#
ButtonColStyle. MappingName = "ink"
ButtonColStyle. ReadOnly = True
ButtonColStyle. HeaderText = "Delete"
ButtonColStyle. Width = 30
' ts.GridColumnSt yles.Add(Button ColStyle)

When I uncomment the last line, the app crashes and does and I get this
error message:

An unhandled exception of type 'System.NullRef erenceException ' occurred in system.windows. forms.dll

Additional information: Object reference not set to an instance of an
object.

Could you please help me out, maybe I just missed something easy.

Here is some more code in case it's needed.

AddHandler ButtonColStyle. CellButtonClick ed, AddressOf
HandleCellButto nClick
AddHandler DG_punch.MouseU p, AddressOf ButtonColStyle. HandleMouseUp DG_punch.TableS tyles.Add(ts)

Private Sub HandleCellButto nClick(ByVal sender As Object, ByVal e As
DataGridCellBut tonClickEventAr gs)
If MessageBox.Show ("Are you sure you want to delete?", "Delete
Confirm", MessageBoxButto ns.OKCancel, MessageBoxIcon. Warning) =
DialogResult.OK Then
If e.RowIndex < DS1.Tables(0).R ows.Count Then
Dim myCurrencyManag er As CurrencyManager =
CType(BindingCo ntext(DG_punch. DataSource, DG_punch.DataMe mber),
CurrencyManager )
myCurrencyManag er.RemoveAt(e.R owIndex)
End If
If e.RowIndex < DS1.Tables(0).R ows.Count Then
DS1.Tables(0).R ows(e.RowIndex) .Delete()
End If
OleDb_Punch.Upd ate(DS1)
End If
End Sub
Here is the code of the page that microsoft gave me.......

Option Strict Off
Option Explicit On

Imports Microsoft.Visua lBasic
Imports System
Imports System.Drawing
Imports System.Windows. Forms

Public Class DataGridButtonC olumn
Inherits DataGridTextBox Column
Public Event CellButtonClick ed As DataGridCellBut tonClickEventHa ndler

Private _columnNum As Integer
Private _buttonFace As Bitmap

Public Sub New(ByVal colNum As Integer)
_columnNum = colNum
Try
_buttonFace = New Bitmap(Applicat ion.StartupPath &
"\trash.gif ")
Catch
End Try
End Sub 'New

Protected Overloads Overrides Sub Edit(ByVal [source] As
System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer, ByVal
bounds
As System.Drawing. Rectangle, ByVal [readOnly] As Boolean, ByVal
instantText
As String, ByVal cellIsVisible As Boolean)
End Sub 'Edit

Private Sub DrawButton(ByVa l g As Graphics, ByVal bm As Bitmap, ByVal
bounds As Rectangle, ByVal row As Integer)

Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid

g.DrawImage(bm, bounds, 0, 0, bm.Width, bm.Height,
GraphicsUnit.Pi xel)

End Sub

Public Sub HandleMouseUp(B yVal sender As Object, ByVal e As
MouseEventArgs)
Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid
Dim hti As DataGrid.HitTes tInfo = dg.HitTest(New Point(e.X, e.Y))
Dim isClickInCell As Boolean = (hti.Column = Me._columnNum And
hti.Row > -1)

If Not isClickInCell Then Return
Dim rect As New Rectangle(0, 0, 0, 0)

rect = dg.GetCellBound s(hti.Row, hti.Column)
Dim g As Graphics = Graphics.FromHw nd(dg.Handle)
DrawButton(g, Me._buttonFace, rect, hti.Row)
g.Dispose()
RaiseEvent CellButtonClick ed(Me, New
DataGridCellBut tonClickEventAr gs(hti.Row, hti.Column))
End Sub 'HandleMouseUp

Protected Overloads Overrides Sub Paint(ByVal g As
System.Drawing. Graphics, ByVal bounds As System.Drawing. Rectangle, ByVal
[source] As System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer, ByVal backBrush As System.Drawing. Brush, ByVal foreBrush As
System.Drawing. Brush, ByVal alignToRight As Boolean)
Dim parent As DataGrid = Me.DataGridTabl eStyle.DataGrid
Dim BackColor As Color
BackColor = parent.Alternat ingBackColor

'clear the cell
g.FillRectangle (New SolidBrush(Back Color), bounds)

'draw the value
Dim s As String = Me.GetColumnVal ueAtRow([source],
rowNum).ToStrin g() 'parent[rowNum, 0].ToString() +
((parent[rowNum, 1].ToString())+ " ").Substring(0, 2);
DrawButton(g, _buttonFace, bounds, rowNum)
End Sub 'Paint 'font.Dispose() ;
End Class 'DataGridButton Column

Public Delegate Sub DataGridCellBut tonClickEventHa ndler(ByVal sender As
Object, ByVal e As DataGridCellBut tonClickEventAr gs)

Public Class DataGridCellBut tonClickEventAr gs
Inherits EventArgs
Private _row As Integer
Private _col As Integer
Public Sub New(ByVal row As Integer, ByVal col As Integer)
_row = row
_col = col
End Sub 'New
Public ReadOnly Property RowIndex() As Integer
Get
Return _row
End Get
End Property

Public ReadOnly Property ColIndex() As Integer
Get
Return _col
End Get
End Property
End Class


Nov 20 '05 #3
Hi,

Make sure trash.gif is in the bin directory of your projects folder.

Ken
--------------
"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
No, I didn't. I had Dim ts As DataGridTableSt yle, but I added new, and I
still got the same problem. Here is the whole datagridcode.
Thank you for looking into this.
AddHandler mycombo2.TextCh anged, AddressOf Ctrls_TextChang ed2
'OleDb_punch.Fi ll(Ds1)
DG_punch.Contro ls.Add(mycombo2 )
'------dg_punch TABLESTYLE----------------------
Dim ts As New DataGridTableSt yle
DG_punch.DataSo urce = DS1
DG_punch.DataMe mber = "main"
ts = New DataGridTableSt yle
ts.MappingName = "main"
ts.PreferredRow Height = 35
ts.AlternatingB ackColor = System.Drawing. Color.FromArgb( CType(252,
Byte), CType(253, Byte), CType(206, Byte))
ts.HeaderBackCo lor = System.Drawing. Color.Navy
ts.HeaderForeCo lor = System.Drawing. Color.White
'-------dg_punch COLUMNSTYLES----------------------

Dim ButtonColStyle As DataGridButtonC olumn
ButtonColStyle = New DataGridButtonC olumn(0) 'pass the column#
ButtonColStyle. MappingName = "ink"
ButtonColStyle. ReadOnly = True
ButtonColStyle. HeaderText = "Delete"
ButtonColStyle. Width = 30
ts.GridColumnSt yles.Add(Button ColStyle)

Dim tb1a As DataGridTextBox Column
tb1a = New DataGridTextBox Column
' tb1a.HeaderText = ""
tb1a.MappingNam e = "id"
tb1a.NullText = ""
tb1a.Width = 0
ts.GridColumnSt yles.Add(tb1a)

Dim tb1 As DataGridTextBox Column
tb1 = New DataGridTextBox Column
tb1.HeaderText = "Opened"
tb1.MappingName = "misc"
tb1.NullText = ""
tb1.Format = "MM/dd/yy"
tb1.Width = 75
tb1.ReadOnly = True
ts.GridColumnSt yles.Add(tb1)
Dim tb2 As DataGridTextBox Column
tb2 = New DataGridTextBox Column
tb2.HeaderText = "Item"
tb2.MappingName = "itemno"
tb2.NullText = ""
tb2.Width = 45
tb2.ReadOnly = True
ts.GridColumnSt yles.Add(tb2)

Dim tb3 As DataGridTextBox Column
tb3 = New DataGridTextBox Column
tb3.HeaderText = "Room"
tb3.MappingName = "room_desc"
tb3.NullText = ""
tb3.Width = 120
tb3.ReadOnly = True
ts.GridColumnSt yles.Add(tb3)

Dim tb4 As DataGridTextBox ColumnWrap
tb4 = New DataGridTextBox ColumnWrap
tb4.HeaderText = "Item Description"
tb4.MappingName = "text"
tb4.NullText = ""
tb4.Width = 140
tb4.ReadOnly = True
ts.GridColumnSt yles.Add(tb4)

Dim tb5 As DataGridTextBox Column
tb5 = New DataGridTextBox Column
tb5.HeaderText = "Prob"
tb5.MappingName = "problem_ab br"
tb5.NullText = ""
tb5.Width = 50
tb5.ReadOnly = True
ts.GridColumnSt yles.Add(tb5)

Dim tb6 As DataGridTextBox Column
tb6 = New DataGridTextBox Column
tb6.HeaderText = "Resp."
tb6.MappingName = "resp_abbr"
tb6.NullText = ""
tb6.Width = 50
tb6.ReadOnly = True
ts.GridColumnSt yles.Add(tb6)

Dim tb7 As DataGridTextBox Column
tb7 = New DataGridTextBox Column
tb7.HeaderText = "status"
tb7.MappingName = "status"
tb7.NullText = ""
tb7.Width = 70
tb7.ReadOnly = True
ts.GridColumnSt yles.Add(tb7)

Dim tb8 As DataGridTextBox Column
tb8 = New DataGridTextBox Column
tb8.HeaderText = "Closed"
tb8.MappingName = "date_close d"
tb8.Format = "MM/dd/yy"
tb8.NullText = ""
tb8.Width = 75
tb8.ReadOnly = True
ts.GridColumnSt yles.Add(tb8)

AddHandler ButtonColStyle. CellButtonClick ed, AddressOf
HandleCellButto nClick
AddHandler DG_punch.MouseU p, AddressOf ButtonColStyle. HandleMouseUp
DG_punch.TableS tyles.Add(ts)
'----------END TABLESTYLES

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

Do you have a line like Dim ts as new DatagridTableSt yle ?

Ken
------------------
"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:OB******** ******@tk2msftn gp13.phx.gbl...
>I am fairly new to VB.NET, and I am rewriting an application I wrote a
>while
> back, also in VB.NET. I aplied some new things I learned. Anyway, here is > my
> problem.......
>
> I have a custom DataGrid with a buttonRow that does a delete function for > me. Microsoft support helped me back then to get this done.
>
> Here is part of the code that creates the dataGrid:
>
> Dim ButtonColStyle As DataGridButtonC olumn
> ButtonColStyle = New DataGridButtonC olumn(0) 'pass the column#
> ButtonColStyle. MappingName = "ink"
> ButtonColStyle. ReadOnly = True
> ButtonColStyle. HeaderText = "Delete"
> ButtonColStyle. Width = 30
> ' ts.GridColumnSt yles.Add(Button ColStyle)
>
> When I uncomment the last line, the app crashes and does and I get this
> error message:
>
> An unhandled exception of type 'System.NullRef erenceException ' occurred in > system.windows. forms.dll
>
> Additional information: Object reference not set to an instance of an
> object.
>
> Could you please help me out, maybe I just missed something easy.
>
> Here is some more code in case it's needed.
>
> AddHandler ButtonColStyle. CellButtonClick ed, AddressOf
> HandleCellButto nClick
> AddHandler DG_punch.MouseU p, AddressOf ButtonColStyle. HandleMouseUp > DG_punch.TableS tyles.Add(ts)
>
> Private Sub HandleCellButto nClick(ByVal sender As Object, ByVal e As
> DataGridCellBut tonClickEventAr gs)
> If MessageBox.Show ("Are you sure you want to delete?", "Delete
> Confirm", MessageBoxButto ns.OKCancel, MessageBoxIcon. Warning) =
> DialogResult.OK Then
> If e.RowIndex < DS1.Tables(0).R ows.Count Then
> Dim myCurrencyManag er As CurrencyManager =
> CType(BindingCo ntext(DG_punch. DataSource, DG_punch.DataMe mber),
> CurrencyManager )
> myCurrencyManag er.RemoveAt(e.R owIndex)
> End If
> If e.RowIndex < DS1.Tables(0).R ows.Count Then
> DS1.Tables(0).R ows(e.RowIndex) .Delete()
> End If
> OleDb_Punch.Upd ate(DS1)
> End If
> End Sub
>
>
> Here is the code of the page that microsoft gave me.......
>
> Option Strict Off
> Option Explicit On
>
> Imports Microsoft.Visua lBasic
> Imports System
> Imports System.Drawing
> Imports System.Windows. Forms
>
> Public Class DataGridButtonC olumn
> Inherits DataGridTextBox Column
> Public Event CellButtonClick ed As
> DataGridCellBut tonClickEventHa ndler
>
> Private _columnNum As Integer
> Private _buttonFace As Bitmap
>
> Public Sub New(ByVal colNum As Integer)
> _columnNum = colNum
> Try
> _buttonFace = New Bitmap(Applicat ion.StartupPath &
> "\trash.gif ")
> Catch
> End Try
> End Sub 'New
>
> Protected Overloads Overrides Sub Edit(ByVal [source] As
> System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer, ByVal
> bounds
> As System.Drawing. Rectangle, ByVal [readOnly] As Boolean, ByVal
> instantText
> As String, ByVal cellIsVisible As Boolean)
> End Sub 'Edit
>
> Private Sub DrawButton(ByVa l g As Graphics, ByVal bm As Bitmap,
> ByVal
> bounds As Rectangle, ByVal row As Integer)
>
> Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid
>
> g.DrawImage(bm, bounds, 0, 0, bm.Width, bm.Height,
> GraphicsUnit.Pi xel)
>
> End Sub
>
> Public Sub HandleMouseUp(B yVal sender As Object, ByVal e As
> MouseEventArgs)
> Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid
> Dim hti As DataGrid.HitTes tInfo = dg.HitTest(New Point(e.X,
> e.Y))
> Dim isClickInCell As Boolean = (hti.Column = Me._columnNum And
> hti.Row > -1)
>
> If Not isClickInCell Then Return
> Dim rect As New Rectangle(0, 0, 0, 0)
>
> rect = dg.GetCellBound s(hti.Row, hti.Column)
> Dim g As Graphics = Graphics.FromHw nd(dg.Handle)
> DrawButton(g, Me._buttonFace, rect, hti.Row)
> g.Dispose()
> RaiseEvent CellButtonClick ed(Me, New
> DataGridCellBut tonClickEventAr gs(hti.Row, hti.Column))
> End Sub 'HandleMouseUp
>
> Protected Overloads Overrides Sub Paint(ByVal g As
> System.Drawing. Graphics, ByVal bounds As System.Drawing. Rectangle,
> ByVal
> [source] As System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer, > ByVal backBrush As System.Drawing. Brush, ByVal foreBrush As
> System.Drawing. Brush, ByVal alignToRight As Boolean)
> Dim parent As DataGrid = Me.DataGridTabl eStyle.DataGrid
> Dim BackColor As Color
> BackColor = parent.Alternat ingBackColor
>
> 'clear the cell
> g.FillRectangle (New SolidBrush(Back Color), bounds)
>
> 'draw the value
> Dim s As String = Me.GetColumnVal ueAtRow([source],
> rowNum).ToStrin g() 'parent[rowNum, 0].ToString() +
> ((parent[rowNum, 1].ToString())+ " ").Substring(0, 2);
> DrawButton(g, _buttonFace, bounds, rowNum)
> End Sub 'Paint 'font.Dispose() ;
> End Class 'DataGridButton Column
>
> Public Delegate Sub DataGridCellBut tonClickEventHa ndler(ByVal sender As
> Object, ByVal e As DataGridCellBut tonClickEventAr gs)
>
> Public Class DataGridCellBut tonClickEventAr gs
> Inherits EventArgs
> Private _row As Integer
> Private _col As Integer
>
>
> Public Sub New(ByVal row As Integer, ByVal col As Integer)
> _row = row
> _col = col
> End Sub 'New
>
>
> Public ReadOnly Property RowIndex() As Integer
> Get
> Return _row
> End Get
> End Property
>
> Public ReadOnly Property ColIndex() As Integer
> Get
> Return _col
> End Get
> End Property
> End Class
>
>



Nov 20 '05 #4
Thank You, Thank You, Thank You! It's works great now!

I can not believe that this could cause a crash. For 3 days I have been
trying everything.
You rule!
Steve

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:eS******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi,

Make sure trash.gif is in the bin directory of your projects folder.
Ken
--------------
"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
No, I didn't. I had Dim ts As DataGridTableSt yle, but I added new, and I still got the same problem. Here is the whole datagridcode.
Thank you for looking into this.
AddHandler mycombo2.TextCh anged, AddressOf Ctrls_TextChang ed2
'OleDb_punch.Fi ll(Ds1)
DG_punch.Contro ls.Add(mycombo2 )
'------dg_punch TABLESTYLE----------------------
Dim ts As New DataGridTableSt yle
DG_punch.DataSo urce = DS1
DG_punch.DataMe mber = "main"
ts = New DataGridTableSt yle
ts.MappingName = "main"
ts.PreferredRow Height = 35
ts.AlternatingB ackColor = System.Drawing. Color.FromArgb( CType(252, Byte), CType(253, Byte), CType(206, Byte))
ts.HeaderBackCo lor = System.Drawing. Color.Navy
ts.HeaderForeCo lor = System.Drawing. Color.White
'-------dg_punch COLUMNSTYLES----------------------

Dim ButtonColStyle As DataGridButtonC olumn
ButtonColStyle = New DataGridButtonC olumn(0) 'pass the column#
ButtonColStyle. MappingName = "ink"
ButtonColStyle. ReadOnly = True
ButtonColStyle. HeaderText = "Delete"
ButtonColStyle. Width = 30
ts.GridColumnSt yles.Add(Button ColStyle)

Dim tb1a As DataGridTextBox Column
tb1a = New DataGridTextBox Column
' tb1a.HeaderText = ""
tb1a.MappingNam e = "id"
tb1a.NullText = ""
tb1a.Width = 0
ts.GridColumnSt yles.Add(tb1a)

Dim tb1 As DataGridTextBox Column
tb1 = New DataGridTextBox Column
tb1.HeaderText = "Opened"
tb1.MappingName = "misc"
tb1.NullText = ""
tb1.Format = "MM/dd/yy"
tb1.Width = 75
tb1.ReadOnly = True
ts.GridColumnSt yles.Add(tb1)
Dim tb2 As DataGridTextBox Column
tb2 = New DataGridTextBox Column
tb2.HeaderText = "Item"
tb2.MappingName = "itemno"
tb2.NullText = ""
tb2.Width = 45
tb2.ReadOnly = True
ts.GridColumnSt yles.Add(tb2)

Dim tb3 As DataGridTextBox Column
tb3 = New DataGridTextBox Column
tb3.HeaderText = "Room"
tb3.MappingName = "room_desc"
tb3.NullText = ""
tb3.Width = 120
tb3.ReadOnly = True
ts.GridColumnSt yles.Add(tb3)

Dim tb4 As DataGridTextBox ColumnWrap
tb4 = New DataGridTextBox ColumnWrap
tb4.HeaderText = "Item Description"
tb4.MappingName = "text"
tb4.NullText = ""
tb4.Width = 140
tb4.ReadOnly = True
ts.GridColumnSt yles.Add(tb4)

Dim tb5 As DataGridTextBox Column
tb5 = New DataGridTextBox Column
tb5.HeaderText = "Prob"
tb5.MappingName = "problem_ab br"
tb5.NullText = ""
tb5.Width = 50
tb5.ReadOnly = True
ts.GridColumnSt yles.Add(tb5)

Dim tb6 As DataGridTextBox Column
tb6 = New DataGridTextBox Column
tb6.HeaderText = "Resp."
tb6.MappingName = "resp_abbr"
tb6.NullText = ""
tb6.Width = 50
tb6.ReadOnly = True
ts.GridColumnSt yles.Add(tb6)

Dim tb7 As DataGridTextBox Column
tb7 = New DataGridTextBox Column
tb7.HeaderText = "status"
tb7.MappingName = "status"
tb7.NullText = ""
tb7.Width = 70
tb7.ReadOnly = True
ts.GridColumnSt yles.Add(tb7)

Dim tb8 As DataGridTextBox Column
tb8 = New DataGridTextBox Column
tb8.HeaderText = "Closed"
tb8.MappingName = "date_close d"
tb8.Format = "MM/dd/yy"
tb8.NullText = ""
tb8.Width = 75
tb8.ReadOnly = True
ts.GridColumnSt yles.Add(tb8)

AddHandler ButtonColStyle. CellButtonClick ed, AddressOf
HandleCellButto nClick
AddHandler DG_punch.MouseU p, AddressOf ButtonColStyle. HandleMouseUp DG_punch.TableS tyles.Add(ts)
'----------END TABLESTYLES

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

Do you have a line like Dim ts as new DatagridTableSt yle ?

Ken
------------------
"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:OB******** ******@tk2msftn gp13.phx.gbl...
>I am fairly new to VB.NET, and I am rewriting an application I wrote a
>while
> back, also in VB.NET. I aplied some new things I learned. Anyway, here
is
> my
> problem.......
>
> I have a custom DataGrid with a buttonRow that does a delete function

for
> me. Microsoft support helped me back then to get this done.
>
> Here is part of the code that creates the dataGrid:
>
> Dim ButtonColStyle As DataGridButtonC olumn
> ButtonColStyle = New DataGridButtonC olumn(0) 'pass the
column# > ButtonColStyle. MappingName = "ink"
> ButtonColStyle. ReadOnly = True
> ButtonColStyle. HeaderText = "Delete"
> ButtonColStyle. Width = 30
> ' ts.GridColumnSt yles.Add(Button ColStyle)
>
> When I uncomment the last line, the app crashes and does and I get this > error message:
>
> An unhandled exception of type 'System.NullRef erenceException ' occurred in
> system.windows. forms.dll
>
> Additional information: Object reference not set to an instance of an
> object.
>
> Could you please help me out, maybe I just missed something easy.
>
> Here is some more code in case it's needed.
>
> AddHandler ButtonColStyle. CellButtonClick ed, AddressOf
> HandleCellButto nClick
> AddHandler DG_punch.MouseU p, AddressOf

ButtonColStyle. HandleMouseUp
> DG_punch.TableS tyles.Add(ts)
>
> Private Sub HandleCellButto nClick(ByVal sender As Object, ByVal e As
> DataGridCellBut tonClickEventAr gs)
> If MessageBox.Show ("Are you sure you want to delete?", "Delete
> Confirm", MessageBoxButto ns.OKCancel, MessageBoxIcon. Warning) =
> DialogResult.OK Then
> If e.RowIndex < DS1.Tables(0).R ows.Count Then
> Dim myCurrencyManag er As CurrencyManager =
> CType(BindingCo ntext(DG_punch. DataSource, DG_punch.DataMe mber),
> CurrencyManager )
> myCurrencyManag er.RemoveAt(e.R owIndex)
> End If
> If e.RowIndex < DS1.Tables(0).R ows.Count Then
> DS1.Tables(0).R ows(e.RowIndex) .Delete()
> End If
> OleDb_Punch.Upd ate(DS1)
> End If
> End Sub
>
>
> Here is the code of the page that microsoft gave me.......
>
> Option Strict Off
> Option Explicit On
>
> Imports Microsoft.Visua lBasic
> Imports System
> Imports System.Drawing
> Imports System.Windows. Forms
>
> Public Class DataGridButtonC olumn
> Inherits DataGridTextBox Column
> Public Event CellButtonClick ed As
> DataGridCellBut tonClickEventHa ndler
>
> Private _columnNum As Integer
> Private _buttonFace As Bitmap
>
> Public Sub New(ByVal colNum As Integer)
> _columnNum = colNum
> Try
> _buttonFace = New Bitmap(Applicat ion.StartupPath &
> "\trash.gif ")
> Catch
> End Try
> End Sub 'New
>
> Protected Overloads Overrides Sub Edit(ByVal [source] As
> System.Windows. Forms.CurrencyM anager, ByVal rowNum As Integer, ByVal
> bounds
> As System.Drawing. Rectangle, ByVal [readOnly] As Boolean, ByVal
> instantText
> As String, ByVal cellIsVisible As Boolean)
> End Sub 'Edit
>
> Private Sub DrawButton(ByVa l g As Graphics, ByVal bm As Bitmap,
> ByVal
> bounds As Rectangle, ByVal row As Integer)
>
> Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid
>
> g.DrawImage(bm, bounds, 0, 0, bm.Width, bm.Height,
> GraphicsUnit.Pi xel)
>
> End Sub
>
> Public Sub HandleMouseUp(B yVal sender As Object, ByVal e As
> MouseEventArgs)
> Dim dg As DataGrid = Me.DataGridTabl eStyle.DataGrid
> Dim hti As DataGrid.HitTes tInfo = dg.HitTest(New Point(e.X,
> e.Y))
> Dim isClickInCell As Boolean = (hti.Column = Me._columnNum And
> hti.Row > -1)
>
> If Not isClickInCell Then Return
> Dim rect As New Rectangle(0, 0, 0, 0)
>
> rect = dg.GetCellBound s(hti.Row, hti.Column)
> Dim g As Graphics = Graphics.FromHw nd(dg.Handle)
> DrawButton(g, Me._buttonFace, rect, hti.Row)
> g.Dispose()
> RaiseEvent CellButtonClick ed(Me, New
> DataGridCellBut tonClickEventAr gs(hti.Row, hti.Column))
> End Sub 'HandleMouseUp
>
> Protected Overloads Overrides Sub Paint(ByVal g As
> System.Drawing. Graphics, ByVal bounds As System.Drawing. Rectangle,
> ByVal
> [source] As System.Windows. Forms.CurrencyM anager, ByVal rowNum As

Integer,
> ByVal backBrush As System.Drawing. Brush, ByVal foreBrush As
> System.Drawing. Brush, ByVal alignToRight As Boolean)
> Dim parent As DataGrid = Me.DataGridTabl eStyle.DataGrid
> Dim BackColor As Color
> BackColor = parent.Alternat ingBackColor
>
> 'clear the cell
> g.FillRectangle (New SolidBrush(Back Color), bounds)
>
> 'draw the value
> Dim s As String = Me.GetColumnVal ueAtRow([source],
> rowNum).ToStrin g() 'parent[rowNum, 0].ToString() +
> ((parent[rowNum, 1].ToString())+ " ").Substring(0, 2);
> DrawButton(g, _buttonFace, bounds, rowNum)
> End Sub 'Paint 'font.Dispose() ;
> End Class 'DataGridButton Column
>
> Public Delegate Sub DataGridCellBut tonClickEventHa ndler(ByVal sender

As > Object, ByVal e As DataGridCellBut tonClickEventAr gs)
>
> Public Class DataGridCellBut tonClickEventAr gs
> Inherits EventArgs
> Private _row As Integer
> Private _col As Integer
>
>
> Public Sub New(ByVal row As Integer, ByVal col As Integer)
> _row = row
> _col = col
> End Sub 'New
>
>
> Public ReadOnly Property RowIndex() As Integer
> Get
> Return _row
> End Get
> End Property
>
> Public ReadOnly Property ColIndex() As Integer
> Get
> Return _col
> End Get
> End Property
> End Class
>
>



Nov 20 '05 #5

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

Similar topics

0
1200
by: Julien | last post by:
Hi, I created a custom server control, compiled as a DLL (it's a composite server control). In my apsx page, I use something like : <MyAssembly:MyObject properties> <asp:datagrid /> </MyAssembly:MyObject> Basically, everything works except when I post back the page from the
0
1605
by: Stephen | last post by:
This is a real brain-teaser and i'd really appreciate it if someone can try and understand what im trying to do and give me a few pointers or ideas to help me work out my problem. Im basically using the example of CUSTOM PAGING on a DataGrid on this page: http://www.dotnetjunkies.com/Tutorial/EA868776-D71E-448A-BC23-B64B871F967F.dcik and im...
1
3962
by: The_Rave | last post by:
Hi everyone, I'm trying to add my own template columns to the property builder of ..NET. E.g. a checkbox column, or an image column. But I can't find the sources of the wizard, or a way to add them to the wizard, via add-in? I tried to capture it with a macro, but all I can't get out of it is the raise event of the wizard, nothing that...
1
1629
by: Vagabond Software | last post by:
I am creating a custom datagrid based, in part, from someone else's code. The author declared a derived datagrid class in a windows form, then declared a derived ColumnStyle class, in the same form, that accepted his custom grid type as an argument. For example: public class HisCustomGrid : DataGrid { public HisCustomGrid() { } } public...
4
3039
by: Dave | last post by:
Hello All, I am having a nightmare trying to add a new row to my Datagrid. When I use the code below I get the error: 'Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. Can anyone help me with this? Dim dg2 as DataGrid = DG.Items(0).FindControl("dg2") DSClass = Session("DSClass") dt = DSClass.Tables(0)
2
3179
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/creatingcustomcolumns.asp The problem I am having is that the data in the custom datagridcolumn is not saved to viewstate and after...
7
3333
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid, theres a requirement to show a drop down menu list (this is a control I downloaded online) in one of the columns. For the purposes of this question,...
1
1499
by: Sam Samnah | last post by:
Hi Everyone. It has been a long time since my last post. Nevertheless, I have built a custom server control that allows a user to edit text, bolding, italics strike though table insertion and manipulation etc etc. The control works perfectly when placed outside a templated control but when placed in, for instance, a datagrid...
1
1435
by: rn5a | last post by:
I have created a custom server control which is actually a Button clicking which prompts a user with a JavaScript confirm message asking him whether he would like to proceed or not. If he clicks *OK' in the confirm box, he is taken to the next page. If he clicks *Cancel* in the confirm box, he stays on that page itself. I have a Web Form...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.