Forms Data Controls :: Change Literal In A Repeater After A Postback?

Jul 9, 2010

I want to change the value of a literal within a repeater ItemTemplate after postback, based on a value detected at postback.I can't render the whole repeater again though I think because it's actually a radio button in the control that inititates the postback and so I need that control / value to be persisted.

View 1 Replies


Similar Messages:

Forms Data Controls :: LinkButton Inside Repeater - Get Value From Literal

Aug 21, 2010

I have Repeater, which consists of LinkButon and Literal. LinkButon and Literal are whole thing by implication. I want get value from Literal, when user click on corresponding LinkButton.

View 3 Replies

Data Controls :: Add Dynamic Items With Literal And Label Controls To Repeater On Button Click

Mar 4, 2013

I have one dropdownlist,one textbox control and one button control.

Now i want to show value in repeater control like this when i click on button.

dropdownvalue1    texboxvalue1

dropdownvalue2    textboxvalue2

dropdownvalue3    textboxvalue3

I need that value in literal controls which is in repeater control.

View 1 Replies

Forms Data Controls :: Getting Repeater's Field Value Without Postback?

Nov 28, 2010

i use div and repeater to show categories for searching part. there is a div. when iclick it, repeater opens and if i select a category its name shows on div. this part is ok. Now i do searcing. so i have to take the span's value(or repeater's value).

View 2 Replies

Forms Data Controls :: Firing Postback From Repeater Row Click?

Jul 19, 2010

I have a repeater which contains a hidden link button that fires when I click a row in my repeater.

Here is the markup for my repeater:

<div id="divResults" style="height: 290px; overflow-y: auto;">
<asp:Label ID="lblNote" runat="server" Text="Note: select a row to edit."></asp:Label> [code]...

Here is the javascript thats added to each row in the rptLocations_ItemDataBound:

Row.Attributes.Add("onclick",
"javascript:__doPostBack('ctl00$mainContent$rptLocations$ctl0" + (e.Item.ItemIndex + 1).ToString() +
"$lbtn_SelectRow','')");

When I click the repeater row it fires the SetLocationControls method. As you can see my repeater is wrapped in a DIV of height 290px. When the are more than 9 rows in my repeater you have to scroll the div down to view this row. When I click this row it does the postback but doesn't fire the SetLocationControls method. I've had a look in the source it's created the click event to the repeater row like all the other rows. why this method isn't firing on the rows that aren't initially visible in my DIV?

View 21 Replies

Forms Data Controls :: Property Of Custom Control In Repeater Is Null On Postback?

Jan 12, 2011

A common problem in repeater controls where you want to display data for update (like a list of user phone numbers that can be updated and submitted back to the database) is where to store the database unique row identifier. So, I created a custom Textbox control that I've added a Data property to. I populate this data property with the unique row id. The problem is that when I post back the list and go through the repeater items the control's data property is null. The custom control looks like this:

[Code]....

The tag in the repeater looks like this:

[Code]....

I have a custom checkbox with the same data property and it works fine. I actually put in the same repeater with the textbox control and the checkbox control have the row id on postback but the textbox did not. Is there some limitation on the textbox control that might be causing this.

View 1 Replies

Forms Data Controls :: Change Row Background Color On Repeater?

Jun 29, 2010

I have repeater and I am using foreach to go through each row, checking for specific value and assigned the label accordingly. However, when there is a value that is not expected, I would like to highlight the whole row on yellow color.

How can I set only for specific row in repeater with different background color?

View 3 Replies

Forms Data Controls :: DropDown Index Change In A Repeater?

Mar 22, 2010

i have a dropdownlist and a textbox in a repeater i need to enable/disable the textbox depending on what was selected in the repeater.

this is the code i have now:

Protected Sub ddlContact_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)

View 4 Replies

Forms Data Controls :: Change Value Of Int Inside Repeater (with Button)?

Feb 16, 2011

i have a repeater that displays data from a SQL Server Database. I also want to display an int from the database for the specific item and allow the user to add 1 to the value of that int by clicking a button (almost like a pole). It would work similiar to a 'like' button on Facebook.e.g.

Name: Bruce Springsteen

Click to like (0 likes)
Name: AC/DC

Click to like (5 likes) [code]....

View 7 Replies

Forms Data Controls :: Change Text Of A Linkbutton In A Repeater?

Mar 17, 2010

I can't change the text of a linkbutton that is placed in a repeater. I want the text to change when I click the button.

[Code]....

</FooterTemplate>

View 4 Replies

Forms Data Controls :: Change Row Color In Mouse Over In Repeater?

Feb 18, 2011

i have a repeater and i want to have chang color row in mouse over.

View 4 Replies

Forms Data Controls :: How To Change A Repeater Hyperlink Text Depending On The ID Of The Item

Feb 25, 2010

I have a repeater control that loads my data ok. I have a hyper link field in my repeater control. It looks like this:

[Code]....

View 3 Replies

Forms Data Controls :: GridViewRow Change After Postback?

Aug 25, 2010

I add gridview row dynamically like that; After page postback some gridrow change and not visible.

protected void grv_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow gvr = e.Row;[code]....

View 4 Replies

Forms Data Controls :: Change Repeater Control Class Depends On Number Of Rows It Contain?

Feb 10, 2011

How can i change repeater control class depends on number of rows it contain?

View 2 Replies

Forms Data Controls :: Change Stored Procedure When Dropdown Item Is Selected And Show Repeater?

Jul 9, 2010

