C# - Button In A Repeater Does Not Fire ItemCommand

Mar 26, 2010

Why would a button inside a Repeater not fire the Repeater's ItemCommand event? Is there a way to force it to do so? ViewState is Enabled. zn the code below, btnApprove and btnDelete are the buttons in question:

<asp:Repeater runat="server" ID="rpt1" onitemdatabound="rpt1_ItemDataBound" onitemcommand="rpt1_ItemCommand" >
<ItemTemplate>
<table width="100%" style="margin-bottom:6px;">
<tr>
<td>
<asp:CheckBox ID="chkSelected" runat="server" Text=" " TextAlign="Right"/> Select
<asp:Button ID="btnApprove" runat="server" Width="80px" Text="Approve" />
<asp:Button ID="btnDelete" runat="server" Width="80px" Text="Delete" />
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="lblCommentStatus" runat="server" Text="Label"></asp:Label>
</td>
</tr>
</table>
<table width="100%" style="margin-top:6px;">
<tr>
<td><asp:Label ID="lblAuthorName" runat="server" Text="Author: " Width="60px"></asp:Label></td>
<td><asp:TextBox ID="txtAuthorName" runat="server" Width="250px"></asp:TextBox></td>
<td style="padding-left: 30px;"><asp:Label ID="lblAuthorLocation" runat="server" Text="Location: " Width="70px"></asp:Label></td>
<td><asp:TextBox ID="txtAuthorLocation" runat="server" Width="250px"></asp:TextBox></td>
</tr>
</table>
Title: <asp:TextBox ID="txtTitle" runat="server" Width="640px" Enabled="False"></asp:TextBox>
Body: <asp:TextBox ID="txtBody" runat="server" Width="640px" TextMode="MultiLine" Height="60px" Enabled="False"></asp:TextBox>
<table width="100%" style="margin-top:6px;">
<tr>
<td><asp:Label ID="lblVotes" runat="server" Text="Votes: " Width="80px"></asp:Label></td>
<td><asp:Label ID="lblVotesCount" runat="server" Text="" Width="600px"></asp:Label></td>
</tr>
</table>
<hr style="margin-top:20px; margin-bottom:20px;" />
</ItemTemplate>
</asp:Repeater>
/// <summary>
/// Handles the ItemCommand event of the rpt1 control.
/// </summary>
/// <param name="source">The source of the event.</param>
/// <param name="e">The <see cref="System.Web.UI.WebControls.RepeaterCommandEventArgs"/> instance containing the event data.</param>
protected void rpt1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
var c1 = CommentRepository.GetById(Convert.ToUInt64(e.CommandArgument.ToString()));
if (e.CommandName == "approve")
{
c1.Approved = true;
c1.ApprovationUserId = WebAdminContext.RelatedUserId;
}
if (e.CommandName == "reject")
{
c1.Approved = false;
c1.ApprovationUserId = 0;
}
if (e.CommandName == "delete")
{
c1.Deleted = true;
c1.DeletionUserId = WebAdminContext.RelatedUserId;
}
if (e.CommandName == "restore")
{
c1.Deleted = false;
c1.DeletionUserId = 0;
}
CommentRepository.Update(c1);
ResetSubSequenceInfo();
BindList();
}
/// <summary>
/// Binds the list.
/// </summary>
private void BindList()
{
_Criteria = lcb1.GenerateCriteriaFromUI();
var sc1 = CommentRepository.Filter(
new FilteringOptions(
EntityListPager1.CurrentSubSequenceInfo,
null,
CommentRepository.GetCriteriaToFilterByTGID(CurrentEntityGEODEReference.GID).And(_Criteria)
)
);
// BIND
rpt1.DataSource = sc1.Items;
rpt1.DataBind();
EntityListPager1.BindToUI(sc1.Info);
}

View 2 Replies


Similar Messages:

Repeater Doesn't Fire ItemCommand Event

Oct 11, 2010

