Login    
 
 
 
 
Text/HTML
  
You are here :: Blogs Saturday, May 19, 2012

Search
Note: This uses the internal blog search engine. The Google search engine is also available at the top of the page.
  
Disclaimer

Please review the site disclaimer before downloading or using content found on this site

  
Categories
  
DEVSHED Blog
As always, I welcome your comments!
Mar 8

Written by: Steve Gray
3/8/2011 4:36 PM  RssIcon

ItemDataBound is raised when individual GridItems (rows) are bound to the DataSource, giving you a chance to modify them before they're sent to the client Grid object.

ItemContentCreated is raised whenever a DataCell server template instance is generated, allowing you to customize them one at a time.

itemContentCreated Code Sample:

Code Snippet
  1. Protected Sub grdHolds_ItemContentCreated(ByVal sender As Object, ByVal e As ComponentArt.Web.UI.GridItemContentCreatedEventArgs) Handles grdHolds.ItemContentCreated
  2.  
  3.     'as the grid binds, see if the user has access to edit this type of data
  4.     'show the 'edit' link if they have access
  5.     Dim strHoldType As String
  6.     Dim bShow As Boolean = False
  7.  
  8.     strHoldType = e.Item("vchrHoldType")
  9.  
  10.     'disable the link if the edit page doesnt exist
  11.     If strHoldType = "PRICING" Or strHoldType = "MORTAR" Then
  12.         bShow = False
  13.     End If
  14.  
  15.     Dim lbtnEdit As New LinkButton
  16.     lbtnEdit = e.Content.FindControl("lbtnEdit")
  17.  
  18.     lbtnEdit.Visible = bShow
  19. End Sub

Tags:
Categories:
As always, I welcome your comments!
  
 
 
Home | Products | Blogs | Contact Us | Links | God's Plan
Privacy Statement | Terms Of Use
 
Copyright 2011 by Devshed.us