Questions tagged [itemdatabound]
74 questions
26
votes
3 answers
How to access datasource fields in an ASP.NET Repeaters ItemDataBound event?
I have a Repeater control that is being bound to the result of a Linq query.
I want to get the value of one of the datasource's fields in the ItemDataBound event, but I'm not sure how to do this.
Peter
5
votes
1 answer
How to bind repeater ItemDataBound, to update on dropdownlist SelectedIndexChanged
Im a rookie on ASP.Net and been stuck for this for a while.
Everytime the index of my dropdown changes i want to fill my repeater with objects.
This works fine, but when im selecting a value in my dropdown that dosent contain any objects the old…

J.Olsson
- 815
- 3
- 13
- 29
4
votes
1 answer
In DataList ItemdataBound event, how to access by column name instead of by ItemArray index
In the following code, strUsername is always returning as an empty string "" (and so are other columns).
However if I use ItemArray and access it by passing the column index, it works fine. How to access by column name instead of index?
protected…

Michael
- 41
- 1
- 1
- 3
4
votes
2 answers
Avoid reloading all XML data for each repeater - vb.net
I am trying to place a repeater within a repeater using xml data. I have it working exactly as I want, but the method I have used reloads the data for each repeater. I think I need to cast as an XmlNode but I'll be honest - I have no idea where to…

Tom
- 12,776
- 48
- 145
- 240
4
votes
3 answers
Change repeater row value?
im trying to change a value inside my repeater : (via itemdatabound event)
if the year is empty - set value blabla
my repeater :
<%#Eval("year") %>
…

Royi Namir
- 144,742
- 138
- 468
- 792
4
votes
1 answer
Using ItemDataBound I only get every other row. Why?
I am using code like the following to operate on every row in my table after it is bound:
protected void dtlImages_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item)
{
…

Doug Wolfgram
- 2,064
- 4
- 27
- 42
3
votes
5 answers
Formatting the output of certain items bound to Repeater
For example in the backend I'm binding a datable to a repeater and in the front end I'm setting up my repeater as such:
…

PercivalMcGullicuddy
- 5,263
- 9
- 46
- 65
3
votes
1 answer
No overload for 'ItemDataBound' matches delegate 'System.EventHandler'
I have a nested repeater
Because of that no control in my code is visible and because of that I found out that I had to use FindControl to get the controls visible.
I want to pass on a value from a lable after a buttonclick but I'm having a hard…

Sjemmie
- 1,249
- 8
- 26
- 31
3
votes
0 answers
ItemDataBound 'e.item.dataitem("key")' with ListView Control
With the ASP.NET Repeater control, I am used to being able to access my data item values in the ItemDataBound Event Handler by doing:
e.item.dataitem("column_name")
However, it seems with the ListView control this is not possible. How can I access…

Curtis
- 101,612
- 66
- 270
- 352
2
votes
2 answers
C# Calling edit command in ItemDataBound
I'm currently struggling to find the code which I need to call in the if statement in order to find the edit event of a data list.
I am trying to create a blank drop down item on an existing Drop Down List.
Any help would be great! Thanks!
protected…

Callum
- 3,221
- 3
- 19
- 18
2
votes
2 answers
asp.net/vb.net System.Web.UI.WebControls.RepeaterItemEventArgs question
I'm really new to asp.net so please forgive me if this seems like a really basic question. I have an asp.net page that contains a repeater. Here's the code:
…
user10028483
2
votes
2 answers
Find control in DataList HeaderTemplate
QUESTION
How to change the value of a control inside the header template of a DataList based on the value of a DataItem?
I cannot change the value in ListItemType.HeaderItem because I do not know what value to set it too until the ListItem is…

DreamTeK
- 32,537
- 27
- 112
- 171
2
votes
1 answer
ItemDataBound of repeater does not effect SOME OF THE values
I have a repeater and have some labels and a button inside it. Here is my .aspx:
…

Koray Durudogan
- 624
- 4
- 12
- 31
2
votes
1 answer
ListView ItemDataBound - determine if item is AlternatingItem?
I'm using the Listview to display my data. On the ItemDatabound event I want to do some manipulation and change some of the data being displayed. When I check the Item on this event I am using the following code, But I need to know if the item is an…

macou
- 777
- 8
- 21
2
votes
1 answer
Update values of a DropDownList Generated within a Repeater
I've run a search for this but none seem to meet the exact requirement that I'd need. Here's the scenario:
I have a list containing the following: File1, File2, File3, and File4. This list gets bound to a repeater.
Each repeater item contains a…

robertviper08
- 475
- 1
- 4
- 11