Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Boundfield display value

Reply
Thread Tools

Boundfield display value

 
 
Peter
Guest
Posts: n/a
 
      06-26-2009

Hi

I have a <asp:Boundfield> which returns the value of a datasource field. Can I have the text display something else depending on
the value of the field ? Let's say


Field Contents Display
1 a
2 b
3 c
4 d
5 e

Thanks
Peter


 
Reply With Quote
 
 
 
 
Peter
Guest
Posts: n/a
 
      06-27-2009

Thanks Mark but what's the subsitute for RowDataBound in DetailsView

"Mark Rae [MVP]" <> wrote in message news:...
> "Peter" <> wrote in message news:%...
>
>> I have a <asp:Boundfield> which returns the value of a datasource field. Can I have the text display something else depending on
>> the value of the field?

>
> http://forums.asp.net/p/1190117/2058828.aspx#2058828
> http://msdn.microsoft.com/en-us/libr...databound.aspx
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
 
 
 
Peter
Guest
Posts: n/a
 
      06-27-2009

Thanks Mark.. I got it both in my Gridview and DetailsView. But one last question, in a GridView, I need to use Cells[0], Cells[1],
Cells[3], etc.... to refer to the cell contents in displayed order. .. What if I add or remove a boundfield later on, I need to
chagne the reference number all over the place.. Can I refer to the Field name directly somehow ?

Regards,
Peter


"Mark Rae [MVP]" <> wrote in message news:...
> "Peter" <> wrote in message news:Of36%...
>
> [please don't top-post]
>
>>>> I have a <asp:Boundfield> which returns the value of a datasource field. Can I have the text display something else depending
>>>> on the value of the field?
>>>
>>> http://forums.asp.net/p/1190117/2058828.aspx#2058828
>>> http://msdn.microsoft.com/en-us/libr...databound.aspx

>>
>> Thanks Mark but what's the substitute for RowDataBound in DetailsView

>
> http://msdn.microsoft.com/en-us/libr...emcreated.aspx
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      06-27-2009

Gotcha...that seems to be a pretty good solution.

Thanks again
Peter

"Mark Rae [MVP]" <> wrote in message news:...
> "Peter" <> wrote in message news:...
>
> *** [please don't top-post] ***
> http://www.caliburn.nl/topposting.html
>
>>>>>> I have a <asp:Boundfield> which returns the value of a datasource field. Can I have the text display something else depending
>>>>>> on the value of the field?
>>>>>
>>>>> http://forums.asp.net/p/1190117/2058828.aspx#2058828
>>>>> http://msdn.microsoft.com/en-us/libr...databound.aspx
>>>>
>>>> Thanks Mark but what's the substitute for RowDataBound in DetailsView
>>>
>>> http://msdn.microsoft.com/en-us/libr...emcreated.aspx

>>
>> in a GridView, I need to use Cells[0], Cells[1], Cells[3], etc.... to refer to the cell contents in displayed order. ..

>
> That's correct.
>
>
>> What if I add or remove a bound field later on, I need to change the reference number all over the place..

>
> That's correct.
>
>
>> Can I refer to the Field name directly somehow?

>
> Not directly. You can do something like this:
> http://forums.asp.net/p/1079673/1594202.aspx#1594202
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      06-27-2009


"Mark Rae [MVP]" <> wrote in message news:...
> "Peter" <> wrote in message news:...
>
>> Gotcha...that seems to be a pretty good solution.

>
> http://www.caliburn.nl/topposting.html
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net


Sorry...got use to the replying emails habbit..


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
determine Boundfield Value during rowcommand deletion sjsean ASP .Net 0 02-07-2009 06:21 AM
Getting BoundField value in GridView problem David C ASP .Net 2 01-14-2008 02:50 PM
GridView /// Hiding a BoundField value sloan ASP .Net 3 06-14-2006 07:28 PM
accessing a Boundfield ID field from a gridview in order to update a table with a checkbox value. hazz ASP .Net 0 05-08-2006 03:28 AM
use GridView boundfield value for DropDownList select where clause =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 6 04-03-2006 11:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57