I have one repeater on page which has his own sql data source. I've placed 2 dropdown lists on the page. The repeater has jQuery DataTable plugin. With 2 dropdownlist I wish to change the sql stored procedures so when each will be selected the data in repeater will change. When user select the first there will be only data (users) according to selected item and in the second the same. I wrote 2 simple functions for changing stored procedure of repeater and rebiding it. Everything works but when I try the second one and then the first I always get warning about error "Procedure or function .... has too many arguments specified".

I think that when I select the first one the second function is still called although I don't call it.

[Code]....

View 8 Replies

Forms Data Controls :: Avoid Postback While Change Page No Of Datalist?

Mar 4, 2010

I am using datalist and used custom paging for that but on page index changed there is full postback..because i am sending the values through querystring just have a look to this link

[URL]

i want to remove this postback...

View 9 Replies

Forms Data Controls :: Gridview ItemTemplate Values Change On Postback?

Jan 24, 2011

I have a gridview with a dropdownlist in one to the headers. So on the onselect event of the dropdownlist I want to change the assigned values of itemTemplate values inside one of the columns.

View 1 Replies

Web Forms :: Repeater Losing Data On Postback

Jul 3, 2010

Private Sub UpdateOffensiveStats()

Repeater losing data on postback

View 2 Replies

State Management :: Literal Losing Value On PostBack?

Dec 13, 2010

Never had this happen before. I just upgraded my site from 3.5 to 4.0. Here's the scenario:

1.) I have a literal on a web form, in an UpdatePanel.

2.) On PostBack, the Literal's "Text" property loses it's value. The ViewState is enabled throughout the page. Further, I changed the Literal to a label and it also has this problem. The TextBox's appear to keep their values.

3.) If I remove all of the Ajax controls (which currently is just the UpdatePanel and the ScriptManager) then the Literal control keeps it's value through PostBacks.

4.) There is no client side JavaScript where I'm manually changing the values of these controls. They are only editted in the server side events.

I have read that setting the AutomaticDataBind property in the web.config could remedy this but I can't find any documentation on it and I don't know where to put it in the web.config to even try it.

View 7 Replies

Forms Data Controls :: Access A Control Inside A Repeater Control And Change Its Properties?

Nov 26, 2010

I need to access a control inside a repeater and change its properties. To enable it or not. I got an erorr message Object reference not set to an instance of an object. Here is my code inside a method. protected void

rptCAP_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
LinkButton lnDel = (LinkButton)rptCap.FindControl("lnkDelete");
lnkDel.Enabled = false; //<<<<< this is where the error occur
}

The name of the repeater control is id="rptCAP"

View 3 Replies

Forms Data Controls :: Cannot Set A Literal Text

Mar 12, 2011

I have a literal on page. when user click on a button (OnClick), I set Literal1.Text ="someText"

the page refreshes but the literal not set.

I verify EnableViewstate is true.

View 1 Replies

C# - Repeater Within Repeater (ajax Based Web App) - Cannot Use Any Postback Methods

Jun 23, 2010

For the solution, I cannot use any postback methods, because this is all working through ajax. The solution need to be implemented in the asp.net code. I have a List<WebPage> that contains a list of Links (List<Link>) and I need for all the links to bind repetitive information such as page title, id, url. Here is my current repeater.

<div id="result">
<asp:Repeater runat="server" id="results">
<Itemtemplate>
<asp:Repeater runat="server" datasource='<%# Eval("Links") %>'>
<Itemtemplate>
<tr class="gradeX odd">
<td><%# Eval("Id") %></td> //property of WebPage (part of results repeater)
<td><%# Eval("Title") %></td> //property of WebPage (part of results repeater)
<td><%# Eval("Url") %></td> //property of WebPage (part of results repeater)
<td><%# Eval("URL") %></td>//Property of Link
<td><%# Eval("URLType") %></td> //Property of Link
<td><%# Eval("URLState") %></td> //Property of Link
</tr>
</Itemtemplate>
</asp:Repeater>
</Itemtemplate>
</asp:Repeater>
</div>

of course this doesnt work, how can i do this?

View 2 Replies

Forms Data Controls :: How To Print A Message In Child Repeater If No Data Corresponding To Parent Repeater

May 12, 2010

protected void Page_Load(object sender, EventArgs e)

[Code]....

View 2 Replies

How To Persist The Data From A Repeater After Postback

Jul 1, 2010

I have a repeater that displays financial data and prices for various stocks.

On this page, I also have an "export" button that needs to take the data ~on the screen~ and convert it into a CSV for the user.

The problem is, after I databind my list of "Stock" entities:

List<Stock> stocks = GetStocks()
rptStockList.DataSource = stocks;
rptStockList.DataBind();

The data is not persisted on postback.

Also, the data on this page is constantly being updated via an UpdatePanel and a Timer control (being re-databound each time). Every 30 seconds the prices displayed for the various stocks in the repeater control change.

Now, I have a linkbutton that has a click event method in the code-behind that is supposed to export the ~data on the screen~ for the user. I need to grab the current values for the list of stocks last databound to the repeater. I can't simply go grab the latest values from the database because those will have been changed in the time between the last refresh.

protected void lbtnExportStocks_Click(object sender, EventArgs e)
{
// No longer have the stock data used in the repeater control
ExportStocksToExcel();
}

I know that ASP.NET doesn't persist the datasource for the repeater on post-back but I need to still be able to either re-construct this list of Stock entities so I can send them the CSV or I need persist it in some way.

I don't want to do anything that is too heavy handed in terms of performance because during certain days of the week this application can have some heavy usage.

What is the proper solution to this type of situation? Should I iterate through the Repeater's "Items" collection and reconstruct the Stock entities?

View 4 Replies

Forms Data Controls :: Repeater Inside A Repeater (dataBound) Code Behind?

Jan 31, 2010

got an example of a repeater inside a repeater (dataBound) code behind?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved