At my wits end - Cannot set dataview field and have it save

Ok, I’ve got a customized (deployed) updateable dashboard.

I’m trying to update one of of the fields in the dataview.

EpiDataView edv = (EpiDataView)(oTrans.EpiDataViews["V_KEV_AccessControl_HR_1View"]);

edv.dataView[edv.Row]["PerCon_FirstName"] = "AA";
		
oTrans.NotifyAll();

It updates the grid, but the save button does nothing.

However, if I click to another row, it will save. What am I missing? :dumpster_fire:

1 Like

Ok, I figured it out lol:

EpiDataView edv = (EpiDataView)(oTrans.EpiDataViews["V_KEV_AccessControl_HR_1View"]);

edv.dataView[edv.Row].BeginEdit();
edv.dataView[edv.Row]["PerCon_FirstName"] = "AA";
edv.dataView[edv.Row].EndEdit();		

oTrans.NotifyAll();
4 Likes

Y’all go ahead and laugh big, I’ve been at this for over an hour.

Of course there were some extenuating circumstances, like an EpiListPickerPanel in the mix, so I was trying to isolate that, as that was the bound field I was actually updating. (Replacing the bound field with a pre-defined list from a template.)

1 Like

I only laughed because all I could think about was RubberDucking and you madly explaining this to a rubber duck before your ‘Aha!’ moment.

Glad you figured it out!

1 Like

I wish it was that simple. I remembered how after I saw a snippet of a quote from @josecgomez in the search. I saw the text “BeginEdit”, and finally remembered.

I’ve been rubber ducking to myself for an hour, and it still didn’t come to me.

dumb the simpsons GIF

My “Rubber Duck”

1 Like

Oh, child. Just an hour?

Hawaii Thats Cute GIF by ION