Showing posts with label linkbutton. Show all posts
Showing posts with label linkbutton. Show all posts

Wednesday, March 28, 2012

UpdateProgress panel in a Gridview Row

Hi,

I have a linkbutton on gridview row that performs a function related to the row when it is clicked. I am trying to add an updateprogress Panel to each row to allow the user to know somethign is happening when button is clicked. I can not get this to work. in the row template I have the updateprogress panel and tied the event to the buton click on the row and basically all update panels in the rows show up and nothing happens when I click on a button. Does anybody have any ideas how to go about updateprogress in GridView Row?

Thanks,

Mo

Hi ,

From what I understand.

Why do you want dedicated UpdateProgress Panels for each row ? Cant just one Progress panel suffice?

If its a question of letting the user know which row is being updated, go with CSS / setLocation() to set the location of the Updateprogress Panel on the Page upon clicking the button

Thanks,

Phanatic


Hi,

The reason is wht you suggested. I have a progresspanel on top of the page but when a row is updated it may not be visible. I am not familia with CSS/SetLocation. Could you tell me more?

Thanks,

Mo

Monday, March 26, 2012

Updating an UpdatePanel through a LinkButton command generated by a repeater

Hi everybody,

I would like to refresh an update panel when I click on a Linkbutton generated by a repeater that looks like this:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<li>
<asp:LinkButton ID="LinkButton1" runat="server" OnCommand="FilterByPrize" CommandName="filter" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "NameID")%>'>
<%# DataBinder.Eval(Container.DataItem, "Name")%> </asp:LinkButton>
</li>
</ItemTemplate>
</asp:Repeater>
The command called is the following:   
 protected void FilterByPrize(object sender, CommandEventArgs E){string connString ="connstring"; SqlConnection IVR =new SqlConnection(connString);string finalquery ="sqlquery " + E.CommandArgument.ToString() +" order by TimeStamp desc"; SqlDataSource2.SelectCommand = finalquery; SqlDataSource2.DataBind(); userData.DataBind();} 
The problem with this is that it reloads the whole page instead of only the update panel. Is there a way to refresh the updatepanel from a function in the c# code called from a linkbutton?
Thanks

MrClash,

The update panel has an Update() method that will do this. But I'm afraid that you are going to have register the linkbutton with the update panel. Take a look at this thread.

http://forums.asp.net/thread/1703456.aspx

Good luck! And feel free to provide some more details if this doesn't work.
Regards.

Wednesday, March 21, 2012

Urgent | PopupControlExtender

Hi,

I have two UpdatePanels on my web page. and i also have a PopupControl Extender on my page. To simplify UpdatePanel1 has a linkbutton and UpdatePanel2(is inside a panel named "popup") has a label. and PopUpControlExtender is like this.

<cc1:PopupControlExtenderID="PopupControlExtender1"TargetControlID="LnkButton1"PopupControlID="popup"runat="server"></cc1:PopupControlExtender>

I want to show this label as popup when one clicks on LnkButton1. But it gives the following error "An extender can't be in a different UpdatePanel than the control it extends".

How can i achieve the above mentioned?

Thanks

Hi

I had a similar problem with an ModalPopup that was outside of the UpdatePanel that contained my TargetControlID and PopupControlID. What I did is I added the ModalPopup to the update panel.

I guess you could try nesting your UpdatePanel2 into UpdatePanel1.



hi,

Thanks a lot..I moved popUpControlExtender inside panel where my tagetcontrolId also lies, and this worked!!!

thanks a lot

urgent: Modal popup Extender is not closing after validation fires

I have an edit modalpopupextender inside the gridview that appear when linkbutton is clicked all of this inside an update panel and its working great.

when the modalpopupextender popsup i have two buttons "Close" and "Save" button and when the user click on "Close" it closes the modalpopupextender - again its working great.

but the problem isthat, when i click on "Save" button it FIRES validation and in the modalpoupextender i have twocustomvalidation controlsthat validates whether the user have check at least one checkbox or not so when the user hit on "Save" button the validation fires whic is great so far butwhen i clik on "Close" button its not closing my modalpopuextender ?

here is my close button looks like:

<ajaxToolkit:ModalPopupExtender ID="mpePerson" runat="server" TargetControlID="btnHiddenPerson"
PopupControlID="pnlPerson" OkControlID="bModalDialogCancel"CancelControlID="bModalDialogCancel" BackgroundCssClass="modalBackground"
PopupDragHandleControlID="PersonCaption">
</ajaxToolkit:ModalPopupExtender>

<asp:ButtonCausesValidation="false"ID="bModalDialogCancel" runat="server"Text=" Close "ToolTip="Close this window"/>

what is going on here?

You have your OkControlID and your CancelControlID both pointing to the same button ('bModalDialogCancel').

------------------
When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


i fixed myself, i was passing the wrong id.

thanks.