Page 1 of 1
Added row to data grid is not selectable
Posted: Mon Jul 16, 2012 10:59 pm
by Newbie4
I add a new line to a class in my data grid using
Code: Select all
dispatch "AddLine" to group "Class" with theRowData, theDataColumns, theLineNo
It shows up in my data grid table and I can select it in the table but it can not look it up by the index. (It does not find it)
I added the following line after adding it:
Code: Select all
dispatch "ResetList" to group "Class"
but it makes no difference. After I change classes and return to that class, my added record is gone.
Am I missing doing something or not resetting the indices?
Re: Added row to data grid disappears
Posted: Mon Jul 16, 2012 11:53 pm
by dunbarx
Here is an odd suggestion:
Does your DG have scrollbars? If so, deselect them and then put them back. If not, add a horizontal one and then take it away.
Does the missing line come back?
I had a DG that required this in order to show the last line after a while. I eventually solved the problem by discarding the entire thing and making a new one. Never saw the issue again.
Craig Newman
Re: Added row to data grid disappears
Posted: Tue Jul 17, 2012 1:07 am
by Newbie4
Thanks for the suggestion but the answer is no, I do not have any scrollbars. The window is large enough that I do not need them.
How do you add them? I will try that just to see what happens..
It looks as if the index isn't updated. I can even change the sort order. It gets placed in the proper sort order depending on which column I select but even if I click on it, it does not get selected by the code below:
Code: Select all
on selectionChanged pIndexes
global array
put the dgDataOfIndex[pIndexes] of me into theStudentA
uiViewStudent theStudentA["ID"]
-- [1] represents the 1st class
-- put the dgDataOfRow[pRow]
-- answer array[1]
end selectionChanged
Is there anything I can do to include the new record in the indexes?