DataGrid button styles

Results 1 to 2 of 2

Thread: DataGrid button styles

  1. #1
    Join Date
    Dec 1969

    Default DataGrid button styles

    I need to change the style of the buttons (Edit, Update, Cancel) that appear as part of an Edit, Update column within a datagrid web control.<BR><BR>I have tried using the "inline" attributes that are part of the &#060;asp:EditCommandColumn.../&#062; column. However, all the "item%" type attributes only format the table cell and not the actual button control within the table cell.<BR><BR>I would also like to avoid having to write a routine that would loop controls and child controls to set the .CssClass property of each button control.<BR><BR>Its seems like there should be an easy way to do this, but for some reason I am overlooking the solution.<BR><BR>Any help is greatly appreciated!<BR>Scorch

  2. #2
    Join Date
    Dec 1969

    Default RE: DataGrid button styles

    Not sure if this will work, but you&#039;ll probably have to use the OnItemDataBound feature. Do a Dim btnUpdate As Button = CType(e.Item.FindControl("ButtonID"), Button) <BR><BR>Then try something like btnUpdate.CssClass="ClassName".<BR><BR>hth,<BR>Dav id

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts