|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagrid Cell LockedHi:
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 On Thu, 26 Aug 2010 07:11:03 -0700, JP...
<J*@discussions.microsoft.com> wrote: >Hi: First wild guess is the data 'structure' has changed and column "5" is> >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? 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>) } --
Show quote
Hide quote
Thanks in advance for any assistance you can give me... JP "ralph" wrote: Thanks..> On Thu, 26 Aug 2010 07:11:03 -0700, JP... > <J*@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: 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 On 8/26/2010 7:11 AM, JP... wrote:
> Hi: Have you seen the data loaded to the grid? Is the grid loading the data > > 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? 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? 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. -- Show quoteHide quoteThanks 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? > > . >
PAUL CLEMENT (MVP) IS A TROLL
Fastest (best) way to Extract Daily Figures VB5 Runtime on Windows 7 Question about control properties Which Tab Control is better: TabStrip or SSTab? Using OutputDebugString too much can cause slowness in GUI response Owned On Vista vbAdvance general dll problem Register ActiveX EXE Send To vs Open With |
|||||||||||||||||||||||