473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Editing the cell in Listview

48 New Member
Hello,

I am back and got a new question.

I have various data to be displayed in a table.
I think a listview will do. I want to edit the value
of a certain cell (column,row). The process is done by
clicking the cell first then edit.

Is this possible?

I searched the net but there's nothing yet for MS Access.

Help is greatly appreciated.
Nov 14 '08 #1
12 8857
missinglinq
3,532 Recognized Expert Specialist
I think the first thing to address here is why you feel the need to display your data using ListView, which is an ActiveX control, rather than simply using something native to Access, such as a form or a ListBox? The use of ActiveX controls are fraught with version problems and should be avoided unless absolutely nothing else will work for the task at hand.

Linq ;0)>
Nov 14 '08 #2
keirnus
48 New Member
I think the first thing to address here is why you feel the need to display your data using ListView, which is an ActiveX control, rather than simply using something native to Access, such as a form or a ListBox?
Thanks for your reply, missinglinq.

I thought of ListView control because it is the best control that i have used
that can display well a list of data.

I am not actually sure if the ListView control is best for what I needed.
I know there are other controls that suit my needs. I will explain further.

I have data which needs to be displayed in a list. Must have vertical and
horizontal scrollbars to maintain the size of the screen no matter how many
data are there in the list. Then, I need to edit the displayed data right then
and there. What I mean is when I click a certain cell in the list, (for example)
a textbox appears for the user to edit the data. The user is done editing when
(for example) the focus is somewhere else already.

I think the ListBox cannot do it..same as ListView.
I researched last time and stumbled on DataGrid and Flexgrid.
But when I checked the References, there aren't any.

Based from the logic I just stated above, what is the best control to be used?
And if it's DataGrid or FlexGrid, how can I register them in my MS Access 2003?
Nov 16 '08 #3
ADezii
8,834 Recognized Expert Expert
Thanks for your reply, missinglinq.

I thought of ListView control because it is the best control that i have used
that can display well a list of data.

I am not actually sure if the ListView control is best for what I needed.
I know there are other controls that suit my needs. I will explain further.

I have data which needs to be displayed in a list. Must have vertical and
horizontal scrollbars to maintain the size of the screen no matter how many
data are there in the list. Then, I need to edit the displayed data right then
and there. What I mean is when I click a certain cell in the list, (for example)
a textbox appears for the user to edit the data. The user is done editing when
(for example) the focus is somewhere else already.

I think the ListBox cannot do it..same as ListView.
I researched last time and stumbled on DataGrid and Flexgrid.
But when I checked the References, there aren't any.

Based from the logic I just stated above, what is the best control to be used?
And if it's DataGrid or FlexGrid, how can I register them in my MS Access 2003?
I think that you may be over complicating matters here. Wouldn't a Form in Datasheet View accomplish exactly what you are requesting, and as indicated by linq, it is functionality native to Access.
Nov 17 '08 #4
keirnus
48 New Member
You are definitely right.
(That's why forums like this exist for "us" to know the better ways in Access)

I am testing the Datasheet functionality and it worked well.
I enabled Locked to columns which are uneditable.

Currently, the user can't determine which one is editable
and which is not. I tried changing the backcolor but it only
applies to Form View..not in Datasheet view.

Might add notice in the bottom stating the editable columns instead.

Anyway, the Datasheet can already suit my needs.

Thanks to missinglinq and ADezii.
Nov 17 '08 #5
missinglinq
3,532 Recognized Expert Specialist
Actually, you can use Conditional Formatting to to color your locked columns!

In Design View

Select the field in question

Goto the menu Format - Conditional Formatting

Select

Expression Is:

Enter

YourFieldName].Locked

replacing YourFieldName with your actual name.

Select whatever colors you want

Press OK.

Repeat this for all locked columns.

Linq ;0)>
Nov 17 '08 #6
keirnus
48 New Member
Actually, you can use Conditional Formatting to to color your locked columns!

In Design View

Select the field in question

Goto the menu Format - Conditional Formatting

Select

Expression Is:

Enter

YourFieldName].Locked

replacing YourFieldName with your actual name.

Select whatever colors you want

Press OK.

Repeat this for all locked columns.

Linq ;0)>
Oh, it works! =)

Can now change colors on selected column.

Eventhough there's a delay in color-change,
thanks missinglinq.
Nov 17 '08 #7
keirnus
48 New Member
Hello missinglinq,


I am now using the Datasheet.
I can edit data which are unlocked columns
and cannot edit to those which are locked.

But the user can add new row data in the bottom part.
How to disable this?

Hope you could still help me on this.
Nov 17 '08 #8
keirnus
48 New Member
But the user can add new row data in the bottom part.
How to disable this?
Already found the solution on this problem.
Simply set the AllowAdditions property. =)
Nov 17 '08 #9
missinglinq
3,532 Recognized Expert Specialist
Always better when you can solve the problem yourself! It's always good to see someone who actually tries to solve the problem, both before and after posting it here!

And yes, Conditional Formatting sometimes takes a split second to kick in, depending on the condition used. Never have really understood why.

Linq ;0)>
Nov 17 '08 #10
keirnus
48 New Member
Hello,

I wanted to open this topic again.

I was able to use datasheet on this matter.
Changing data would immediately change the DB data.
But it was said in my research in the net that it is not advisable
to directly change the DB data.

I was thinking of using the Listview control again.
But it seems to be difficult. Some pipz in other forums
say that it is possible but difficult and has limitations.

What I really want to happen is simply click a cell
in a list of data and edit the data in the selected cell.
There are checking when editing the data.

Can anyone help me point to the light?

Hope someone could help me on this.


-keirnus-
Feb 3 '09 #11
missinglinq
3,532 Recognized Expert Specialist
@keirnus
I'm not sure exactly what you mean by this! Editing data in a form in Datasheet View is certainly not "inadvisable!" It's done successfully every day! The only inadvisable way to enter data is directly into a table, which looks like a form in Datasheet View, but is not the same thing at all!

Linq ;0)<
Feb 3 '09 #12
keirnus
48 New Member
@missinglinq
They're not the same? hmmm...
I'm sorry if I was wrong...hehehe.

When I input/edit data in Datasheet View, data in DB is immediately modified. Any data I input/edit (alpha, numeric, special chars) are immediately set in DB. When the focus is not in the Datasheet, the
data is considered immediately as final inputted data.

Is there a way to make error-checking?
Like any data not alphanumeric will display error msg and will not immediately set the data to DB.
Feb 3 '09 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: andrewcw | last post by:
I have a simple winform with the following code. But although I can read back the info, the display fails to provide the text or the cell background color changes. private void ListViewBroke()...
1
by: andrewcw | last post by:
How is it ( or can I ) make each subitem reflect the background color ? In my case the first color is applied across the row - even though I can read the values back out correctly ? Thanks !...
1
by: redneon | last post by:
Is it possible to get the Handle property for a particular cell in a ListView? I'm wanting to turn a cell into a progress bar rather than just displaying text. If it's possible to get the Handle I...
1
by: Blake Versiga | last post by:
When editing a datagrid (C#) I need to know if the user changed the value of cell AND what the previous value was. Is this possible? If so how do I get the previous value or at least if the...
3
by: Jerry Spence1 | last post by:
Does anyone have any code for floating a textbox or combo over a cell in ListView to simulate a cell edit function? Thanks -Jerry
1
by: Lonewolf | last post by:
hi all, just want to find out if it is possible to set the gridline of individual cell in a listview using C#. Reason for this is I need to have a listview which has fixed number of columns and...
5
by: Sharon | last post by:
I have a DataGrid on my Form, and I wish to disable any cell editing. For example; when the user clicks on a cell, the cell become editable by changing its color to gray and context menu is shown...
2
by: tungchau81 | last post by:
Hi, I need to write a table that allows in-place editing of the content of a cell whenever a mouse button is pressed inside the cell like Google Spreadsheet at http://spreadsheets.google.com....
0
by: G.G. | last post by:
Hi to all, I have a vb.net form with a listview in "details" mode. I want to click each cell of each listview item so I can show a window that modifies some properties of the cell object. I've...
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
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...
0
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,...
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...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.