debug a gridview object like you can with a datatable

Is it possible to debug a gridview object like you can with a datatable. By this I mean adding a watch to the object then see the data visually?

Thnaks for the help.

Answers


Yes you can debug your GridView, you use RowDataBound Event

  <asp:gridview id="GridView1" 
    datasourceid="...." 
    autogeneratecolumns="true"
    onrowdatabound="GridView1_RowDataBound" 
    runat="server">
  </asp:gridview>


void GridView1_RowDataBound(Object sender, GridViewRowEventArgs e)
  {

    if(e.Row.RowType == DataControlRowType.DataRow)
    {
        Console.Write(e.Row.Cells[1].Text);
        .....
    }

  }

Link : http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx


Need Your Help

Is there some way to commit a file “partially” in TortoiseSVN?

svn tortoisesvn

I'd like to commit just a part of a file using TortoiseSVN, is there some way to do that?

Setting a navigation property in addition to select all in linq

c# linq entity-framework

I have a linq query similar to the following that joins with the entity ProductCategories: