473,588 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataView confusion

I have a form with a dataset and a datagrid.
I created a dataview on this dataset.
When the user modifies the datagrid, I look up this record in the dataview
to make sure it is unique.

Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems that
the dataview has the records that are in the datagrid, because everytime I
search for a record that I know is NOT in the dataset, it finds it. I don't
get it.

Is there a better way to find a record in a dataset? Here is the code I use.

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim roomvar As String =
Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x, 0).ToString
Dim DV As New DataView(Ds1.Ta bles("rooms"))
DV.Sort = "roomno"
DV.RowFilter = "roomno like '" & roomvar & "'"
Dim dr As DataRow

'Used to debug.......... ......
Label1.Text = Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x,
0).ToString
Label2.Text = DV.Count.ToStri ng
Label3.Text = DV.RowFilter.To String
If DV.Count > 0 Then MsgBox("over")
End Sub
Nov 20 '05 #1
13 2086
Cor
Hi Steve,

I have looked it then times over so a little question first.

Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems that the dataview has the records that are in the datagrid, because everytime I
search for a record that I know is NOT in the dataset, it finds it. I don't get it.

What is the datasource from your datagrid?

And if it is a dataview what is the source of that dataview?

Cor
Nov 20 '05 #2
Datagrid source is a Dataset (DS1)
Dataset source is an Access database.
Here is my DataGrid code if needed.

Thank you for your help.

'------DataGrid1 TABLESTYLE----------------------

Dim ts As DataGridTableSt yle

DataGrid1.DataS ource = Ds1

DataGrid1.DataM ember = "rooms"

ts = New DataGridTableSt yle

ts.MappingName = "rooms"

ts.PreferredRow Height = 25

ts.AlternatingB ackColor = System.Drawing. Color.FromArgb( CType(252, Byte),
CType(253, Byte), CType(206, Byte))

ts.HeaderBackCo lor = System.Drawing. Color.FromArgb( 255, 252, 253, 206)

ts.HeaderForeCo lor = System.Drawing. Color.Black

'-------dg_punch COLUMNSTYLES----------------------

Dim tb1 As DataGridTextBox Column

tb1 = New DataGridTextBox Column

tb1.HeaderText = "Room Number"

tb1.MappingName = "roomno"

tb1.NullText = ""

tb1.Width = 150

ts.GridColumnSt yles.Add(tb1)

Dim tb2 As DataGridTextBox Column

tb2 = New DataGridTextBox Column

tb2.HeaderText = "Room Description"

tb2.MappingName = "roomdesc"

tb2.NullText = ""

tb2.Width = 350

ts.GridColumnSt yles.Add(tb2)

DataGrid1.Table Styles.Add(ts)

"Cor" <no*@non.com> wrote in message
news:ON******** ******@TK2MSFTN GP09.phx.gbl...
Hi Steve,

I have looked it then times over so a little question first.

Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems

that
the dataview has the records that are in the datagrid, because everytime I search for a record that I know is NOT in the dataset, it finds it. I

don't
get it.

What is the datasource from your datagrid?

And if it is a dataview what is the source of that dataview?

Cor

Nov 20 '05 #3
Cor
Hi Steve,

Correct me if I understand it wrong, but everything that is on your
datagrid1 is in your Ds1.tables("roo ms")

And now I am currious what cannot be in that dataset and from where you get
that data?
The dataset can of course have more columns, (I did not see your select
statement, not that I needed that)

If it is an access or an SQL database is not important for this.

Cor
Datagrid source is a Dataset (DS1)
Dataset source is an Access database.
Here is my DataGrid code if needed.

Thank you for your help.

'------DataGrid1 TABLESTYLE----------------------

Dim ts As DataGridTableSt yle

DataGrid1.DataS ource = Ds1

DataGrid1.DataM ember = "rooms"

ts = New DataGridTableSt yle

ts.MappingName = "rooms"

ts.PreferredRow Height = 25

ts.AlternatingB ackColor = System.Drawing. Color.FromArgb( CType(252, Byte),
CType(253, Byte), CType(206, Byte))

ts.HeaderBackCo lor = System.Drawing. Color.FromArgb( 255, 252, 253, 206)

ts.HeaderForeCo lor = System.Drawing. Color.Black

'-------dg_punch COLUMNSTYLES----------------------

Dim tb1 As DataGridTextBox Column

tb1 = New DataGridTextBox Column

tb1.HeaderText = "Room Number"

tb1.MappingName = "roomno"

tb1.NullText = ""

tb1.Width = 150

ts.GridColumnSt yles.Add(tb1)

Dim tb2 As DataGridTextBox Column

tb2 = New DataGridTextBox Column

tb2.HeaderText = "Room Description"

tb2.MappingName = "roomdesc"

tb2.NullText = ""

tb2.Width = 350

ts.GridColumnSt yles.Add(tb2)

DataGrid1.Table Styles.Add(ts)

"Cor" <no*@non.com> wrote in message
news:ON******** ******@TK2MSFTN GP09.phx.gbl...
Hi Steve,

I have looked it then times over so a little question first.

Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems that
the dataview has the records that are in the datagrid, because
everytime I search for a record that I know is NOT in the dataset, it finds it. I

don't
get it.

What is the datasource from your datagrid?

And if it is a dataview what is the source of that dataview?

Cor


Nov 20 '05 #4
For example:
When I change the roomno in the first column in the Datagrid to something
else, I would like to check if that value exist before I update the DB. When
I check it agains the DataView I created, the DataView.count = 1 (it should
be 0).

I am including the whole code from my form. The button is only there to
test, hopefully I can put the good code into the cellChanged event.

Public Class Form1
Inherits System.Windows. Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeCompo nent()
'Add any initialization after the InitializeCompo nent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Disp ose()
End If
End If
MyBase.Dispose( disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.Componen tModel.IContain er

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents OleDb As System.Data.Ole Db.OleDbDataAda pter
Friend WithEvents OleDbSelectComm and1 As System.Data.Ole Db.OleDbCommand
Friend WithEvents OleDbInsertComm and1 As System.Data.Ole Db.OleDbCommand
Friend WithEvents OleDbUpdateComm and1 As System.Data.Ole Db.OleDbCommand
Friend WithEvents OleDbDeleteComm and1 As System.Data.Ole Db.OleDbCommand
Friend WithEvents OleDbConnection 1 As System.Data.Ole Db.OleDbConnect ion
Friend WithEvents Ds1 As Datagrid_Test.D S
Friend WithEvents DataGrid1 As System.Windows. Forms.DataGrid
Friend WithEvents OleDb2 As System.Data.Ole Db.OleDbDataAda pter
Friend WithEvents OleDbSelectComm and2 As System.Data.Ole Db.OleDbCommand
Friend WithEvents OleDbInsertComm and2 As System.Data.Ole Db.OleDbCommand
Friend WithEvents OleDbUpdateComm and2 As System.Data.Ole Db.OleDbCommand
Friend WithEvents OleDbDeleteComm and2 As System.Data.Ole Db.OleDbCommand
Friend WithEvents Label1 As System.Windows. Forms.Label
Friend WithEvents Label2 As System.Windows. Forms.Label
Friend WithEvents Label3 As System.Windows. Forms.Label
Friend WithEvents Button1 As System.Windows. Forms.Button
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Me.OleDb = New System.Data.Ole Db.OleDbDataAda pter
Me.OleDbDeleteC ommand1 = New System.Data.Ole Db.OleDbCommand
Me.OleDbConnect ion1 = New System.Data.Ole Db.OleDbConnect ion
Me.OleDbInsertC ommand1 = New System.Data.Ole Db.OleDbCommand
Me.OleDbSelectC ommand1 = New System.Data.Ole Db.OleDbCommand
Me.OleDbUpdateC ommand1 = New System.Data.Ole Db.OleDbCommand
Me.Ds1 = New Datagrid_Test.D S
Me.DataGrid1 = New System.Windows. Forms.DataGrid
Me.OleDb2 = New System.Data.Ole Db.OleDbDataAda pter
Me.OleDbDeleteC ommand2 = New System.Data.Ole Db.OleDbCommand
Me.OleDbInsertC ommand2 = New System.Data.Ole Db.OleDbCommand
Me.OleDbSelectC ommand2 = New System.Data.Ole Db.OleDbCommand
Me.OleDbUpdateC ommand2 = New System.Data.Ole Db.OleDbCommand
Me.Label1 = New System.Windows. Forms.Label
Me.Label2 = New System.Windows. Forms.Label
Me.Label3 = New System.Windows. Forms.Label
Me.Button1 = New System.Windows. Forms.Button
CType(Me.Ds1, System.Componen tModel.ISupport Initialize).Beg inInit()
CType(Me.DataGr id1,
System.Componen tModel.ISupport Initialize).Beg inInit()
Me.SuspendLayou t()
'
'OleDb
'
Me.OleDb.Delete Command = Me.OleDbDeleteC ommand1
Me.OleDb.Insert Command = Me.OleDbInsertC ommand1
Me.OleDb.Select Command = Me.OleDbSelectC ommand1
Me.OleDb.TableM appings.AddRang e(New
System.Data.Com mon.DataTableMa pping() {New
System.Data.Com mon.DataTableMa pping("Table", "rooms", New
System.Data.Com mon.DataColumnM apping() {New
System.Data.Com mon.DataColumnM apping("id", "id"), New
System.Data.Com mon.DataColumnM apping("jobno", "jobno"), New
System.Data.Com mon.DataColumnM apping("roomdes c", "roomdesc") , New
System.Data.Com mon.DataColumnM apping("roomno" , "roomno")}) })
Me.OleDb.Update Command = Me.OleDbUpdateC ommand1
'
'OleDbDeleteCom mand1
'
Me.OleDbDeleteC ommand1.Command Text = "DELETE FROM rooms WHERE (id =
?) AND (jobno = ? OR ? IS NULL AND jobno IS NULL) A" & _
"ND (roomdesc = ? OR ? IS NULL AND roomdesc IS NULL) AND (roomno = ?
OR ? IS NULL" & _
" AND roomno IS NULL)"
Me.OleDbDeleteC ommand1.Connect ion = Me.OleDbConnect ion1
Me.OleDbDeleteC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_id ",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"id", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno1",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omdesc",
System.Data.Ole Db.OleDbType.Va rWChar, 250,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomdesc", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omdesc1",
System.Data.Ole Db.OleDbType.Va rWChar, 250,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomdesc", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omno",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omno1",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
'
'OleDbConnectio n1
'
Me.OleDbConnect ion1.Connection String = "Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Jet OLEDB:Database Password=;Data
Source=""C:\Doc uments and Setting" & _
"s\sfarmer\ My Documents\Visua l Studio
Projects2003\Pu nch\Punch.mdb"" ;Password=;Jet" & _
" OLEDB:Engine Type=5;Jet OLEDB:Global Bulk
Transactions=1; Provider=""Micr osoft.Je" & _
"t.OLEDB.4.0""; Jet OLEDB:System database=;Jet
OLEDB:SFP=False ;Extended Properties=" & _
";Mode=Shar e Deny None;Jet OLEDB:New Database Password=;Jet
OLEDB:Create System D" & _
"atabase=False; Jet OLEDB:Don't Copy Locale on Compact=False;J et
OLEDB:Compact Wit" & _
"hout Replica Repair=False;Us er ID=Admin;Jet OLEDB:Encrypt
Database=False"
'
'OleDbInsertCom mand1
'
Me.OleDbInsertC ommand1.Command Text = "INSERT INTO rooms(jobno,
roomdesc, roomno) VALUES (?, ?, ?)"
Me.OleDbInsertC ommand1.Connect ion = Me.OleDbConnect ion1
Me.OleDbInsertC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("jobno",
System.Data.Ole Db.OleDbType.In teger, 0, "jobno"))
Me.OleDbInsertC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("roomdesc",
System.Data.Ole Db.OleDbType.Va rWChar, 250, "roomdesc") )
Me.OleDbInsertC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("roomno",
System.Data.Ole Db.OleDbType.Va rWChar, 150, "roomno"))
'
'OleDbSelectCom mand1
'
Me.OleDbSelectC ommand1.Command Text = "SELECT id, jobno, roomdesc,
roomno FROM rooms"
Me.OleDbSelectC ommand1.Connect ion = Me.OleDbConnect ion1
'
'OleDbUpdateCom mand1
'
Me.OleDbUpdateC ommand1.Command Text = "UPDATE rooms SET jobno = ?,
roomdesc = ?, roomno = ? WHERE (id = ?) AND (jobno = " & _
"? OR ? IS NULL AND jobno IS NULL) AND (roomdesc = ? OR ? IS NULL
AND roomdesc IS" & _
" NULL) AND (roomno = ? OR ? IS NULL AND roomno IS NULL)"
Me.OleDbUpdateC ommand1.Connect ion = Me.OleDbConnect ion1
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("jobno",
System.Data.Ole Db.OleDbType.In teger, 0, "jobno"))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("roomdesc",
System.Data.Ole Db.OleDbType.Va rWChar, 250, "roomdesc") )
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("roomno",
System.Data.Ole Db.OleDbType.Va rWChar, 150, "roomno"))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_id ",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"id", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno1",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omdesc",
System.Data.Ole Db.OleDbType.Va rWChar, 250,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomdesc", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omdesc1",
System.Data.Ole Db.OleDbType.Va rWChar, 250,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomdesc", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omno",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand1.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ro omno1",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"roomno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
'
'Ds1
'
Me.Ds1.DataSetN ame = "DS"
Me.Ds1.Locale = New System.Globaliz ation.CultureIn fo("en-US")
'
'DataGrid1
'
Me.DataGrid1.Da taMember = ""
Me.DataGrid1.He aderForeColor =
System.Drawing. SystemColors.Co ntrolText
Me.DataGrid1.Lo cation = New System.Drawing. Point(15, 11)
Me.DataGrid1.Na me = "DataGrid1"
Me.DataGrid1.Si ze = New System.Drawing. Size(822, 279)
Me.DataGrid1.Ta bIndex = 0
'
'OleDb2
'
Me.OleDb2.Delet eCommand = Me.OleDbDeleteC ommand2
Me.OleDb2.Inser tCommand = Me.OleDbInsertC ommand2
Me.OleDb2.Selec tCommand = Me.OleDbSelectC ommand2
Me.OleDb2.Table Mappings.AddRan ge(New
System.Data.Com mon.DataTableMa pping() {New
System.Data.Com mon.DataTableMa pping("Table", "Responsibl e", New
System.Data.Com mon.DataColumnM apping() {New
System.Data.Com mon.DataColumnM apping("abbr", "abbr"), New
System.Data.Com mon.DataColumnM apping("id", "id"), New
System.Data.Com mon.DataColumnM apping("jobno", "jobno"), New
System.Data.Com mon.DataColumnM apping("resp", "resp")})})
Me.OleDb2.Updat eCommand = Me.OleDbUpdateC ommand2
'
'OleDbDeleteCom mand2
'
Me.OleDbDeleteC ommand2.Command Text = "DELETE FROM Responsible WHERE
(id = ?) AND (abbr = ? OR ? IS NULL AND abbr IS NUL" & _
"L) AND (jobno = ? OR ? IS NULL AND jobno IS NULL) AND (resp = ? OR
? IS NULL AND" & _
" resp IS NULL)"
Me.OleDbDeleteC ommand2.Connect ion = Me.OleDbConnect ion1
Me.OleDbDeleteC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_id ",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"id", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ab br",
System.Data.Ole Db.OleDbType.Va rWChar, 50,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"abbr", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ab br1",
System.Data.Ole Db.OleDbType.Va rWChar, 50,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"abbr", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno1",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_re sp",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"resp", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbDeleteC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_re sp1",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"resp", System.Data.Dat aRowVersion.Ori ginal, Nothing))
'
'OleDbInsertCom mand2
'
Me.OleDbInsertC ommand2.Command Text = "INSERT INTO Responsible(abb r,
jobno, resp) VALUES (?, ?, ?)"
Me.OleDbInsertC ommand2.Connect ion = Me.OleDbConnect ion1
Me.OleDbInsertC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("abbr",
System.Data.Ole Db.OleDbType.Va rWChar, 50, "abbr"))
Me.OleDbInsertC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("jobno",
System.Data.Ole Db.OleDbType.In teger, 0, "jobno"))
Me.OleDbInsertC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("resp",
System.Data.Ole Db.OleDbType.Va rWChar, 150, "resp"))
'
'OleDbSelectCom mand2
'
Me.OleDbSelectC ommand2.Command Text = "SELECT abbr, id, jobno, resp
FROM Responsible"
Me.OleDbSelectC ommand2.Connect ion = Me.OleDbConnect ion1
'
'OleDbUpdateCom mand2
'
Me.OleDbUpdateC ommand2.Command Text = "UPDATE Responsible SET abbr =
?, jobno = ?, resp = ? WHERE (id = ?) AND (abbr = ?" & _
" OR ? IS NULL AND abbr IS NULL) AND (jobno = ? OR ? IS NULL AND
jobno IS NULL) A" & _
"ND (resp = ? OR ? IS NULL AND resp IS NULL)"
Me.OleDbUpdateC ommand2.Connect ion = Me.OleDbConnect ion1
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("abbr",
System.Data.Ole Db.OleDbType.Va rWChar, 50, "abbr"))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("jobno",
System.Data.Ole Db.OleDbType.In teger, 0, "jobno"))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("resp",
System.Data.Ole Db.OleDbType.Va rWChar, 150, "resp"))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_id ",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"id", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ab br",
System.Data.Ole Db.OleDbType.Va rWChar, 50,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"abbr", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_ab br1",
System.Data.Ole Db.OleDbType.Va rWChar, 50,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"abbr", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_jo bno1",
System.Data.Ole Db.OleDbType.In teger, 0,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"jobno", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_re sp",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"resp", System.Data.Dat aRowVersion.Ori ginal, Nothing))
Me.OleDbUpdateC ommand2.Paramet ers.Add(New
System.Data.Ole Db.OleDbParamet er("Original_re sp1",
System.Data.Ole Db.OleDbType.Va rWChar, 150,
System.Data.Par ameterDirection .Input, False, CType(0, Byte), CType(0, Byte),
"resp", System.Data.Dat aRowVersion.Ori ginal, Nothing))
'
'Label1
'
Me.Label1.AutoS ize = True
Me.Label1.DataB indings.Add(New System.Windows. Forms.Binding(" Text",
Me.Ds1, "rooms.roomno") )
Me.Label1.Locat ion = New System.Drawing. Point(179, 319)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing. Size(38, 16)
Me.Label1.TabIn dex = 2
Me.Label1.Text = "Label1"
'
'Label2
'
Me.Label2.AutoS ize = True
Me.Label2.Locat ion = New System.Drawing. Point(180, 343)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing. Size(38, 16)
Me.Label2.TabIn dex = 3
Me.Label2.Text = "Label2"
'
'Label3
'
Me.Label3.AutoS ize = True
Me.Label3.Locat ion = New System.Drawing. Point(183, 368)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing. Size(38, 16)
Me.Label3.TabIn dex = 4
Me.Label3.Text = "Label3"
'
'Button1
'
Me.Button1.Loca tion = New System.Drawing. Point(199, 477)
Me.Button1.Name = "Button1"
Me.Button1.TabI ndex = 5
Me.Button1.Text = "Button1"
'
'Form1
'
Me.AutoScaleBas eSize = New System.Drawing. Size(5, 13)
Me.ClientSize = New System.Drawing. Size(886, 689)
Me.Controls.Add (Me.Button1)
Me.Controls.Add (Me.Label3)
Me.Controls.Add (Me.Label2)
Me.Controls.Add (Me.Label1)
Me.Controls.Add (Me.DataGrid1)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.Ds1, System.Componen tModel.ISupport Initialize).End Init()
CType(Me.DataGr id1,
System.Componen tModel.ISupport Initialize).End Init()
Me.ResumeLayout (False)

End Sub

#End Region
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
OleDb.Fill(Ds1)

'------DataGrid1 TABLESTYLE----------------------
Dim ts As DataGridTableSt yle
DataGrid1.DataS ource = Ds1
DataGrid1.DataM ember = "rooms"
ts = New DataGridTableSt yle
ts.MappingName = "rooms"
ts.PreferredRow Height = 25
ts.AlternatingB ackColor = System.Drawing. Color.FromArgb( CType(252,
Byte), CType(253, Byte), CType(206, Byte))
ts.HeaderBackCo lor = System.Drawing. Color.FromArgb( 255, 252, 253,
206)
ts.HeaderForeCo lor = System.Drawing. Color.Black
'-------dg_punch COLUMNSTYLES----------------------
Dim tb1 As DataGridTextBox Column
tb1 = New DataGridTextBox Column
tb1.HeaderText = "Room Number"
tb1.MappingName = "roomno"
tb1.NullText = ""
tb1.Width = 150
ts.GridColumnSt yles.Add(tb1)
Dim tb2 As DataGridTextBox Column
tb2 = New DataGridTextBox Column
tb2.HeaderText = "Room Description"
tb2.MappingName = "roomdesc"
tb2.NullText = ""
tb2.Width = 350
ts.GridColumnSt yles.Add(tb2)
DataGrid1.Table Styles.Add(ts)
End Sub

