How to set Gridview DataKeyNames Property Graphically

H

hon123456

Dear all,

When I run a Website with a GridView, it saids that I need
to set the data key. And ask
me to use DataKeyNames property to set the key. I don't want to type
the code Mannully. How can I do that using the Smart Tag and
graphically. Thanks.
 
C

Coskun Sunali [MVP]

Hi,

I am not sure if you can do that by using the Smart Tags. Smart Tags are
"usually" there to be used for the initial setup of the control or only if
there are "designer" controls for the control. However, DataKeyNames is just
a property which is type of string. You can press F4 button after selecting
the control on the page, this should open the "Properties" window and you
can set the value of this property there.
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top