Format a buttoncolumn

Results 1 to 2 of 2

Thread: Format a buttoncolumn

  1. #1
    Join Date
    Dec 1969

    Default Format a buttoncolumn

    Hi all,<BR><BR>How do you format the bound field of a button column?<BR><BR>For example:<BR><BR>Function RemoveQuotes(str As String)<BR> If (str &#060;&#062; "") Then<BR> Return Replace(str, "^", "&#039;")<BR> End If<BR>End Function<BR><BR><BR>&#060;asp:ButtonColumn HeaderText="Posting Category" DataTextField=RemoveQuotes(CategoryName) CommandName="ViewPostingsByCategory"/&#062;<BR><BR>Much appreciated,<BR>David

  2. #2
    Join Date
    Dec 1969

    Default RE: Format a buttoncolumn

    what u have to do.. is call this function when u bind the datagrid.. <BR>Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound<BR><BR>End Sub<BR><BR><BR>in this function u have to go thru every row.. and call your removequotes u dynamically create a Label for every row and insert it in the appropriate column

Posting Permissions

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