Solved

need onrowdatabound/ondatabound string parsing

Posted on 2007-03-27
3
539 Views
Last Modified: 2012-05-05
i have a detailsview where I need a row modified ondatabound or on rowdatabound to remove the redundant names:

this is what it appears like on the screen:
employee names:    bob_smith
                                bob_smith
                                karen_jones

the employee_names field from the database comes in as a string with <br> tags in it:

bob_smith<br>bob_smith<br>karen_jones


I want to only have one instance of bob_smith. The data is quite complex so I'd rather attempt this on the detailsview inbound rather than play with the sql...
0
Comment
Question by:acdagirl
3 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 18799260
Hello acdagirl,

Can't you use OnItemCreated event ?

Regards,
mmarinov
0
 

Author Comment

by:acdagirl
ID: 18799631
sure, I guess so... how though? I'm more familiar with the rowdatabound... (p.s. I'm using .net 2.0)
0
 
LVL 1

Accepted Solution

by:
fakir420 earned 500 total points
ID: 18800479
Add property

OnItemDataBound="ItemBound"

then is codebehind create the handler

protected void ItemBound(object sender, DataGridItemEventArgs e)
{
//code
}

This is for a datagrid, but I imagine a DetailsView is much the same.  Just use 'DetailsViewEventArgs' instead of 'DataGridEventArgs' for the type.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question