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

Editing the cell in Listview

P: 48
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
Share this Question
Share on Google+
12 Replies


missinglinq
Expert 2.5K+
P: 3,532
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

P: 48
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
Expert 5K+
P: 8,597
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

P: 48
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
Expert 2.5K+
P: 3,532
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

P: 48
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

P: 48
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

P: 48
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
Expert 2.5K+
P: 3,532
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

P: 48
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
Expert 2.5K+
P: 3,532
@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

P: 48
@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

Post your reply

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