How to set Gridview DataKeyNames Property Graphically

  • Thread starter Thread starter hon123456
  • Start date Start date
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.
 
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

Back
Top