|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Change style of Edit-button in GridView?I have a GridView with AutoGenerateEditButton="True". Next to it, I've created a delete-button myself (just to take advantage of a messagebox): <Columns> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat=server Text="Delete" CommandName="Delete" OnClientClick="return confirm('Sure?!?')"/> </ItemTemplate> </asp:TemplateField> <asp:BoundField ....> .... </Columns> In my stylesheet I've defined that a link should be blue. In practice: the GridView is shown with the "edit"-button the same color as the gridview-data (black) and the "delete"-button is blue. How can I change the appearance of the edit-button? And a second question: is it possible to get a GridView with the edit-column at the end in stead of at the beginning of all columns? I want to use the AutoGenerateEditButton="True" because it's simple to work with. Please, anyone who can help me with this? Thank you in advance! Jo The solution seems to be setting the "AutogenerateEditButton" to false,
and adding an "Edit,Update,Cancel" CommandField column. Hi,
Thanks for you answer. I did the same and it works fine and as simple as the AutoGenerateEditButton, with more functionality (e.g. to use a button or image in stead of a link) regards, Jo
Adding controls to Pager row in GridView
Templated control not rendering Web User Controls ASP.NET 2.0 equivalent for e.Item.ItemIndex ? stylesheet on ASP.NET 2.0 TreeView and Menu Control using placeholders Display data in asp:Calendar servercontrols (webcontrols, htmlcontrols) or html elements? Updating server side label's value with client side javascript. Gridview and colspan Scroll position in panel control |
|||||||||||||||||||||||