emptydatatext

How to detect that DetailsView displays not a data but EmptyDataText

I have a DetailsView and few buttons on my page. So I want to hide them if DetailsView displays not a data but just a value if EmptyDataText property. How can I do that? I found only one way - view.Rows[0].Cells.Count == 1 because if the data is displayed, more then one columns presents. But I don't like such method. ...

Gridview EmptyDataText="No data" - how to add style to the text 'No data'

Hi, I have a gridview control in my C# program and have just added an 'EmptyDataText' control that (as you know) displays a message if no records were found. When I view this page in design, the 'No data found' text is in times new roman and no style. Is it possible to make this text Verdana and also centre the text rather than it being...

Gridview's 'EmptyDataRowStyle' - unable to align center

Hi, I'm trying to align some text to the center of the page rather than the default left but can't seem to do this using the 'EmptyDataRowStyle' tag. I have an EmptyDataText="No data" tag in my gridview which works. I have changed the style at the bottom of the gridview (as shown below) and the Font-Size="12px" Font-Names="Verdana" tag...

'EmptyDataText' tag in GridView wants to be shown only if data is not found

Hi, I have the following Gridview (which works) and an 'EmptyDataText' tag that should show a message on the screen if the data could not be found from the database after clicking the submit button. The problem is, the message 'no data found' is displayed on the page the moment the page is opened but I want the message to appear only if...

Gridview - align centre the tag 'EmptyDataText' & so it's not default left of page

Hi, I have a gridview control in my c# program. Basically someone enters an email address and the data is then shown in the gridview but if no data could be found with the email address, a message is displayed using the EmptyDataText="no data available" tag but I cannot seem to style the text 'no data available' so it appears in the cen...

Client WCF DataContract has empty/null values from service

I have a simple WCF service that returns the time from the server. I've confirmed that data is being sent by checking with Fiddler. Here's the result object xml that my service sends. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt; <s:Body> <GetTimeResponse xmlns="http://tempuri.org/"&gt; ...

EmptyDataTemplate and EmptyDataText not working in GridView

I can't seem to get either EmptyDataTemplate or EmptyDataText of a GridView to work. I'm fetching the GridView contents in de codebehind and attaching them with using DataBind(). I've tried having them as null and as an empty List, and in both cases the text I put into EmptyDataTemplate or EmptyDataText is not displayed. What am I doin...