We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

problems with click event for ImageButton in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

97597 Dec 15,2010 09:33 AM Apr 9,2012 02:36 AM ASP.NET Web Forms (Classic) 3
loading
Tags: GridGroupingControl
Sorin Rojea
Asked On December 15, 2010 09:33 AM

I'm trying to add a template column that has an asp imagebutton to a gridgroupingcontrol.

The problem is that I don't receive the button's click event on the server side all the time.

The only time I receive the click event is if I click on the button right after a page refresh and only on the first row.
If I change the row selected or if I edit a row, the click event is not fired anymore.

Here is my aspx



AutoFormat="Navy Blue" DataSourceCachingMode="ViewState"
OnTemplateCommand="UserGrid_TemplateCommand"
AutoSaveChildControlChanges="True" BorderCollapse="Separate"
CssClass="GridNavyBlue" DragSelectionBackColor="Yellow" EnableCallbacks="False" PageSize="8"
GroupDropAreaCssClass="GridNavyBlueGroupDropArea" PostBackOnFocusedChanged="true" OnCurrentRecordContextChange="UserGrid_CurrentRecordContextChange">

.....

AllowSort="False" ReadOnly="True">

ImageUrl="~/Gui/Images/UserMRO.gif"
CommandName="MROClick" CommandArgument='<%# Container %>'
ImageAlign="Middle"/>


....

And this is my event handler

protected void UserGrid_TemplateCommand(object sender, TemplateCommandEventArgs args)
{
if (args.CommandName == "MROClick")
{
int userID = int.Parse(args.GridRow.Record.GetValue("UserID").ToString());
}
}


Thanks,
Sorin



Manickam Chidambaram [Syncfusion]
Replied On December 16, 2010 12:14 AM

Hi Sorin,

Thanks for using Syncfusion Products.

We suggest you place the Item Template column “Image button” in
tag, since we are adding more than one submit type image button in the form. Please refer the below code snippet.

[ASPX page]








<%--Adding image button to Grid Column--%>


CommandName="MROClick" CommandArgument='<%# Container %>’ />


. . . . . .







Please refer the following sample link demonstrating image button item template in Grid Grouping control.

Grid_ImageButton-1431356183.zip

Please try the above suggestion and let us know if any concerns.

Regards,
Manickam




Marco Pavan NO LONGER WITH COMPANY
Replied On April 6, 2012 11:32 AM

I've a similar problem with latest bin (10.104.0.44).
If I try your example with these bins it doesn't goes.

With your example I'm trying this:
- I click on image and it fires
- I Group rows
- I click another time on image. It doesn't fire

It seems that after some other external events, if GridGroupingControl is inside an UpdatePanel it doesn't fire Template Command events.


Sridhar N [Syncfusion]
Replied On April 9, 2012 02:36 AM

Hi Marco,

Thanks for your update.

We have analyzed the issue and we have updated about this issue in the incident 93052. Could you please follow up in that incident?

Please let us know if any concerns.

Regards,
Sridhar N




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;