Recent Posts
Calendar
May 2013
S M T W T F S
« Apr    
 1234
567891011
12131415161718
19202122232425
262728293031  

Posts Tagged ‘databound’

Sharing ObjectDataSource From Codebehind

A04C0035

I ran into an interesting “problem” last week that wasn’t all that hard to figure out once I broke out the debugger.  But I thought it would be useful to share the results to save others the time.

The situation was that I had an Object Data Source in a FormView that I wanted to share with both a DataGrid in the FormView and a DataRepeater outside of the FormView.  Since it was in the FormView, the DataRepeater couldn’t see it.

So it seemed reasonable to me that if I could just trap the right event in the FormView I could assign the DataSource of the GridView to the DataSource of the Repeater, rebind the Repeater and we’d be on our way.

It wasn’t quite that simple.

Read the rest of this entry »

Republished by Blog Post Promoter

Access a control by ID From Within a Databound Control

back-041

Databound controls are at once very easy and very frustrating.  If you just need to do some simple databinding that gets a list of items on the screen and you need the ability to edit those items, you are all set.

But once you need to do anything that deviates from that simple pattern, you are kind of stuck.  One of the problems involves accessing a control in a templated item.

Read the rest of this entry »

Bear