My repeater is available in a user control and I added the user control as a web part to an existing webpartzone. I could see all rows in the repeater (along with buttons). Once I click the (any) button, it loses all the rows and itemcommand never fires. I am using ASP.NET 4.0

View 1 Replies

C# - ItemCommand Event Doesn't Fire With The Repeater Control?

Feb 21, 2011

I am building a website whereby people, before checking out of the shopping cart (and transferring to the payment iframe) can select which items from the shopping cart list to delete. The results from the shopping card are listed in a Repeater control. There is a Button in the Repeater which deletes a record from the database (used LINQ to SQL to do that.)

THe problem is that the ItemCommand event doesn't fire when i click the button. I tried 'response.write(test)' and it still would not work. It is as if the repeater cannot interact with the commands. It does render the results tho.

Here's the code:

[Code]....

View 2 Replies

C# - ItemCommand Event Doesn't Fire With Repeater Control

Feb 22, 2011

I am building a website whereby people, before checking out of the shopping cart (and transferring to the payment iframe) can select which items from the shopping cart list to delete. The results from the shopping card are listed in a Repeater control. There is a Button in the Repeater which deletes a record from the database (used LINQ to SQL to do that.)

The problem is that the ItemCommand event doesn't fire when i click the button. I tried response.write(test) and it still would not work.

It is as if the repeater cannot interact with the commands. It does render the results though.

[Code]....

View 2 Replies

C# - LinkButtons Created Dynamically In A Repeater Don't Fire ItemCommand Event

Jun 2, 2010

I've got a repeater that's used to display the output of a dynamic report that takes criteria from webcontrols on the page. Within the repeater's ItemDataBound method I'm adding controls (Linkbuttons for sorting by column values) dynamically to the header of the repeater based on values selected in a checkbox list and at this point setting the CommandArgument and CommandName properties of the linkbuttons.

The issue is that when the linkbuttons are clicked they don't fire the ItemCommand event although they are clearly being correctly created and added to the header (there is some additional code to set the cssClass, text etc. and this works as expected.) The first column header in the repeater is set in the markup and the itemcommand event fires correctly on this one only. When the other column headers are clicked the repeater rebinds as programmed, but the columns are not dynamically re-generated.

Nightmare.ascx
<asp:repeater runat="server" id="rptReport" OnItemDataBound="rptResults_ItemDataBound" OnItemCommand="rptResults_ItemCommand" EnableViewState="true">
<headertemplate>
<table>
<tr runat="Server" id="TRDynamicHeader">
<th>
<!-- This one works -->
<asp:Linkbutton runat="server" CommandName="sort" commandArgument='<%# Eval("Name")%?' />
</th>
<!-- additional header cells get added dynamically here -->
</tr>
</headertemplate>
<itemTemplate>
<td><%# Eval("Name")</td>
...
</itemTemplate>
</asp:repeater>
Nightmare.ascx.cs
protected void PageLoad(object sender, eventArgs e){
if (! isPostback){
setupGui();//just binds dropdowns etc. to datasources
}
}
protected void btnRunReport_Click(...){
List<ReportLines> lstRep = GetReportLines();
rptReport.DataSource = lstRep;
repReport.DataBind();
}
protected void rptReport_ItemDataBound (...){
if (e.Item.ItemType == ListItemType.Header)
{
foreach (ListItem li in chbxListBusFuncs.Items)
{
if (li.Selected)
{
th = new HtmlTableCell();
lb = new LinkButton();
lb.CssClass = "SortColHeader";
lb.CommandArgument = li.Text.Replace(" ", "");
lb.CommandName = "sort";
lb.Text = li.Text;
th.Controls.Add(lb);
((HtmlTableRow)e.Item.FindControl("TRDynamicHeader")).Cells.Add(th);
}
}
}
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
//Row level customisations, totals calculations etc.
}
}
<!-- this only gets called when the 'hardcoded' linkbutton in the markup is clicked.
protected void rptReport_ItemCommand(object sender, Eventargs e){
lblDebug.Text = string.Format("Well? What's Happening? -> {0}:{1}", e.CommandName, e.CommandArgument.ToString());
}
(The only thing that can call the runreport routine is a single button on the page, not shown in the code snippet above.)</textarea></p>
<input type='hidden' name='ID[3]' value='82079' />
<input type='hidden' name='URL[3]' value='http://forums.asp.net/t/1472917.aspx' />
<input type='hidden' name='CAT[3]' value='Forms Data Controls' />
<input type='hidden' name='BOARD[3]' value='microsoft' />
<input type='hidden' name='P_DATE[3]' value='Sep 21, 2009 02:16 AM' />
<input type='hidden' name='RANDOM[3]' value='uck4OZUSh' />
<input type='hidden' name='REPLIES[3]' value='6' />
<input type='hidden' name='USER[3]' value='aziz' />
<p><input class=subject type='text' size='90' name='SUBJECT[3]' value='Forms Data Controls :: ValidationGroup causes button not to fire ItemCommand event' /><select name='INDEXED[3]'><option value='1' selected>UPDATE</option><option value='2'>DELETE</option></select>Sep 21, 2009 02:16 AM - Replies: 6 CAT: Forms Data Controls<a target=_blank href="http://forums.asp.net/t/1472917.aspx">View</a></p>
<p> <textarea rows=10 cols=100 name='POST[3]' onfocus='setSelRange(this, 0, 0)'/>

