title: what is the problem with itemdatabound event in listview?
body: <p>i am getting the following error  during itemdataboundevent of a listview.</p>
  
  <p><strong>Description:</strong> An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.</p>
  
  <p><strong>Compiler Error Message:</strong> CS0030: Cannot convert type 'System.Web.UI.WebControls.ListViewItemType' to 'System.Data.DataRowView'</p>
  
  <p><strong>Source Error:</strong></p>
  
  <pre><code>   Line 91:             CheckBox chk = (CheckBox)e.Item.FindControl("chkFocusArea");
  Line 92:            
  Line 93:             System.Data.DataRowView rowView = (System.Data.DataRowView)e.Item.ItemType; 
  Line 94:             
  Line 95:         }
  </code></pre>
  
  <p>my code behind for itembound event is</p>
  
  <pre><code>protected void lvFocusArea_ItemDataBound(object sender, ListViewItemEventArgs e)
  {
      if (e.Item.ItemType == ListViewItemType.DataItem)
      {
          CheckBox chk = (CheckBox)e.Item.FindControl("chkFocusArea");
  
          System.Data.DataRowView rowView = (System.Data.DataRowView)e.Item.ItemType; 
  
      }
  }
  </code></pre>