Private Sub Handle_CurrentC ellChanged(ByVa l sender As Object, ByVal e As
System.EventArg s) Handles DataGrid1.Curre ntCellChanged
Dim roomvar As String =
Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x, 0).ToString
Dim DV As New DataView(Ds1.Ta bles("rooms"))
DV.RowFilter = "roomno like '" & roomvar & "'"

'If DV.Count > 0 Then
' MsgBox(Me.DataG rid1.Item(Me.Da taGrid1.Current RowIndex,
0).ToString)
' End If
End Sub

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim roomvar As String =
Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x, 0).ToString
Dim DV As New DataView(Ds1.Ta bles("rooms"))
DV.Sort = "roomno"
' DV.RowFilter = "roomno like '" & roomvar & "'"
DV.RowFilter = "roomno like '001aa' "
Dim dr As DataRow

Label1.Text = Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x,
0).ToString
Label2.Text = DV.Count.ToStri ng
Label3.Text = DV.RowFilter.To String
' If DV.Count > 0 Then MsgBox("over")

MsgBox(Applicat ion.ProductVers ion.ToString)

End Sub
End Class



"Cor" <no*@non.com> wrote in message
news:uG******** ******@TK2MSFTN GP09.phx.gbl...
Hi Steve,

Correct me if I understand it wrong, but everything that is on your
datagrid1 is in your Ds1.tables("roo ms")

And now I am currious what cannot be in that dataset and from where you get that data?
The dataset can of course have more columns, (I did not see your select
statement, not that I needed that)

If it is an access or an SQL database is not important for this.

Cor
Datagrid source is a Dataset (DS1)
Dataset source is an Access database.
Here is my DataGrid code if needed.

Thank you for your help.

'------DataGrid1 TABLESTYLE----------------------

Dim ts As DataGridTableSt yle

DataGrid1.DataS ource = Ds1

DataGrid1.DataM ember = "rooms"

ts = New DataGridTableSt yle

ts.MappingName = "rooms"

ts.PreferredRow Height = 25

ts.AlternatingB ackColor = System.Drawing. Color.FromArgb( CType(252, Byte), CType(253, Byte), CType(206, Byte))

ts.HeaderBackCo lor = System.Drawing. Color.FromArgb( 255, 252, 253, 206)

ts.HeaderForeCo lor = System.Drawing. Color.Black

'-------dg_punch COLUMNSTYLES----------------------

Dim tb1 As DataGridTextBox Column

tb1 = New DataGridTextBox Column

tb1.HeaderText = "Room Number"

tb1.MappingName = "roomno"

tb1.NullText = ""

tb1.Width = 150

ts.GridColumnSt yles.Add(tb1)