I have a page with a couple of RequiredFieldValidators, each in its own ValidationGroup. One of the RequiredFieldValidator controls is inside a Datalist and the submit button triggers the relevant DataList_ItemCommand. It works just dandy until I add the ValidationGroup to the button, at which point clicking on the button no longer fires the DataList_ItemCommand event. Here is the HTML

[Code]....

Note that the ValidationGroup name is there, and it is unique. No other ValidationGroups exist with that name. As it stands, this code does NOT fire the DataList_ItemCommand event, so no update occurs. However if I remove the ValidationGroup declaration from the Button control, the event fires properly.

Richard</textarea></p>
<input type='hidden' name='ID[4]' value='140242' />
<input type='hidden' name='URL[4]' value='http://forums.asp.net/t/1621410.aspx' />
<input type='hidden' name='CAT[4]' value='Forms Data Controls' />
<input type='hidden' name='BOARD[4]' value='microsoft' />
<input type='hidden' name='P_DATE[4]' value='Nov 09, 2010 10:04 AM' />
<input type='hidden' name='RANDOM[4]' value='5a4W7DeJ4' />
<input type='hidden' name='REPLIES[4]' value='4' />
<input type='hidden' name='USER[4]' value='aziz' />
<p><input class=subject type='text' size='90' name='SUBJECT[4]' value='Forms Data Controls :: update button in repeater footer wont fire event' /><select name='INDEXED[4]'><option value='1' selected>UPDATE</option><option value='2'>DELETE</option></select>Nov 09, 2010 10:04 AM - Replies: 4 CAT: Forms Data Controls<a target=_blank href="http://forums.asp.net/t/1621410.aspx">View</a></p>
<p> <textarea rows=10 cols=100 name='POST[4]' onfocus='setSelRange(this, 0, 0)'/>

i have a repeater with a button in the footer template which i want to be able to update any of the items that are added (update quantites/totals/delete the item). however the 'UpdateOrderDetails' event never fires when the button is clicked. here is the code within the repeater...

