By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,696 Members | 1,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,696 IT Pros & Developers. It's quick & easy.

Datagrid not updating problem.

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.