Anyone ever add a Check All button to check all checkboxes?

So I was just about to begin toying with this when I noticed that your example selects rows and not checking the boxes on each row… Sorry, as you can tell, I’m not exactly a coder but can get by once started… lol

I got this to work for me, but I have multiple tabs. Is there any way to make 1 button work for whatever the currently active tab is it easier to just create separate buttons for each tab? If separate tabs, is there a way to make the buttons inactive if you are not on the respective tab?

I ended up making separate buttons for each tab and also added separate buttons for Checking All and Un-checking All per tab.

I am implementing a similar button and for some crazy reason, whatever row I’m selected on will not “check” unless I drag my mouse across the cell with the checkbox. Is there something special I need to do to get the selected row to update the UI? @Chris_Conn @hkeric.wci @rbucek

Just moving the mouse over the cells (without clicking) makes the checkbox appear? If that’s the case you are having a drawing issue. You need to let the grid know that something changed… (googling )

1 Like

FWIW, I was using the data grid method of setting all the checkboxes = true.

You didn’t forget this did you?

oTrans.NotifyAll();

ahh, I see, one sec

I added that and also set RowMod = “U” also to no avail.

Try this, courtesy of @josecgomez .

using System.Reflection;

MethodInfo mi = YourEpiDataView.GetType().GetMethod("InvokeExecute", BindingFlags.Instance | BindingFlags.NonPublic); 
mi.Invoke(YourEpiDataView, new object[]{ true });

I found another way to do it, but I forgot.

2 Likes

That didn’t work. This is happening in a button click event. I stuck that at the end of my button click code. Do I need to do anything within the EpiViewNotification?

Actually, I realized I was updating the wrong button click event. :man_facepalming:
Stand by… lol

I think I remember now, however it was just as hacky lol.

You set the datasource of the grid to null, and then set it back, and force refresh.

Notify All did the trick. I just had it on the wrong button click event.