Reply to topic
GridVeiw/BoundField Question
eriweb


Joined: 06 Apr 2004
Posts: 68
Reply with quote
Hello All,

I have an application that takes data from SQL server and exports it into MS Excel. One problem I am having is the vendor we are giving this data to do not want the email field to be null, so I wanted to used the NullDisplayText attribute of the BoundField to dynamically pull the id of the current record and concatenate it with the string "@domain.com".

I have been able to use this to add just string but not dynamic content. Can anyone please shed some light on this topic, thanks in advance.
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
Here's what I would do - change the bound field to a template field - it should have a label in there - name that label something like lblEmail.

Then, in the onRowDataBound method of your grid - check the value of your data and do what needs to be done there. Just apply changes to the ((Label)e.Row.FindControl("lblEmail")).Text value and rock & roll.
GridVeiw/BoundField Question
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic