SELECT AS BUTTON AND NOT AS LINK

  • Thread starter Thread starter DENTONE
  • Start date Start date
D

DENTONE

Hello,

If i put GridView1.AutoGenerateSelectButton = true in a gridview i obtain a
link button for selct a row.
But if a want not a link but a Button how i can?

thank's
 
Hi DENTONE,

As for GirdView's Select Button, if you choose "AutoGenerateSelectButton",
it will do all the button generation with default setting(which use
linkbutton). If you need more customization on it, you can use the
"CommandField" instead of "AutoGenerateSelectButton"

#CommandField Class
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.commandfie
ld.aspx

Here is how you can use the "CommandField" to add a select button and
change its buttontype.

=================================
<Columns>
......................

<asp:CommandField ShowSelectButton="True"
ButtonType="Button"/>

</Columns>

</asp:GridView>

====================================

Hope this helps. If there is any further questions, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
Thank's for all
Steven Cheng said:
Hi DENTONE,

As for GirdView's Select Button, if you choose "AutoGenerateSelectButton",
it will do all the button generation with default setting(which use
linkbutton). If you need more customization on it, you can use the
"CommandField" instead of "AutoGenerateSelectButton"

#CommandField Class
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.commandfie
ld.aspx

Here is how you can use the "CommandField" to add a select button and
change its buttontype.

=================================
<Columns>
.....................

<asp:CommandField ShowSelectButton="True"
ButtonType="Button"/>

</Columns>

</asp:GridView>

====================================

Hope this helps. If there is any further questions, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
Thanks for your quick response DENTONE,

I'm glad to be of assistance.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications..
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "DENTONE" <[email protected]>
References: <[email protected]>
 
Back
Top