DetailsView Data Evaluation

Last post 02-27-2007 10:27 AM by camper. 0 replies.

Sort Posts:

  • DetailsView Data Evaluation

    02-27-2007, 10:27 AM
    • Loading...
    • camper
    • Joined on 04-28-2006, 8:48 AM
    • Posts 74

    Hi,

    I have a detailsview with about 30 rows. the view has 2 columns. In the 2nd column is the result yes or no. I just want to show ,i.e make visible the results that are ='Yes' and hode the "No" results. My idea was to loop through the rows and make visible the 'yes' results.I am not having much luck at evaluating the data, is there a way of using the FindControl to loop through. Could anybody help here please.

    protected void Selection(object sender, EventArgs e)

    {

    DetailsView dv = (DetailsView) sender

    if (DetailsView.Rows[0].Cells[1].Text == "YES")

    { dv.Rows.[0].ForeColor = Color.White}         //hides row

     // but I have 30 rows? , and this does not seem to work

    (An object reference is required for the nonstatic field, method, or property System.Web.UI.WebControls.DetailsView.Rows.get???)

    thanks.

     

     

     

     

    Filed under: , , ,
Page 1 of 1 (1 items)
Microsoft Communities
Page view counter