I have a UD field that holds a list of data.
For example:
Aaron|01/12/2014|Subject|Comments~Randy|07/17/2018|NewSubject|MoreComments~Pickle Rick|12/01/2155|TimeTravel|I’ve figured it out!
I want to bind this information to a grid. Each row would be split by ‘~’ and each column by ‘|’.
So, in the resulting example, it would end up in a grid like:
Name
Time Stamp
Subject
Comment
Aaron
01/12/2014
Subject
Comments
Randy
07/17/2018
NewSubject
MoreComments
Pickle Rick
12/01/2155
TimeTravel
I’ve figured it out!
I created the layout in the initialize section and that comes up fine.
Thought about it, but I wasn’t sure how to split and have it create multiple rows from a single row of data.
Doing the second split between the ‘|’ into columns would be trivial, but the row thing got me.
I’m already setting the data source to the data table. Wouldn’t creating an EpiDataView and binding the data table to the view then binding the view to the grid add an unnecessary step?
I didn’t notice that part. It’s a pain to do. You would end up with an external BAQ with a view or function. There are plenty of SQL examples of splitting into multiple rows, but none of them are nice.
So, I created an EpiDataView after all, which is fine, but I’m struggling to find how to set the pub/sub as it does not clear/refresh the grid when the record changes.
All of the examples I found were for BAQDataViews which I could not translate to an EpiDataView as it did not have a SubscribeToPublisher method.