<ItemTemplate>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tr>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </table>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FooterTemplate>
the 'updateorderdetails' event in code behind is here
Public Sub UpdateOrderDetails(ByVal s As Object, ByVal e As RepeaterCommandEventArgs)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each objRepeaterItem As RepeaterItem In rptOrderDetails.Items
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select Case objRepeaterItem.ItemType
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case ListItemType.AlternatingItem, ListItemType.Item
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim chkDelete As CheckBox = objRepeaterItem.FindControl("chkDelete")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim hidProduct_Key As HiddenField = objRepeaterItem.FindControl("hidProduct_Key")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim txtQuantity As TextBox = objRepeaterItem.FindControl("txtQuantity")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp; check for deletion or update
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If chkDelete.Checked Then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.Basket.RemoveProduct(hidProduct_Key.Value)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp; check for update
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If IsNumeric(txtQuantity.Text) AndAlso CInt(txtQuantity.Text) >= 0 Then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.Basket.Products(hidProduct_Key.Value).Quantity = txtQuantity.Text
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp; update order details
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BindOrderDetails()
&nbsp;&nbsp;&nbsp; End Sub
but this procedure is never called when the button is clicked, so wondered what i need to do to get this working
</textarea></p>
<input type='hidden' name='ID[5]' value='49574' />
<input type='hidden' name='URL[5]' value='http://forums.asp.net/t/1522852.aspx' />
<input type='hidden' name='CAT[5]' value='Web Forms' />
<input type='hidden' name='BOARD[5]' value='microsoft' />
<input type='hidden' name='P_DATE[5]' value='Feb 07, 2010 06:01 AM' />
<input type='hidden' name='RANDOM[5]' value='OoKSV9VFH' />
<input type='hidden' name='REPLIES[5]' value='3' />
<input type='hidden' name='USER[5]' value='aziz' />
<p><input class=subject type='text' size='90' name='SUBJECT[5]' value='Web Forms :: ItemCommand not get fire of datalist in IE' /><select name='INDEXED[5]'><option value='1' selected>UPDATE</option><option value='2'>DELETE</option></select>Feb 07, 2010 06:01 AM - Replies: 3 CAT: Web Forms<a target=_blank href="http://forums.asp.net/t/1522852.aspx">View</a></p>
<p> <textarea rows=10 cols=100 name='POST[5]' onfocus='setSelRange(this, 0, 0)'/>

I have imagebutton inside datalist.....the problem is that onclick event of serverside not get executed for only IE ..but its work fine for mozzila....i m not getting what wrong in this code.

&nbsp;
aspx code
&nbsp;
<asp:DataList
ID="dlProduct"
runat="server"
CellPadding="5"
CellSpacing="5"
Width="300px"
OnItemCommand="dlProduct_ItemCommand"
>
&nbsp;<ItemTemplate>
&nbsp;<p>
&nbsp;<asp:Label
ID="lblName"
Visible="false"
runat="server"
Text='<%# Bind("ModelName") %>'
CssClass="style1"
>
</asp:Label>
</p>
<p>
<strong><span
class="style1">
MRP : Rs.
<asp:Label
ID="mrp"
runat="server"
Text='<%# Bind("mrp") %>'
CssClass="styles"
>
</asp:Label>
</span>
<br
/>
</strong>
</p>
<p>
<strong>
<span
class="style1">Price : Rs.</span>
<asp:Label
ID="PriceLabel"
runat="server"
Text='<%# Bind("price") %>'
CssClass="style1">
</asp:Label> <br
/> </strong>
</p>
<asp:Label
runat="server"
ID="lblQuantity"
Text=""
Font-Bold="true"
CssClass="style1"></asp:Label>
<asp:Textbox
ID="tbQuantity"
runat="server"
Width="22px"
Text="1"
CssClass="nutext"
Visible="false"
></asp:Textbox>
<img
src="images/buynow_btn.jpg"
width="144"
height="58"
runat="server"
/>
<asp:ImageButton
runat="server"
ID="btnAddToCart"
src="images/addtocart.jpg"
width="144"
height="81"
CommandName="AddToCart"
/>
<asp:Button
runat="server"
ID="Button1"
Text="Add to Cart"
CausesValidation="false"
CommandName="AddToCart"
/>
</ItemTemplate>
</asp:DataList>
CS code
protected void dlProduct_ItemCommand(object source,
DataListCommandEventArgs e)
{
Response.Write("hello");
Response.End();
}

View 1 Replies

Web Forms :: ItemCommand Not Get Fire Of Datalist In IE?

Feb 7, 2010

I have imagebutton inside datalist.....the problem is that onclick event of serverside not get executed for only IE ..but its work fine for mozzila....i m not getting what wrong in this code.aspx code

<asp:DataList
ID="dlProduct"
runat="server"

[code]...

View 3 Replies

Forms Data Controls :: Entire Row Of DataList To Fire ItemCommand - Got It In IE But Not FF

Oct 12, 2010

I have a datalist in my page that has a LinkButton at the beginning of each row that, when clicked, fires the Itemcommand ("select"). There is no issue with this as it works as it should:

[Code]....

But I also thought it would be good if the user could simply click anywhere in the datalist to expand the item and show based on the SelectedItemTemplate. So, I thought, the cleanest would be to add a function in the code behind that adds a click event to the Panel "panItem" that clicks the above mentioned LinkButton like this (fires in Page_PreRender):

[Code]....

Here is where the problem comes in. This works great in IE but not FF3.6 (havent tested it with older version of FF). In FF, I get a JS error saying "dlMapDB_ctl00_btnItemFigNumber is not defined" for the first row, "...ctl01..." for the second row, etc. So the IDs are correct based on the markup (which makes sense since it works in IE).

View 2 Replies

Forms Data Controls :: Update Button In Repeater Footer Won't Fire Event?

Nov 9, 2010

i have a repeater with a button in the footer template which i want to be able to update any of the items that are added (update quantites/totals/delete the item).

however the 'UpdateOrderDetails' event never fires when the button is clicked.

here is the code within the repeater...

<ItemTemplate>
<tr>
<td>
<asp:CheckBox ID="chkDelete" runat="server" />
<asp:HiddenField ID="hidProduct_Key" runat="server" />

[Code].....

but this procedure is never called when the button is clicked, so wondered what i need to do to get this working

View 4 Replies

Forms Data Controls :: Manually Fire A GridView ItemCommand Event?

Mar 19, 2010

I've got a GridView control with LinkButtons in different cells. Currently when someone clicks a link, it fires the ItemCommand passing the CommandName and the ID of the item the link is bound to. That all works fine. I need to modify it now to not use links anymore. It now needs to show a popup balloon with a link (styled to look like a button) and when the link is clicked, I want it to do the exact same thing. I'm sure there are several ways of doing this, but for time's and consistency's sake, I'm copying the method used from another page we have that is already doing this. It has a hidden DIV on the page with the link in it. When you hover over a link, javascript repositions the div and makes it visible.

So what I need to do is pass my CommandName and item ID to the javascript so that it can trigger the postback when they click that single link. I know this is not the only way to get to the end result, but what I want to do if possible, is still fire the GridView's ItemCommand and set he DataListCommandEventArgs' CommandName and CommandArgument properties. Can someone explain how, under normal circumstances, clicking the LinkButton in the GridView fires the ItemCommand? I know that the LinkButton's click event is forwarded to the GridView but what gets sent from the client side that let's the server know the link was clicked?

View 5 Replies

Repeater Not Binding After ItemCommand?

Oct 29, 2010

I have a repeater that is looping a user control, like this:

<asp:Repeater ID="repItems" runat="server" EnableViewState="false"
OnItemCommand="repItems_ItemCommand">
<ItemTemplate>
<dmg:confirmItem runat="server"

[Code]....

All works brilliantly the first time around, the basket items are bound to Basket objects and everything is great.

However, when I receive an ItemCommand from my repeater, and update the basket contents (Note: No adding or removing is done here, just updates the quantity) then I rebind to see the latest values, and BOOM! Null reference - no Basket object in the user control Page_Load. This is despite tracing through to see that the BindItems() method is called as usual, and the Baskets are there.

View 1 Replies

Forms Data Controls :: ItemCommand On Repeater Not Firing?

Aug 14, 2010

The postback occurs, but the event doesn't fire.

[Code]....

View 3 Replies

C# - How To Access ItemTemplate Control From ItemCommand Event Using Repeater

Nov 26, 2010

My repeater:

<asp:Repeater ID="rptrContacts" runat="server" OnItemCommand="rptrContact_ItemCommand" >
<div ID="itemTemplate>
<ItemTemplate>
<%# Eval("Name") %>
<%# Eval("Email") %>
<asp:LinkButton ID="lbtnEditContact" runat="server" CommandName="Edit" Text="Edit" CommandArgument='<%# Eval("ContactID") %>' />
<asp:Label ID="lblUpdateConfirm" runat="server" Text="Update Confirmed" Visible="false" />
</ItemTemplate>
</div>
<div ID="editTemplate runat="server" visibility="false">
Update your Info:<br>
Name: <asp:TextBox ID="txtName" runat="server Text="<%# Eval("Name") %>"/> <br>
Email: <asp:TextBox ID="txtEmail" runat="server Text="<%# Eval("Email") %>"/><br>
<asp:LinkButton ID="lbtnUpdateContact" CommandArgument='<%# Eval("ContactID") %>' CommandName="UpdateContact" runat="server" >Update</asp:LinkButton>
</div>
</asp:Repeater

and code for ItemCommand:

switch(e.CommandName)
{
case "Edit":
//make editTemplate div visible
HtmlGenericControl divEditContact = (HtmlGenericControl)e.Item.FindControl ("divEditContact");
divEditContact.Visible = true;
break;
case "Update":
Employee updateEmployee = new Employee
{
employeeName = txtName.Text:
employeeEmail = txtEmail.Text:
}
updateEmployee = API.UpdateEmployee(updateEmployee);
//display lblUpdateConfirm visible to True
// so user sees this confirm messge in the newly updated ItemTemplate
}

How can I access my lblUpdateConfirm and turn its Text state to visible from inside the ItemCommand, so that when the user sees the newly updated ITemTemplate, the label is showing the "Update Confirmed" message?

View 1 Replies

Forms Data Controls :: How To Avoid Repeater Databind On ItemCommand

Apr 3, 2010

I have a repeater which does quite expensive processing when it is populated. It gets the info from a web service which is itself a federated search service and will take 15 to 20 seconds to return results.

