How to clear TWebDBGrid row selection


I am facing one issue related to WebDBGrid row selection. I have set the webdbgrid rowselect option to true. So when I select one row and move to another row then somtime it selects 2 rows at a same time. So how to clear row selection in TWebDbgrid and select current clicked row.

Thank you.

I retested this here with the demo under Demo\Basics\DBGrid but I cannot reproduce this. How to reproduce this?

This issue happened when I applied filter to linked XDatawebdataset and then clicked on rows of the grid multiple time then it happens.

Can you please provide information on how to clear the selection of the grid.

And how to make a specific row as selected.

For example if I want to select row no 5 then how to do it by code?

I checked WebDBgrid.Selection but did not work.

When goRowSelect = true, you set the new selected row programmatically with:

grid.Row := rowindex

I did implement the same dbgrid.row = Arow on grid click cell event but still having the same issue.

here I clicked on buttons to open the dialog.

so, i clicked the down button the still then up row i selected.

How to clear the selection? so that I will try to clear the selection and reselect again.

I really don't understand what you try to do. When you click a row and goRowSelect = true in grid.Options, you should NOT need to set the row programmatically. When you click a row, it selects the clicked row and unselects the previously clicked row.
This can be seen in Demo\Basics\DBGrid
If a problem persists, please provide detailed & exact information how we can reproduce this.

Yes. I agree that on Click cell it should select the clicked row but it not working like that.

As I told you, I have applied filter to the data linked xdatawebdataset.
Once we apply the filter, then this issue happens.

Ok. I will try to make a demo for you.

Is there any way to have a call you with you guys.?

We provide all technical support via this support center or direct email.

Fwiw, we have also added a new method to clear the selection grid.ClearSelection that will be included in the next update.