What do we mean by NullDisplayText Property in Gridview?

 Posted by vishalneeraj-24503 on 1/14/2014 | Category: ASP.NET Interview questions | Views: 2782 | Points: 40
Answer:

NullDisplayText as name implies,it display any text in the column,when that column has no record or null or empty records.If the record is Null or Empty,then in such case,we use NullDisplayText property to show user as any user defined text in columns.

We give this property in BoundField as shown below:-

<asp:BoundField HeaderText="LDAP" DataField = "ldap" NullDisplayText="Not Present" />


In above case if employee'LDAP is not found in DB or Null or Empty,then in that case it will show Not Present in Gridview.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response