DataList versus GridView

G

Guest

I was trying to use a DataList control bound to a business object using an
ObjectDataSource object. But the update event on the ObjectDataSource was
never being triggered. I tried using the same object with a GridView and a
DetailsView - just for testing - and they seem to work just fine. is there
something different about the way a DataList functions? Why wouldn't it
trigger the same event on an update? Thanks.

Jerry
 
G

Guest

And here's something else that's a bit of a pain. It seems that if I don't
display the record ID in the gridview, when the update is called, the value
comes back as 0, so I have no idea what record to update.

I don't want to display the record identity value... How can I force the
GridView to keep track of which record without actually displaying the
identity column? (I already tried adding it to the columns collection but
making it invisible... Stills ends up with a zero value...

Thanks.

Jerry
 
G

Guest

Alright... I just figured out to make the column width 0px... Seems kinda
clunky, but it works.
 
G

Guest

This could really make a person crazy... (Not that I have far to go...)

I had set the column width to 0px and it was working just fine... Now I
deleted some other elements from the page and the identity column is back...
Even though the width is still set to 0px.

How can I make this thing go away. I need to have it in the collection
because I need to be able to reference it when interacting with the DB, but
the user has no need of the identity value and users are easily confused.
(Apparently, so am I...)

Help?

Thanks.

Jerry
 
G

Guest

DataKeyNames... That's the ticket.

I feel like I'm having a conversation with myself, here...
 
T

Terry Burns

Ha Ha, I was just thinking that when I saw all the posts !

;-)

Glad you sorted it out in the end, its so much more rewarding you cure your
own bugs.!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top