Questions tagged [itemdatabound]
74 questions
0
votes
2 answers
Get value of certain Page control in an asp:Repeater
On my asp.net page, I have several DropDownLists.
I also have a Repeater.
In the ItemDataBound event I want to get the value of these DropDownLists, to change the data in the Repeater. The SelectedValue of these DropDownLists is empty.
But after the…

Filip
- 1,098
- 5
- 17
- 34
0
votes
1 answer
Set the values to Null if its a 0 on Data Grid asp.net
I have a Data grid that has Item Templates with Labels in it:

Ahmad
- 315
- 4
- 14
0
votes
1 answer
Access previous ListViewDataItem in itemdatabound
Trying to access previous item in listview during itemDatabound but it returns nothing. In fact, lvListview.items.count is showing 0; even though the records are clearly there.
Thank you of course for any help. :)
Protected Sub…

Richard Fox
- 11
- 1
- 5
0
votes
1 answer
Formatting Cells on Gridview from SQL Data Reader
I have a Grid view which populates through my SQL data reader
Grid View:
SQL Data Reader:
SqlCommand cmd = new SqlCommand("SELECT en.dpCreatedDT…

Cory
- 161
- 2
- 13
0
votes
1 answer
How to apply different css classes to asp:panels in different ItemTemplate?
I have a listview and in It's ItemTemplate, a asp:panel which includes some controls.
I need to apply three different css class to the asp:panel, depending on value of one of the controls in my asp:panel.
here's my code:
protected void…

Mahyar Kakaee
- 82
- 1
- 3
- 15
0
votes
2 answers
ASP.NET HiddenField value duplicated in Repeater after postback
I have a Repeater and a Button control. Within the Repeater I have a HiddenField control:

Ash
- 2,108
- 2
- 17
- 22
0
votes
1 answer
Fetch picture from database and bind it to ListView
I'm sorry for this question as I believe it probably is really basic, but I seem to have a lot of trouble with it.
What I'm trying to do is get the picture that I saved in the database and bind it to the ListView I have.
In the Database I don't…

Jack
- 7
- 6
0
votes
1 answer
How to keep a trace of a record inside a nested repeater?
I have the following implementation:
As you can see I have a repeater (listing the Machines) and a nested repeater (listing the WindowsServices inside each Machine). For each Windows Service I can perform an action using a button. However, to…

Amokrane Chentir
- 29,907
- 37
- 114
- 158
0
votes
3 answers
ASP.NET Button click not caught (button in user control which is dynamically loaded in Repeater)
I have written a user control that captures some user input and has a Save button to save it to the DB. I use a repeater to render a number of these controls on the page - imagine a list of multiple choice questions with a Save button by each…

Laurence
- 980
- 12
- 31
0
votes
0 answers
Display four of multiple images of single record
I want to display four of the multiple images of single record.
Like this ...
Img1 img2 img3 some text
img4 img5
This works well in plain html but when i used repeater control or datalist it repeats the like 8 times per record with all the…

melonye
- 71
- 1
- 9
0
votes
4 answers
Listview: So you think you know itemDataBound?
In my webpage i use the following in order filling the listview control
…

OrElse
- 9,709
- 39
- 140
- 253
0
votes
2 answers
chech/uncheck all checkboxes in ListView with onItemDataBound
I have a ListView with pdf thumbnail images created OnItemDataBound. Every thumbnail has a checkbox to select the pages I want to upload. Everything works fine - so far. Now I made another checkbox to select ALL pages an the problem is: If I check…

raven_977
- 475
- 2
- 8
- 25
0
votes
2 answers
Set Dropdownlist value in listview on itemdatabound
i have dropdownlist of year which is coming dynamically.i have filled the dropdownlist using object datasource.on inserting in the listview control it is working fine. but when i click on edit button that dropdownlist value should be set which is…

Samir
- 605
- 3
- 9
- 14
0
votes
1 answer
Repeater itemdatabound event value type and reference type
Im trying to bind a list with datetime objects to my repeater.
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
DateTime actualDate = e.Item.DataItem as DateTime;
…

Sune
- 109
- 1
- 9
0
votes
1 answer
Getting subcontrol in Repeater
I am using ASP.NET and C# on .NET 4 to develop a simple app. I have a repeater with an item template containing a few controls; one of them is a label that must be set depending on a complex calculation. I am using the OnItemDataBound event to…

CesarGon
- 15,099
- 6
- 57
- 85