473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Linkbutton Not Firing RowCommand Gridview UpdatePanel UserControl

55
Hi

I have a problem with my Linkbutton which is not firing the RowCommand of my gridview.

Just for an Idea what I am doing is a follows:

1. WebForm
WebForm hosts UserControl_A.

2. UserControl_A = UpdatePanel + Panels + Gridview1 + CollapsiblePanelExtender
Updatepanel of UserControl_A consists of multiple Panels.
Each Panel consists of a Gridview1.
Upon each Panel expand UserControl_B is loaded.

3. UserControl_B = Details View & a couple of Linkbuttons in GridView2
Upon clicking the Linkbutton, unexpectedly it makes a refresh for the entire UserControl_A.
But it does not fire the RowCommand of its parent GridView2.

Can anyone here please help me with this?
Jun 23 '10 #1
2 15021
Frinavale
9,735 Expert Mod 8TB
It's pretty hard to help you with this problem but my first guess would be that you are doing a DataBind for the GridView in the Page Load event for the GridView.

If you are, move this code to the Page PreRender event instead. When you bind in the Page Load event you lose the user input/action that was performed on the GridView (including click events). You don't have to do a DataBind until the last possible point in the page life cycle...which is why I recommend moving the binding code to the Page PreRender event.

-Frinny
Jun 25 '10 #2
@Frinny: After playing for over 10 hours with a non-working LinkButton you gave me the correct hint!
I moved "this.DataBind();" from Page_Load to Page_PreRender and the LinkButton it's working now.

Thank you so much!
Aug 19 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Solomon Shaffer | last post by:
This is very interesting - and odd. I have a number of LinkButtons that are created in a custom data grid that I created. The purpose of the LinkButtons is to provide alphabetical filtering...
0
by: Giovanni | last post by:
I was wondering if someone would be able to help me with the following: Simply put, I have built an ASP.NET 2.0 WebUserControl (UC1). UC1 contains: A GridView which is bound to an SQLDataSource...
5
by: graphicsxp | last post by:
Hi, I've added a linkbutton field to my gridview. Now I would like that when the user clicks on it for a particular row, a server-side function should be executed, which takes as parameters the id...
1
by: alexmac262 | last post by:
Please forgive as I have never posted to a group before and this is my first attempt at getting help on the internet. Inside an update panel I have a linkButton in a Gridview control template...
1
by: podpi | last post by:
Hello I'm having a bit of a proooblem. I have a gridview which has a checkbox as one of the templatecolumn's. When it is checked, it hides a textbox containing a DateTime templatefield...
1
by: Rissoman | last post by:
Hello, I have an issue were I have a zipcode textbox in an atlas ajax updatepanel. When you tab out of the zip textbox and the shipping is calculated. I know this works perfect! Then a user...
2
by: CJM | last post by:
I have a page that allows the user to search a DB by querying one of 3 fields. When results are returned, I want the user to be able to click a value in one of three columns (that directly relate...
4
by: jack | last post by:
Hi, Consider the following handler: protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e) { GridViewRow row = e.Row; if (row.RowType != DataControlRowType.DataRow)...
9
by: TimVtoo | last post by:
asp VB.NET How can I pass a value to my user controls in the example below From the Master Page?... it's driving me nuts! The scenario: <MasterPage> <UpdateTrigger/> <ContentPlaceHolder...
8
by: Ananthu | last post by:
Hi, I have a gridview in my web page. I have boundcolumn,checkboxcolumn and a linkbutton column. The commandName of the linkbutton column is "Select" The name of the template checkbox is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.