Announcements
Hello all,
I have put together a SAFgrid in VB2010 and got it working pretty good. I want to add a NotesColumn by setting that property to true, but it does not appear. I can't seem to shake the solution out of the SDK documentation. Does anyone have any insight as to what is required to make it work?
Thanks
Butch
*This post is locked for comments
Butch,
Thanks for the quick reply. I have developed quite a few custom screens adding the note button but this is the first time I wanted the button on a grid line as the first column (as opposed to on one of the edges of the grid). I not even sure I have seen any SL screens with grids and a note column but that NoteColumn property sure sounded like it would be what you control this with. Like you, I may not spend a lot of time chasing this but I will post to this thread if I do figure it out.
Rick,
I never did get that to work. It was deemed a nice to have and I quit burning hours on it. Luckily, I don't have to develop a lot of custom screens in my world.
Butch,
I realize this is an old post but I was curious if you got this to work. In particular, I can get the note button to show for a grid control in the specified location (bottom-left, top-right, etc. just fine. However I am trying to use the NoteColumn property (which this sounds like you might have been doing as well) so that the note button appears in the grid line itself. When I sent the NoteColumn property to True and run the project, it errors with an error 10232 (Assertion failure) but I do not get that error if I set the NoteColumn property to False.
Good advice, what I have now noticed is that the icon is always indicating that there is a note attached... Even with a freshly created table - so I still have something wrong in the setup.
You may be able to narrow things down a bit.
When you reload the screen, click on some grid rows (some of which should habe a note, and some of wjhich should not) & see if the Notes icon subtly changes.
If it DOES, then the kernel recognizes that a note exists for this row, and it will attempt to retrieve it (possibly only after you click on the notes icon.
A Profiler trace should then tell you what SQL is being used to retrieve the note.
But if the notes icon "remains blank" then the kernel does not think that the NoteId is populated.
That may suggest some sort of problem in defining or loading the grid.
Barry
You have done well to pull all that out of memory!
The note is being saved. The NoteId column has a value and the Note is in the Snote table. It's just not reading it back upon reloading the screen. I'm sure I am just missing a setting somewhere.
Butch
<< However when the form is reloaded, the notes are not being read back from the db
That suggests to me that that NoteId column is not getting saved into the database.
I'm typing from memory here - but I think the Notes pop-up populates the sNote table, and (if this is the first note for your record) also places the resulting NoteId into the NoteId column in your table.
If your table doesn't get saved back to the database, it's NoteId will remain at zero - which tells the kernel that there is no Note associated with this row.
Or possibly the problem is something else altogether !! :)
Barry
Barry,
Thanks for the excellent info. The note icon appeared when I added the ,k and I can save notes that appear in the db now, However when the form is reloaded, the notes are not being read back from the db so when I click on the note, the dialog comes up empty. I'm still fiddling with it, but it feels good to be on a different problem.
Thanks!
...b
Butch
Are you referring to the "regular SL Notes icon" that appears at the bottom left of the grid in most SL screens with grids?
If so, to my knowledge, there are two requirements:-
- The table must have a column named NoteId. The column must be the right datatype (int from memory)
- There must be a Key field in the grid (ie the Level property ends in ,k - ie Level might be 0,k or 1,k etc.
For a "normal" (non-grid) field, the note icon automatically appears next to the key field (the one with the highest Tab number if there is more than one.)
In a grid, the icon just appears at the bottom left of the grid.
There are no properties to be set etc. As long as the table has that column, and a control in the grid has ,k the note icon appears automatically.
That's my understanding.
Barry
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156