[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

JP

8/26/2010 2:11:00 PM

Hi:

I have developed an app that has sevearl data grids on different forms. They
all were working. One grid has several columns with most locked and the
operator can only change the data in one column. (that one column is not
"locked"). The form has worked for weeks, but now (I don't know why), the
operator cannot enter the cell...it is as if the cell is locked. I have gone
to the grid (in the developement environment) and insured that the column is
not locked. I have also added a line of programming to the refresh action:

"me.grddaily.columns(5).locked = False"

This does not work either. any ideas or suggestions?

--
Thanks in advance for any assistance you can give me...

JP
4 Answers

ralph

8/26/2010 4:49:00 PM

0

On Thu, 26 Aug 2010 07:11:03 -0700, JP...
<JP@discussions.microsoft.com> wrote:

>Hi:
>
>I have developed an app that has sevearl data grids on different forms. They
>all were working. One grid has several columns with most locked and the
>operator can only change the data in one column. (that one column is not
>"locked"). The form has worked for weeks, but now (I don't know why), the
>operator cannot enter the cell...it is as if the cell is locked. I have gone
>to the grid (in the developement environment) and insured that the column is
>not locked. I have also added a line of programming to the refresh action:
>
>"me.grddaily.columns(5).locked = False"
>
>This does not work either. any ideas or suggestions?

First wild guess is the data 'structure' has changed and column "5" is
no longer what you think it is.
But I'm assuming if the user can now enter data in another column or
has more or less columns that he should have, or data is appearing
under the wrong column - you would have been told.

Really need more information:
This is the MS DataGrid Control 6.0? Correct?
How are you setting up the Grid initially? Through design-time
properties or through code?
How are you populating the Grid? ADODC? ADO direct? Data Binding?
Using the Data Environment?
Have you made sure your data and the User's data are the same
structure?

-ralph
{Sidenote:
There is nothing generally wrong with using a reference to the
inherent control, or in using 'indexes' (indexes are a bit faster).
me.grddaily.Columns(x).Value
but I prefer to create a separate reference object as in ...
Dim col As MSDataGridLib.Column
Set col = MSDataGridLib.Column("FieldOfInterest")
sStr = col.Value
col.Locked = False
...
This provides flexibility if the structure changes, and controls the
lifecycle of an object. (You are always chewing on what you think your
are. <g>)
}

JP

8/26/2010 8:45:00 PM

0


--
Thanks in advance for any assistance you can give me...

JP


"ralph" wrote:

> On Thu, 26 Aug 2010 07:11:03 -0700, JP...
> <JP@discussions.microsoft.com> wrote:
>
> >Hi:
> >
> >I have developed an app that has sevearl data grids on different forms. They
> >all were working. One grid has several columns with most locked and the
> >operator can only change the data in one column. (that one column is not
> >"locked"). The form has worked for weeks, but now (I don't know why), the
> >operator cannot enter the cell...it is as if the cell is locked. I have gone
> >to the grid (in the developement environment) and insured that the column is
> >not locked. I have also added a line of programming to the refresh action:
> >
> >"me.grddaily.columns(5).locked = False"
> >
> >This does not work either. any ideas or suggestions?
>
> First wild guess is the data 'structure' has changed and column "5" is
> no longer what you think it is.
> But I'm assuming if the user can now enter data in another column or
> has more or less columns that he should have, or data is appearing
> under the wrong column - you would have been told.
>
> Really need more information:
> This is the MS DataGrid Control 6.0? Correct?
> How are you setting up the Grid initially? Through design-time
> properties or through code?
> How are you populating the Grid? ADODC? ADO direct? Data Binding?
> Using the Data Environment?
> Have you made sure your data and the User's data are the same
> structure?
>
> -ralph
> {Sidenote:
> There is nothing generally wrong with using a reference to the
> inherent control, or in using 'indexes' (indexes are a bit faster).
> me.grddaily.Columns(x).Value
> but I prefer to create a separate reference object as in ...
> Dim col As MSDataGridLib.Column
> Set col = MSDataGridLib.Column("FieldOfInterest")
> sStr = col.Value
> col.Locked = False
> ...
> This provides flexibility if the structure changes, and controls the
> lifecycle of an object. (You are always chewing on what you think your
> are. <g>)
> }
> .
>
Ralph:

Thanks..

Yes, it is the DataGrid in VB 6.0
I set up the grid initially at design time by doing the "right click" and
using "properties"...then set up each column.
I'm using the ADODC to populate the grid...I use an SQL from an Access 2000
database...the give the data control the connection string, the recordsource,
and then refresh it...the data populates to the grid.

The data changes each time that the database is querried...but the fields,
structure, etc always remains the same. And there is a unique field in each
record so that there is no ambiguity.

Just don't understand it...the program was working fine for about a month,
and then (all of a sudden) it quit... : 0)...mystery of mysteries

Mike Scirocco

8/27/2010 12:16:00 AM

0

On 8/26/2010 7:11 AM, JP... wrote:
> Hi:
>
> I have developed an app that has sevearl data grids on different forms. They
> all were working. One grid has several columns with most locked and the
> operator can only change the data in one column. (that one column is not
> "locked"). The form has worked for weeks, but now (I don't know why), the
> operator cannot enter the cell...it is as if the cell is locked. I have gone
> to the grid (in the developement environment) and insured that the column is
> not locked. I have also added a line of programming to the refresh action:
>
> "me.grddaily.columns(5).locked = False"
>
> This does not work either. any ideas or suggestions?

Have you seen the data loaded to the grid? Is the grid loading the data
to the columns you expect it to, so you know the code is working the way
you want, and so you know the database is being read correctly and not
corrupted?

have you tried adding code that fires when the grid is clicked, when the
user tries to change the data, etc., reading the contents and properties
of the cell or column? Just to see if everything is working the way you
expect, and to see if any of the properties have somehow changed?

JP

8/27/2010 5:12:00 PM

0

Yes...thanks for the reply.

We have used the grid for about 14 days...it was working correctly..no
problem. there are other columns in the grid that are locked, but have a
button. The button fires the expected code...and enters the data in the
columns as expected.... When saved, the data is correct. The only column not
working right is this one column.

--
Thanks in advance for any assistance you can give me...

JP


"Mike S" wrote:

> On 8/26/2010 7:11 AM, JP... wrote:
> > Hi:
> >
> > I have developed an app that has sevearl data grids on different forms. They
> > all were working. One grid has several columns with most locked and the
> > operator can only change the data in one column. (that one column is not
> > "locked"). The form has worked for weeks, but now (I don't know why), the
> > operator cannot enter the cell...it is as if the cell is locked. I have gone
> > to the grid (in the developement environment) and insured that the column is
> > not locked. I have also added a line of programming to the refresh action:
> >
> > "me.grddaily.columns(5).locked = False"
> >
> > This does not work either. any ideas or suggestions?
>
> Have you seen the data loaded to the grid? Is the grid loading the data
> to the columns you expect it to, so you know the code is working the way
> you want, and so you know the database is being read correctly and not
> corrupted?
>
> have you tried adding code that fires when the grid is clicked, when the
> user tries to change the data, etc., reading the contents and properties
> of the cell or column? Just to see if everything is working the way you
> expect, and to see if any of the properties have somehow changed?
>
> .
>