Bold Text In Datgrid Row If strResult="Purchased"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan

    Bold Text In Datgrid Row If strResult="Purchased"

    What code would I need to add below to make the text in datagrid rows bold
    when the value of one of the fields, "strResult" equals "Purchased" ?

    Function bolPopulateData Grid() as Boolean

    Dim oConn As OleDbConnection
    Dim oComm As OleDbDataAdapte r
    Dim sConn As String
    Dim sComm As String
    Dim oDataSet As New DataSet

    'Build the connection string
    sConn = "Provider=Micro soft.Jet.OLEDB. 4.0;"
    sConn += "Data Source=D:\inetp ub\www\myweb\fp db\db.mdb;"
    sConn += "Persist Security Info=False"

    'Build the SQL string
    sComm = "SELECT qryDataGrid01.* "
    sComm += "FROM qryDataGrid01;"


    'Create the connection and command objects
    oConn = New OleDbConnection (sConn)
    oComm = New OleDbDataAdapte r(sComm, oConn)

    'Fill the dataset with the results of the query
    oComm.Fill(oDat aSet, sComm )

    'Set the grid source to the dataset and bind the data
    oGrid.DataSourc e=oDataSet.Tabl es(sComm).Defau ltView
    oGrid.DataBind( )

    End Function



  • Mark Rae [MVP]

    #2
    Re: Bold Text In Datgrid Row If strResult=&quot ;Purchased&quot ;

    "Jonathan" <none@none.comw rote in message
    news:%23PvMlwBi IHA.4744@TK2MSF TNGP06.phx.gbl. ..

    [top-posting corrected]
    >Also, is there any reason that you're using a DataGrid rather than a
    >GridView? Are you still using ASP.NET v1.1...?
    >
    My ISP is using .Net 1.1.
    Wow! Sounds like it's time to find a proper ISP...
    I can't add an event with a click because I am using Frontpage.
    Hmm - you could have mentioned that in your original post, this being an
    ASP.NET newsgroup...
    Do you know what the event code for ItemDataBound would be? I'd have to
    type
    it in directly.
    No idea - what did they tell you in the FrontPage newsgroup...?


    --
    Mark Rae
    ASP.NET MVP


    Comment

    Working...