Dim tb2 As DataGridTextBox Column

tb2 = New DataGridTextBox Column

tb2.HeaderText = "Room Description"

tb2.MappingName = "roomdesc"

tb2.NullText = ""

tb2.Width = 350

ts.GridColumnSt yles.Add(tb2)

DataGrid1.Table Styles.Add(ts)

"Cor" <no*@non.com> wrote in message
news:ON******** ******@TK2MSFTN GP09.phx.gbl...
Hi Steve,

I have looked it then times over so a little question first.
>
> Here is the confusion...... ...
> I thought that the DataView is the view from the dataset, but it seems that
> the dataview has the records that are in the datagrid, because

everytime
I
> search for a record that I know is NOT in the dataset, it finds it. I don't
> get it.
>
What is the datasource from your datagrid?

And if it is a dataview what is the source of that dataview?

Cor



Nov 20 '05 #5
Steve,
When I try your code with the titles table in the pubs database (sample DB
in SQL Server) I get a single row, as I would expect.
Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems that the dataview has the records that are in the datagrid, because everytime I
search for a record that I know is NOT in the dataset, it finds it. I don't get it. The DataGrid itself binds to a DataView not the DataTable per se, when you
assign a DataTable to the DataGrid.DataSo urce property. The DataGrid uses
the DataTable.Defau ltView property to get a DataView object. A DataView is a
view (not a copy) of the data in the DataTable itself, so when you modify
data in the DataGrid this is reflected in the DataTable itself. Hence when
you create a second DataView over the DataTable, this second view also
reflects what is currently in the grid. Because the DataView is a view of
the data in a DataTable you can rather efficiently create multiple views of
the DataTable will consuming a lot of memory resources.

In other words the DataGrid & your DataView are both looking at the same
data in the DataTable itself. Neither made a copy of this data.

If you want to ensure that the column is unique, I would add a
UniqueConstrain t to Ds1.Tables("roo ms") for roomno. The DataTable itself
will then take care of it for you!.

If you don't have it, you may want to get David Sceppa's "Microsoft
ADO.NET - Core Reference" from MS Press as it is a good tutorial on ADO.NET
plus a good desk reference once you know ADO.NET!

Hope this helps
Jay

"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. I have a form with a dataset and a datagrid.
I created a dataview on this dataset.
When the user modifies the datagrid, I look up this record in the dataview
to make sure it is unique.

Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems that the dataview has the records that are in the datagrid, because everytime I
search for a record that I know is NOT in the dataset, it finds it. I don't get it.

Is there a better way to find a record in a dataset? Here is the code I use.
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim roomvar As String =
Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x, 0).ToString
Dim DV As New DataView(Ds1.Ta bles("rooms"))
DV.Sort = "roomno"
DV.RowFilter = "roomno like '" & roomvar & "'"
Dim dr As DataRow

'Used to debug.......... ......
Label1.Text = Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x,
0).ToString
Label2.Text = DV.Count.ToStri ng
Label3.Text = DV.RowFilter.To String
If DV.Count > 0 Then MsgBox("over")
End Sub

Nov 20 '05 #6
Cor
Hi Steve,

I did look at your code, but you use it on a way that I think it is not made
for.

I will try to explain with a pseudo example.
We have a datatable that is a part of a dataset, we name it tbl1
It has 2 columns named "A" and "B" and only filled with
1 A
2 B
9 C
We make 2 datagrids

We read the table in our dataset

Then we make 2 dataviews of that table
dim dv1 as dataview(ds.tab le("tbl1"))
dim dv1 as dataview(ds.tab le("tbl1"))

We say
dv1.sort = "A Desc"
dv2.rowfilter = "A<5"

and we add them to the datagrids
datagrid1.datas ource = dv1
datagrid2.datas ource = dv2

And then it is shown.
Datagrid 1 has all rows and it goes
9 C
2 B
1 A
Datagrid 2 has
1 A
2 B

Now you change in datagrid 1 the 9 in a 0
You will see it shown up at the end of datagrid 2 and datagrid1 is
reordered.
(after you dit push on the column in front)

You enter a new row with a number 4 in datagrid 2
It will show up in datagrid 1.

The dataview is just a filter about the horizontaal rows as are the
colomnstyle for the columns.

All what you see in the datagrid is in the ds.tables("tbl1 ")

(Before you update it withouth changing a row you have to do endedit before
that)

I hope this makes it more clear.

Cor
Nov 20 '05 #7
Thank you Jay, I will look into getting this book. I guess I was thinking to
complicated.

Cor, I really appreciate you trying to explain this to me, but I am fairly
new with VB.NET, and after reading your last post, I was really confused and
still feel a little dizzy.

I guess I have do a whole lot more reading to understand this language.
Thank you everybody for your prompt help.

Steve

"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:eD******** ******@tk2msftn gp13.phx.gbl...
Steve,
When I try your code with the titles table in the pubs database (sample DB
in SQL Server) I get a single row, as I would expect.
Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems that
the dataview has the records that are in the datagrid, because everytime I search for a record that I know is NOT in the dataset, it finds it. I

don't
get it.

The DataGrid itself binds to a DataView not the DataTable per se, when you
assign a DataTable to the DataGrid.DataSo urce property. The DataGrid uses
the DataTable.Defau ltView property to get a DataView object. A DataView is

a view (not a copy) of the data in the DataTable itself, so when you modify
data in the DataGrid this is reflected in the DataTable itself. Hence when
you create a second DataView over the DataTable, this second view also
reflects what is currently in the grid. Because the DataView is a view of
the data in a DataTable you can rather efficiently create multiple views of the DataTable will consuming a lot of memory resources.

In other words the DataGrid & your DataView are both looking at the same
data in the DataTable itself. Neither made a copy of this data.

If you want to ensure that the column is unique, I would add a
UniqueConstrain t to Ds1.Tables("roo ms") for roomno. The DataTable itself
will then take care of it for you!.

If you don't have it, you may want to get David Sceppa's "Microsoft
ADO.NET - Core Reference" from MS Press as it is a good tutorial on ADO.NET plus a good desk reference once you know ADO.NET!

Hope this helps
Jay

"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I have a form with a dataset and a datagrid.
I created a dataview on this dataset.
When the user modifies the datagrid, I look up this record in the dataview to make sure it is unique.

Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems

that
the dataview has the records that are in the datagrid, because everytime I search for a record that I know is NOT in the dataset, it finds it. I

don't
get it.

Is there a better way to find a record in a dataset? Here is the code I

use.

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim roomvar As String =
Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x, 0).ToString
Dim DV As New DataView(Ds1.Ta bles("rooms"))
DV.Sort = "roomno"
DV.RowFilter = "roomno like '" & roomvar & "'"
Dim dr As DataRow

'Used to debug.......... ......
Label1.Text = Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x,
0).ToString
Label2.Text = DV.Count.ToStri ng
Label3.Text = DV.RowFilter.To String
If DV.Count > 0 Then MsgBox("over")
End Sub


Nov 20 '05 #8
Doh!
reflects what is currently in the grid. Because the DataView is a view of
the data in a DataTable you can rather efficiently create multiple views of the DataTable will consuming a lot of memory resources.
That last line should be:
the DataTable without consuming a lot of memory resources.

Jay

"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:eD******** ******@tk2msftn gp13.phx.gbl... Steve,
When I try your code with the titles table in the pubs database (sample DB
in SQL Server) I get a single row, as I would expect.
Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems that
the dataview has the records that are in the datagrid, because everytime I search for a record that I know is NOT in the dataset, it finds it. I

don't
get it.

The DataGrid itself binds to a DataView not the DataTable per se, when you
assign a DataTable to the DataGrid.DataSo urce property. The DataGrid uses
the DataTable.Defau ltView property to get a DataView object. A DataView is

a view (not a copy) of the data in the DataTable itself, so when you modify
data in the DataGrid this is reflected in the DataTable itself. Hence when
you create a second DataView over the DataTable, this second view also
reflects what is currently in the grid. Because the DataView is a view of
the data in a DataTable you can rather efficiently create multiple views of the DataTable will consuming a lot of memory resources.

In other words the DataGrid & your DataView are both looking at the same
data in the DataTable itself. Neither made a copy of this data.

If you want to ensure that the column is unique, I would add a
UniqueConstrain t to Ds1.Tables("roo ms") for roomno. The DataTable itself
will then take care of it for you!.

If you don't have it, you may want to get David Sceppa's "Microsoft
ADO.NET - Core Reference" from MS Press as it is a good tutorial on ADO.NET plus a good desk reference once you know ADO.NET!

Hope this helps
Jay

"Steve" <sf*****@flinti nd-remove.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I have a form with a dataset and a datagrid.
I created a dataview on this dataset.
When the user modifies the datagrid, I look up this record in the dataview to make sure it is unique.

Here is the confusion...... ...
I thought that the DataView is the view from the dataset, but it seems

that
the dataview has the records that are in the datagrid, because everytime I search for a record that I know is NOT in the dataset, it finds it. I

don't
get it.

Is there a better way to find a record in a dataset? Here is the code I

use.

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim roomvar As String =
Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x, 0).ToString
Dim DV As New DataView(Ds1.Ta bles("rooms"))
DV.Sort = "roomno"
DV.RowFilter = "roomno like '" & roomvar & "'"
Dim dr As DataRow

'Used to debug.......... ......
Label1.Text = Me.DataGrid1.It em(Me.DataGrid1 .CurrentRowInde x,
0).ToString
Label2.Text = DV.Count.ToStri ng
Label3.Text = DV.RowFilter.To String
If DV.Count > 0 Then MsgBox("over")
End Sub


Nov 20 '05 #9
Cor
Hi Jay,

Do you believe I have 5 times readed that line and did not understand it, my
brainspellcheck er did not work also.

:-))

Cor
the DataTable without consuming a lot of memory resources.

Nov 20 '05 #10

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

Similar topics

0
1561
by: RPI_alum | last post by:
I've been experiencing some frustrating behavior that I believe may be a MS bug in the Framework. Has anyone else experienced this, know a better way to resolve it, or if it is an actual MS bug *) I have a DataSet containing 2 tables, A and B *) There is a 1-to-1 relation between the tables with table A being the parent. (ABrel *) A DataView is created on table A to allow filtering of the result se *) 2 Text Boxes are created and Bound...
9
2569
by: jwedel_stolo | last post by:
Hi I'm creating a dataview "on the fly" in order to sort some data prior to writing out the information to a MS SQL table I have used two methods in order to determine the sort order of the DataView. (I'm writing in C# with the v1.1.4322 of the .NET Framework, in Window2K server"). First of all, here are the two methods I have used in order to apply the sorting property to the DataView 1. Simply defining the sort order and colum DataView...
8
8506
by: newbie_csharp | last post by:
Hi, I need to use single qoutation ( ' ) in my filter string but I get error message. how can I do something like this: mysearch = "Bob's book"; dataView.RowFilter = "myfield LIKE '" + mysearch + "%'"; even I changed "mysearch to this but still it's not working: mysearch = "Bob\'s book";
2
3286
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit the selected lie item at which case I would pop up a separate dialog box to do so, in the debugging code, the dataview.count would return 0. I get a error message because I tried to get values out of a dataview that holds 0 items. Does anyone...
36
4445
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a dataview with a count = 0. Can someone explain why and how I might work around this problem? Here is the code for my function: Public Shared Function GetViewFromRS(ByVal pRS As ADODB.Recordset) _ As DataView
5
8820
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it happen. Dim objKeys(2) as Object objKeys(0) = "CL" objKeys(2) = 4000 Dim posView As DataView = New DataView(posDS.Tables("Positions"), _
3
1612
by: astro | last post by:
I have a datagrid that is two levels down from the dataview (i.e. grandchild). I have spent 3 hours trying to get the syntax of determining it's real datasource (i.e. not it's source based on it's relationship with the dataview). argh! company ---> person --->contact
5
3956
by: enceladus311 | last post by:
I'm trying to find a way to keep from having to fill a DataView after every PostBack to a page. Basically, the design is that I have a DataView that I fill, which I then set as the DataSource to a DataGrid on my page. This works well, however, like I said, I would like to keep from having to fill the DataView on each PostBack. So, naturally, what I did was checked whether or not the request was a PostBack by checking the IsPostBack...
0
2141
by: Pravin Pujari | last post by:
Hi All, I am using .net framework 1.1 and c#. I have one problem regarding dataview. I have one dataview to which sorting may be applied or may not be applied. I have one UI component where I am displaying the dataview. All rows in dataview are displayed in the sequence as they appear in dataview. i.e. there is direct mapping between dataview rows and UI rows. I have subscribed ColumnChanged event of the datatable on which dataview is...
0
7862
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8228
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7987
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8223
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6634
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5729
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3847
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.