|
Queries |
Response | |
|
“I have a grid from which I have subscribed to ServerCommandButtonClick and ServerRecordClick events. In this case only the ServerRecordClick event fires”
|
We checked the attached sample and we can reproduce the mentioned behavior in the attached sample.
To fire the ServerCommandButtonClick event, we suggest you to define args.cancel as true in client-side recordClick event.
In attached sample we bound client-side click event for commandButton and recordClick. When we click on commandButton we set flag variable as false and if flag variable as false then we define args.cancel as true in recordClick event. So, the ServerRecordClick event does not fire.
Find the code example:
| |
|
“Also for the cells displayed as checkboxes clicking on the checkbox does not cause the ServerRecordClick event to fire.”
|
We checked in our sample by defining the checkbox column and we check on checkbox column the ServerRecordClick event is fired. So, we unable to reproduce the mentioned issue at our end.
Find the code example:
To find out the root cause, we need the following details,
1. Have you used template column in Grid to define the checkboxes?
2. Have you faced any script error in your sample? If yes, Share the stackrace and screenshot of an issue.
3. Share the code example of a Grid.
| |
|
“I also have a dialog control which should display when the ServerRecordClick event fires but does not.”
|
In this we suspect you need to display the dialog control when the ServerRecordClick event is fired. To achieve this, we suggest you to define showOnInit property as false at initial rendering.
In ServerRecord click we need to define the showOnInit property as true to display the dialog control.
Find the code example:
|
|
protected void gvUsers_ServerRecordClick(object sender, Syncfusion.JavaScript.Web.GridEventArgs e)
{
HtmlGenericControl divContent = new HtmlGenericControl("div");
LiteralControl lit = new LiteralControl();
lit.Text = "<h2>This is a Message</h2>";
divContent.Controls.Add(lit); // load the message content as like
this.dialog123.ShowOnInit = true;
this.dialog123.Title = "Hello";
this.dialog123.DialogContent = divContent; // update it in the dialogcontent property
this.dialog123.IsResponsive = true;
}
|