Hi community,
I am stuck at one thing.
I have implemented checkboxes to my grid.

Now when I want to click the button to "do something with selected rows", I come short of knowledge in this genius but somewhat implicit (coding) platform.
I suspect the solution to no. 1 is somewhere hidden in the Endpoint.cs where the Excel handler is.
But that is in the web project but selected rows are in the script project.
Regarding no. 2, can I call some LINQ procedure and have an SQL Trigger in my database handle what I have to do??
I would appreciate all suggestions on this matter.
Best,
Biggi
ps. I am aware of the sample code below:

You see onViewSubmit parameter that you give to ExcelExportHelper.CreateToolButton right. Now instead of returning this.onViewSubmit() in it, do like this:
ExcelExportHelper.CreateToolButton(this,
CustomerService.BaseUrl + "/ListExcel", () => {
if (this.OnViewSubmit()) {
((ListRequest)this.View.Params).Criteria &= new Criteria("SomeField").In(rowSelection.GetSelectedKeys());
return true;
}
else
return false;
}
gotcha?
Now for second question, see cancellable batch action sample under basic samples. It passes a list to a service endpoint, in your case this might be all checked IDs. Than do what you like in endpoint.
Hi and thank you for the quick reply.
The code sample was also well received.
I took it for a spin last night but did not succeed.
See my code with your suggestion below
protected override List<ToolButton> GetButtons()
{
var buttons = base.GetButtons();
buttons.Add(ExcelExportHelper.CreateToolButton(this, GreidaLanService.BaseUrl + "/ListExcel", () =>
{
if (this.OnViewSubmit())
{
((ListRequest)this.View.Params).Criteria &= new Criteria("DEVICEID").In(rowSelection.GetSelectedKeys());
return true;
}
else
return false;
}));
Maybe you could see what is wrong with it but I get an error in a new window when using it.

When I replace .GetSelectedKeys to .In(rowSelection.GetSelectedKeys(() with .ToString(), then I get an Excel file only with headers though.
Any suggestions?
Best,
Birgir
No worries - Problem solved :)
On to the next one.
Most helpful comment
Now for second question, see cancellable batch action sample under basic samples. It passes a list to a service endpoint, in your case this might be all checked IDs. Than do what you like in endpoint.