Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

RowCommand Event only fires for the first row in GridView

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chad Scharf - 12 Oct 2007 00:15 GMT
I have a gridview control with one column. In that column are an
ItemTemplate and EditItemTemplate. The gridview is bound to an
ObjectDataSource using the DataSourceID property. I am not doing anything
special in the databinding event and the templates use basic framework
controls with either <%# Eval("property") %> or <%# Bind("property") %> in
the EditItemTemplate.

When there is more than one item bound to the gridview, any row other than
first one will not fire the RowCommand event unless I click each command
button twice. Upon the second click, the event will fire, but not the first.
When in edit mode (after 2 clicks on a button with CommandName="Edit") in a
row other than the first, when I click a button with CommandName="Update",
the page posts back, no events are fired and then all the fields in the edit
control are blank.

Any help with this would be greatly appreciated.

Regards,
Chad Scharf
JIGNESH - 12 Oct 2007 09:11 GMT
Hi Chad Scharf,

Could you pls check and let me know if code written in Page_load event is
within "IF NOT Page.ISPostBack" block.  

If not  add it and let me know the result.  mostly it should solve.

Regards
JIGNESH

> I have a gridview control with one column. In that column are an
> ItemTemplate and EditItemTemplate. The gridview is bound to an
[quoted text clipped - 15 lines]
> Regards,
> Chad Scharf
Chad Scharf - 15 Oct 2007 16:56 GMT
Any ideas out there?

>I have a gridview control with one column. In that column are an
>ItemTemplate and EditItemTemplate. The gridview is bound to an
[quoted text clipped - 15 lines]
> Regards,
> Chad Scharf
Chad Scharf - 15 Oct 2007 17:20 GMT
OK, just an update. I've narrowed the problem down to the Infragistics Web
Data Input controls in the <ItemTemplate>. When I comment them out,
everything works as expected. I guess I need to move this thread to
Infragistics support forums, unless anyone here may know what's going on.

Thanks,
Chad

> Any ideas out there?
>
[quoted text clipped - 17 lines]
>> Regards,
>> Chad Scharf

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.