Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0RowCommand event not being firedRowCommand event not being fired
Previous
 
Next
New Post
5/15/2007 7:10 AM
 

Hi Everyone,

I have placed a gridview in my custom control, but am finding that the rowcommand event never gets fired.  Any ideas how to make it work?

Liz Sedley

 
New Post
5/15/2007 8:47 AM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
5/15/2007 9:25 AM
 

Hi.

RowDataBound does work for me, but RowCommand doesn't.

I'm dynamically creating all the columns and rows, so I don't know if that's part of the problem.  But this code does work outside of dotnet.

Here's some snippets of my code:

 

private void CreateButtonField()   ButtonField buttonField = new ButtonField();

   buttonField.ButtonType =

   meetingsGrid.Columns.Add(buttonField);

}

 

{

 

   assignButton.ImageUrl = imagePath;

   assignButton.CommandArgument = rowNumber.ToString();

   assignButton.CommandName = meetingNumber.ToString();

}

private static void InitCommandButton(TableCell editCell, string imagePath)   ImageButton assignButton = (ImageButton)editCell.Controls[0];
ButtonType.Image;

<

asp:GridView ID="meetingsGrid" runat="server" AutoGenerateColumns="False"

 

 

 

OnRowDataBound="meetingsGrid_RowDataBound"OnRowCommand="meetingsGrid_RowCommand">

 

</asp:GridView>

This dynamically creates buttons.  meetingsGrid_RowDataBound is called, but meetingsGrid_RowCommand is never called.

I have these image buttons in multiple columns of my gridview.

 

Any help would be much appreciated.

Liz Sedley

 

{

 

 
New Post
5/15/2007 10:09 AM
 

When the code works outside of DotNetNuke is it on a .aspx page or a .ascx control that is on a .aspx page? I have found inconsistencies due to this.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
5/15/2007 12:03 PM
 

I found the answer!

I just needed to turn page caching off, and now it all works perfectly.

http://blog.scottschecter.net/DNNEventsNotFiringForUnauthenticatedNonAdminUsers.aspx

Thanks for your help.

Liz Sedley

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0RowCommand event not being firedRowCommand event not being fired


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out