Solved

need onrowdatabound/ondatabound string parsing

Posted on 2007-03-27
3
544 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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