CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 6/8/2005 3:43:19 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 100 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
Willgart
Asp.Net User
applying a skin to the CommandField column of a gridview... how?6/8/2005 3:43:19 PM

0/0

Hi,

How can I apply a skin to change the imagebutton generated by the CommandField column in a gridview?

There is any predefined SkinId?
or anything like this?

thanks.
Dave Sussman
Asp.Net User
Re: applying a skin to the CommandField column of a gridview... how?6/9/2005 8:43:42 AM

0/0

You should be able to just add the GridView and CommandField in the skin file. The easiest way is to design them in a standard page and then copy the definition to the skin file.

Dave
Willgart
Asp.Net User
Re: applying a skin to the CommandField column of a gridview... how?6/9/2005 6:39:28 PM

0/0

I have tried this

but this doesn't works!

because the <asp:CommandField> column don't use any specific <XXXStyle> like the <ItemStyle>.
If I put this in the skin file:
<asp:GridView SkinID="CustomIcons"  .....>
<Columns>
<asp:CommandField  CUSTOMIMAGES HERE/>
</Columns>
</asp:GridView>

then all other columns disappear in the grid!!!

The only solution I can apply (but I dislike this) is to convert the column into a templated column, then I can apply a skin for each hyperlink created.
But I dislike this solution.
Dave Sussman
Asp.Net User
Re: applying a skin to the CommandField column of a gridview... how?6/10/2005 8:36:54 AM

0/0

A Theme will overwrite any properties on a page, including child collections. So your columns get overriden by the columns defined in the page. There are two ways around this:

1. Define all of the columns in the skin file
2. Don't use a Theme, but instead use a StyleSheetTheme

The latter works in the same way as a theme but doesn't override existing controls.

Dave

Willgart
Asp.Net User
Re: applying a skin to the CommandField column of a gridview... how?6/10/2005 12:24:05 PM

0/0

Thanks,

but again, this doesn't works :-(
I think there is a missing step anywhere..
my skin file:

<asp:GridView runat="server" >

<HeaderStyle CssClass="HeaderRow" />

<RowStyle CssClass="Row" />

<SelectedRowStyle CssClass="SelectedRow" />

<AlternatingRowStyle CssClass="AlternateRow" />

<Columns>

<asp:CommandField EditImageUrl="~/Images/edit.gif" />

</Columns>

</asp:GridView>

my web.config file :

<pages styleSheetTheme="Default">

</pages>

But I don't see the Edit.gif image, I see the page-defined image.

Dave Sussman
Asp.Net User
Re: applying a skin to the CommandField column of a gridview... how?6/13/2005 8:26:03 AM

0/0

I've just tried this and it works. In my page I have:

<asp:GridView id="gv1" runat="server" DataSourceID="foo">
  <Columns>
    <asp:CommandField showEditButton="true" />
  </Columns>
</asp:GridView>


In my skin file:


<asp:GridVew runat="server" BackColor="...">
  <Columns>
    <asp:CommandField ShowSelectButton="true" />
  </Columns>
</asp:GridView>


The stylesheetTheme is set in web.config like yours. Both the edit and select buttons show up. So for you the correct edit button should show. What have you got in your page?

Dave
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
applying a skin to the CommandField column of a gridview... how ... applying a skin to the CommandField column of a gridview... how? Last post 06-13 -2005 4:26 AM by Dave Sussman. 5 replies. Sort Posts: ...
BoundField theming results in extra empty column - ASP.NET Forums This way you can bind your columns in the aspx page and it gives a constant look , skin, to the grid and you can use this gridview for different data (fields ...
Matt Dotson's .NET Tips & Tricks : Real World GridView: Bulk Editing I've got a gridview where the header is used for column names, ...... Only issue I am facing is that my custom skin is not applying to this grid. ...
Catalog Administration Column command again to add a CommandField. Leave the header text empty, ..... GridView skin, you won’t need to bother with that detail again here. ...
.NET ASP Page 54 - Bytes Site Map NET · Adding a column to a GridView at Runtime and DataFormatString · Access Methods on Page ... barcode · Problem applying skin to custom GridView control ...
Build Your Own ASP.NET 2.0 Web Site Using C# & VB, 2nd Edition ... DataField property, Customizing the GridView Columns; DataGrid, Managing Content .... applying the themes, Applying the Theme; building the master page, ...
Learning ASP.NET 2.0 with AJAX | O'Reilly Media The GridView control displays columns and rows of data and allows sorting and ... When the Fields dialog box opens, click the Command Field entry in the ...
TheMSsForum.com >> Asp >> ClientScriptManager ... One of the columns is to contain a destination path for another process to ... Handling GridView's delete event fired from a CommandField? ...
asp2 0 i added a new row to gridview. in command field it shows edit.in click ...... click on a link in the column of a gridview open a word document + asp.net2.0 ...
Safari Books Online - 0768666783 - ASP.NET 2.0 Unleashed CheckBoxField class · column summaries · CommandField class ... applying dynamically · DynamicTheme.aspx page ... Simple4\Calendar.skin file ...




Search This Site:










filter drop-down in gridview with value from other column.

arithmetic operation resulted in an overflow

database driven menu

file upload validation

integrating devedit

many errors in html file but is still running

refreshing page

doing two things with a button click event

how to show compress image through imagebutton in asp.net?

asp.net 2.0 + validators

product url validation

multiple instance of usercontrol

some questions about uploading files

add a row to table dynamically for each click of add button

help me in gmail smtp!!!

how to access a page level variable from within a class instance

secured downloads?

connecting to win service from webpage

filling up the value of html control textbox

fade out webform

shopping cart gurus..

firefox is not recognizing the asp.net 2.0 post back event - need advice

bizarre post-back behavior

user control into a user webcontrol

[:^)] urgent dynamic user controls not maintaining the state when sent back to server

how do i use a hyperlink on one usercontrol to access a label control on another usercontrol?

how to provide a correct link in a hyperlink control?

open a new broswer window to display a pdf document

strange validation problem

how to unbind data from dropdownlist?

  Privacy | Contact Us
All Times Are GMT