In each repeater item/alternatingitem, i have 3 imagebuttons doing some actions (saving in session some ID's, updating some custom collections...) , the problem is when clicking on one of the buttons, the repeater will trigger the command and then databind again, which takes quite some time to process again..

View 10 Replies

Forms Data Controls :: Switch FormView To Edit Mode From Repeater ItemCommand?

Sep 30, 2010

The following code successfully displays a record in a FormView and sets the FormView mode to 'Edit' when the user clicks on a LinkButton within a Repeater, however the record is not Updated. If I don't change the .SelectCommand and call .DataBind, I'm able to update the first record that is displayed. Naturally that's a moot point because the idea is to be able to update the record that the user selects in the Repeater.Because of the design of the FormView and Repeater, the record *must* be updated via the FormView. Updating the record via the Repeater is not an option.

[Code]....

View 2 Replies

Data Controls :: Handle ItemCommand Event When Loading Event From Repeater From Client Side?

Jan 24, 2016

[URL] how to handle item command event in above  example?

View 1 Replies

Forms Data Controls :: Access Itemcommand Event With Button Outside Formview?

Mar 18, 2010

I have a formview and a few buttons outside the formview. How can i access the formview.itemcommand event if the buttons are not in the formview?

View 9 Replies

Repeater Item Command Won't Fire?

Dec 9, 2010

I have a repeater that is nested within a list view. I bind both and everything works nicely. The problem is that, my repeater has a deleteComment LinkButton which doesn't fire at all!!! I have enabled view state for everything including the page itself. In my code for repeater, my LinkButton Code Looks like this:

<asp:LinkButton ID="lbDeleteComment2" runat="server" CommandArgument='<%# Eval("Id") %>' OnClick="DeleteCommento" Visible="True" EnableViewState="True" CausesValidation="False" CommandName="DeleteCommento" Text="Delete"/>

My problem is that the OnClick Event of lbDeleteComment2 doesn't fire at all. I have been searching for a solution for three days now and no luck.

View 7 Replies

Forms Data Controls :: How To Use Button In Repeater Inside Repeater

Feb 6, 2011

I am using Nested Repeater repeater1 and repeater2 in my project . one button is there inside repeater2 but i cant use that button using e.commandname

so how to use that button and how to write code on it.

View 3 Replies

Forms Data Controls :: Show / Hide A Div In A Nested Repeater By Clicking On A Button Inside Parent Repeater?

Nov 12, 2010

what changed do I need to make to my code for it to achieve what I'm after.

At the moment I am getting a "cannot cast to type" error message with the below code.

I have also tried calling the ItemDataBound method in with the parent repeater tags and had no errors but when I clicked on the button it would just move back to the top of the page and would not hide or show any data. Also I have made the div style to none but the first record still shows its child but the rest don't.

[code].....

View 1 Replies

Forms Data Controls :: Repeater OnItemDataBound Does Not Fire When In MasterPage?

Oct 1, 2010

I have a master page with a user control consisting of a repeater with a SiteMapDataSource. However when doing a post back on a page using the master page, the onitemdatabound event of the repeater in the user control does not fire.

[Code]....

View 5 Replies

Forms Data Controls :: Buttons In Repeater Don't Fire Event?

May 13, 2010

I have an repeater with two buttons. I tried two different ways to make a click event on the two buttons. Neither of the two ways function. They do both the same. No errors but the repeaters content disappear.

My repeater:

[Code]....

As you can see, onbtnForumGroupsDebateListEditDebateAdm I tried to use the repeaters ItemCommand

the code for this here:

[Code]....

Then I tried to do a simple OnCommand instead

The code for this is:

[Code]....

I tried to make a "run to curser" and can see, that I don't get into the functions.

View 5 Replies

How To Show / Hide A Panel Within A Repeater From A Button In The Repeater Itself

Apr 7, 2010

I have set up an asp repeater to go through and display a list of people based on input parameters. Within that repeater I have a repeater that displays specific details about each person. No problem so far.

However, my requirement is that I only display the names, with a plus/minus sign to the left of the name. Clicking on the plus sign will expand that person's information to show the details. Clicking the minus sign will collapse the detail info.

I have a panel set up within my primary repeater that encompasses the secondary repeater.

Here's the beginning of the code:

[Code]....

View 10 Replies

JQuery :: JavaScript Attached To Cancel Button (HTML Button) Click Doesn't Fire

Jun 20, 2010

I have a LoginView element in an Update panel and use JQuery to hide the div containing the update panel when the cancel button(Html) is clicked.

It works fine normally. However, when I enter an invalid password and there is an error message displayed, the Javascript attached to the Cancel button click stops firing.

[code]....

View 2 Replies

How To Fire Confirm Button Extender After Successful Server Side, Button In List View Itemtemplate

Apr 14, 2010

I have read alots of articles from fourms such as belowhttp://forums.asp.net/t/1346690.aspxhttp://forums.asp.net/t/1489818.aspxhttp://forums.asp.net/p/1426153/3189859.aspx#3189859

ScriptManager.RegisterStartupScript(Page, this.GetType(), "notify", "function pageLoad(){$find('confirmdelete')._displayConfirmDialog();}", true)

View 8 Replies

Button Eventhandler Doesn't Fire When Button Disabled With JavaScript?

Apr 9, 2010

standard webcontrol:
<asp:Button ID="cb_btnSubmitData" Text="Submit data" OnClick="SubmitData_Click" runat="server" />
added this in the Page_Load eventhandler
this.cb_btnSubmitData.Attributes.Add("onclick", "addTextToLabel('message', '" + this.cb_btnSubmitData.ClientID + "');return true;");

and this is the javascript that is executed when the button is pressed:

<script type="text/javascript">

View 5 Replies







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