473,407 Members | 2,598 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,407 software developers and data experts.

Datagrid not updating problem.

I have a datagrid control that I've inherited from the base datagrid control (Source below).

I am applying a datatable style onto the datatable that I assign as my datasource.

All of my column but one are set as readonly=true. The writeable column does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I get the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-
Nov 21 '05 #1
8 1525
Hi,

What do you mean by writeable column does not update when editing
it?

Ken
------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid control
(Source below).

I am applying a datatable style onto the datatable that I assign as my
datasource.

All of my column but one are set as readonly=true. The writeable column
does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I get
the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e As
ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e As
ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-

Nov 21 '05 #2
The column that is not set to Readonly.

I will edit the value in the datagrid, click onto another cell and the value in the cell returns to the old value.

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

What do you mean by writeable column does not update when editing
it?

Ken
------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid control
(Source below).

I am applying a datatable style onto the datatable that I assign as my
datasource.

All of my column but one are set as readonly=true. The writeable column
does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I get
the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e As
ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e As
ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-

Nov 21 '05 #3
Hi,

Could you please post the code showing how to define your tablestyle
and bind the grid.

Ken
----------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
The column that is not set to Readonly.

I will edit the value in the datagrid, click onto another cell and the value
in the cell returns to the old value.

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

What do you mean by writeable column does not update when editing
it?

Ken
------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid
control
(Source below).

I am applying a datatable style onto the datatable that I assign as my
datasource.

All of my column but one are set as readonly=true. The writeable column
does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I
get
the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-


Nov 21 '05 #4
My binding....

NewResolveDisplayDataGrid.DataSource = noAdjudicationYetDataSet.Tables(0).DefaultView
NewResolveEditDataGrid.DataSource = noAdjudicationYetDataSet.Tables(1).DefaultView

The Table Style
-=-=-=-=-=-=-
'
'NewEPRRunTableStyle
'
Me.NewEPRRunTableStyle.AllowSorting = False
Me.NewEPRRunTableStyle.DataGrid = Me.NewResolveEditDataGrid
Me.NewEPRRunTableStyle.GridColumnStyles.AddRange(N ew System.Windows.Forms.DataGridColumnStyle() {Me.NameColumn,
Me.PayerDescColumn, Me.SourceColumn, Me.InputColumn, Me.Reached90Column})
Me.NewEPRRunTableStyle.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.NewEPRRunTableStyle.MappingName = "Table1"
Me.NewEPRRunTableStyle.RowHeadersVisible = False
'
'NameColumn
'
Me.NameColumn.Format = ""
Me.NameColumn.FormatInfo = Nothing
Me.NameColumn.HeaderText = "Facility"
Me.NameColumn.MappingName = "name"
Me.NameColumn.ReadOnly = True
Me.NameColumn.Width = 200
'
'PayerDescColumn
'
Me.PayerDescColumn.Format = ""
Me.PayerDescColumn.FormatInfo = Nothing
Me.PayerDescColumn.HeaderText = "Payer Class"
Me.PayerDescColumn.MappingName = "PayerDesc"
Me.PayerDescColumn.NullText = ""
Me.PayerDescColumn.ReadOnly = True
Me.PayerDescColumn.Width = 130
'
'SourceColumn
'
Me.SourceColumn.Format = ""
Me.SourceColumn.FormatInfo = Nothing
Me.SourceColumn.HeaderText = "Billing Company"
Me.SourceColumn.MappingName = "Source"
Me.SourceColumn.ReadOnly = True
Me.SourceColumn.Width = 87
'
'InputColumn
'
Me.InputColumn.Format = ""
Me.InputColumn.FormatInfo = Nothing
Me.InputColumn.HeaderText = "$/PP"
Me.InputColumn.MappingName = "InputDPP"
Me.InputColumn.NullText = ""
Me.InputColumn.Width = 55
'
'Reached90Column
'
Me.Reached90Column.FalseValue = ""
Me.Reached90Column.HeaderText = "90% ?"
Me.Reached90Column.MappingName = "Marker"
Me.Reached90Column.NullText = ""
Me.Reached90Column.NullValue = CType(resources.GetObject("Reached90Column.NullVal ue"), Object)
Me.Reached90Column.ReadOnly = True
Me.Reached90Column.TrueValue = "X"
Me.Reached90Column.Width = 63

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

Could you please post the code showing how to define your tablestyle
and bind the grid.

Ken
----------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
The column that is not set to Readonly.

I will edit the value in the datagrid, click onto another cell and the value
in the cell returns to the old value.

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

What do you mean by writeable column does not update when editing
it?

Ken
------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid
control
(Source below).

I am applying a datatable style onto the datatable that I assign as my
datasource.

All of my column but one are set as readonly=true. The writeable column
does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I
get
the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-


Nov 21 '05 #5
BTW - There are a few columns that come back from the database that are in that dataset that I don't display or include in the
tablestyle.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:eF****************@tk2msftngp13.phx.gbl...
Hi,

Could you please post the code showing how to define your tablestyle
and bind the grid.

Ken
----------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
The column that is not set to Readonly.

I will edit the value in the datagrid, click onto another cell and the value
in the cell returns to the old value.

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

What do you mean by writeable column does not update when editing
it?

Ken
------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid
control
(Source below).

I am applying a datatable style onto the datatable that I assign as my
datasource.

All of my column but one are set as readonly=true. The writeable column
does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I
get
the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-


Nov 21 '05 #6
Hi,

Scott I am really not seeing anything that would prevent the
datagrid from allowing you to edit the data. I do not see where you declare
InputColumn. I assume that is a datagridtextboxcolumn if not the problem
could be in the column style.
Ken
--------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:u%****************@TK2MSFTNGP10.phx.gbl...
My binding....

NewResolveDisplayDataGrid.DataSource =
noAdjudicationYetDataSet.Tables(0).DefaultView
NewResolveEditDataGrid.DataSource =
noAdjudicationYetDataSet.Tables(1).DefaultView

The Table Style
-=-=-=-=-=-=-
'
'NewEPRRunTableStyle
'
Me.NewEPRRunTableStyle.AllowSorting = False
Me.NewEPRRunTableStyle.DataGrid = Me.NewResolveEditDataGrid
Me.NewEPRRunTableStyle.GridColumnStyles.AddRange(N ew
System.Windows.Forms.DataGridColumnStyle() {Me.NameColumn,
Me.PayerDescColumn, Me.SourceColumn, Me.InputColumn, Me.Reached90Column})
Me.NewEPRRunTableStyle.HeaderForeColor =
System.Drawing.SystemColors.ControlText
Me.NewEPRRunTableStyle.MappingName = "Table1"
Me.NewEPRRunTableStyle.RowHeadersVisible = False
'
'NameColumn
'
Me.NameColumn.Format = ""
Me.NameColumn.FormatInfo = Nothing
Me.NameColumn.HeaderText = "Facility"
Me.NameColumn.MappingName = "name"
Me.NameColumn.ReadOnly = True
Me.NameColumn.Width = 200
'
'PayerDescColumn
'
Me.PayerDescColumn.Format = ""
Me.PayerDescColumn.FormatInfo = Nothing
Me.PayerDescColumn.HeaderText = "Payer Class"
Me.PayerDescColumn.MappingName = "PayerDesc"
Me.PayerDescColumn.NullText = ""
Me.PayerDescColumn.ReadOnly = True
Me.PayerDescColumn.Width = 130
'
'SourceColumn
'
Me.SourceColumn.Format = ""
Me.SourceColumn.FormatInfo = Nothing
Me.SourceColumn.HeaderText = "Billing Company"
Me.SourceColumn.MappingName = "Source"
Me.SourceColumn.ReadOnly = True
Me.SourceColumn.Width = 87
'
'InputColumn
'
Me.InputColumn.Format = ""
Me.InputColumn.FormatInfo = Nothing
Me.InputColumn.HeaderText = "$/PP"
Me.InputColumn.MappingName = "InputDPP"
Me.InputColumn.NullText = ""
Me.InputColumn.Width = 55
'
'Reached90Column
'
Me.Reached90Column.FalseValue = ""
Me.Reached90Column.HeaderText = "90% ?"
Me.Reached90Column.MappingName = "Marker"
Me.Reached90Column.NullText = ""
Me.Reached90Column.NullValue =
CType(resources.GetObject("Reached90Column.NullVal ue"), Object)
Me.Reached90Column.ReadOnly = True
Me.Reached90Column.TrueValue = "X"
Me.Reached90Column.Width = 63

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

Could you please post the code showing how to define your tablestyle
and bind the grid.

Ken
----------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
The column that is not set to Readonly.

I will edit the value in the datagrid, click onto another cell and the
value
in the cell returns to the old value.

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

What do you mean by writeable column does not update when editing
it?

Ken
------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in
message
news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid
control
(Source below).

I am applying a datatable style onto the datatable that I assign as my
datasource.

All of my column but one are set as readonly=true. The writeable column
does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I
get
the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-



Nov 21 '05 #7
Yes, they are all textboxcolumns...
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:OF**************@tk2msftngp13.phx.gbl...
Hi,

Scott I am really not seeing anything that would prevent the
datagrid from allowing you to edit the data. I do not see where you declare
InputColumn. I assume that is a datagridtextboxcolumn if not the problem
could be in the column style.
Ken
--------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:u%****************@TK2MSFTNGP10.phx.gbl...
My binding....

NewResolveDisplayDataGrid.DataSource =
noAdjudicationYetDataSet.Tables(0).DefaultView
NewResolveEditDataGrid.DataSource =
noAdjudicationYetDataSet.Tables(1).DefaultView

The Table Style
-=-=-=-=-=-=-
'
'NewEPRRunTableStyle
'
Me.NewEPRRunTableStyle.AllowSorting = False
Me.NewEPRRunTableStyle.DataGrid = Me.NewResolveEditDataGrid
Me.NewEPRRunTableStyle.GridColumnStyles.AddRange(N ew
System.Windows.Forms.DataGridColumnStyle() {Me.NameColumn,
Me.PayerDescColumn, Me.SourceColumn, Me.InputColumn, Me.Reached90Column})
Me.NewEPRRunTableStyle.HeaderForeColor =
System.Drawing.SystemColors.ControlText
Me.NewEPRRunTableStyle.MappingName = "Table1"
Me.NewEPRRunTableStyle.RowHeadersVisible = False
'
'NameColumn
'
Me.NameColumn.Format = ""
Me.NameColumn.FormatInfo = Nothing
Me.NameColumn.HeaderText = "Facility"
Me.NameColumn.MappingName = "name"
Me.NameColumn.ReadOnly = True
Me.NameColumn.Width = 200
'
'PayerDescColumn
'
Me.PayerDescColumn.Format = ""
Me.PayerDescColumn.FormatInfo = Nothing
Me.PayerDescColumn.HeaderText = "Payer Class"
Me.PayerDescColumn.MappingName = "PayerDesc"
Me.PayerDescColumn.NullText = ""
Me.PayerDescColumn.ReadOnly = True
Me.PayerDescColumn.Width = 130
'
'SourceColumn
'
Me.SourceColumn.Format = ""
Me.SourceColumn.FormatInfo = Nothing
Me.SourceColumn.HeaderText = "Billing Company"
Me.SourceColumn.MappingName = "Source"
Me.SourceColumn.ReadOnly = True
Me.SourceColumn.Width = 87
'
'InputColumn
'
Me.InputColumn.Format = ""
Me.InputColumn.FormatInfo = Nothing
Me.InputColumn.HeaderText = "$/PP"
Me.InputColumn.MappingName = "InputDPP"
Me.InputColumn.NullText = ""
Me.InputColumn.Width = 55
'
'Reached90Column
'
Me.Reached90Column.FalseValue = ""
Me.Reached90Column.HeaderText = "90% ?"
Me.Reached90Column.MappingName = "Marker"
Me.Reached90Column.NullText = ""
Me.Reached90Column.NullValue =
CType(resources.GetObject("Reached90Column.NullVal ue"), Object)
Me.Reached90Column.ReadOnly = True
Me.Reached90Column.TrueValue = "X"
Me.Reached90Column.Width = 63

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

Could you please post the code showing how to define your tablestyle
and bind the grid.

Ken
----------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
The column that is not set to Readonly.

I will edit the value in the datagrid, click onto another cell and the
value
in the cell returns to the old value.

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

What do you mean by writeable column does not update when editing
it?

Ken
------------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in
message
news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid
control
(Source below).

I am applying a datatable style onto the datatable that I assign as my
datasource.

All of my column but one are set as readonly=true. The writeable column
does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I
get
the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e
As
ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-



Nov 21 '05 #8
Again, figured it out!

I had an Expression on the datacolumn of "0.00". I thought I could just use that for the default value when it is really an
expression that gets evaluated and displayed.

I'm so stupid.

Thanks for the help, guys!

"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message news:OV**************@TK2MSFTNGP15.phx.gbl...
I have a datagrid control that I've inherited from the base datagrid control (Source below).

I am applying a datatable style onto the datatable that I assign as my datasource.

All of my column but one are set as readonly=true. The writeable column does not update when I'm editing it. Is there something
different that I need to be doing to update this data? Also, how do I get the "new row" to not appear at the bottom of the
datagrid?

Thanks

Scott

-=-=-=-=-=-=-=-=- Source -=-=-=-=-=-=-=-=-

Public Class MyDataGrid
Inherits DataGrid

Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler

Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub

Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub

Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub

Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub

Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub

Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class

-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-

Nov 21 '05 #9

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

Similar topics

0
by: cwbp17 | last post by:
Have two tables that have a FK relationship on ID column. Have one datagrid that displays all of the columns of both tables. What's the best approach on updating a row from the datagrid back to...
2
by: Stephan Steiner | last post by:
Hi I'm using several DataTables in my program which are updated periodically. At the same I have those tables bound to DataGrids in my GUI. So far I've been doing all the processing in the same...
2
by: Jim | last post by:
In my Win App, I have a datagrid that's bound to a dataset. When the form loads, the datagrid fills. How can I add an empty row to the end of the datagrid during a button click (similar to...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
13
by: abdoly | last post by:
i wrote a code to update datagrid with the datagrid updatecommand but i cant get the updated values after being update that is the code private void DataGrid1_UpdateCommand(object source,...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
9
by: A P | last post by:
Hi! I have created a sample datagrid that can update data on a database. Please help me solve the problem, I have attached both aspx and code behind (aspx.vb): ______________________ ...
0
by: cwbp17 | last post by:
I'm having trouble updating individual datagrid cells. Have two tables car_master (columns include Car_ID, YEAR,VEHICLE) and car_detail (columns include Car_ID,PRICE,MILEAGE,and BODY);both tables...
0
by: Mike P | last post by:
I'm updating a datagrid which works fine, but after updating the datagrid does not return to 'view' status, remaining in 'edit' status. Has anybody else had this problem? Thanks, Mike
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
0
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...
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.