Custom EpiDataView-how to add row

That error is coming up from a combobox … looks like a combo is not setup correctly. Also make sure you have a SysRowID column of type GUID in your data table.

can you explain the SysRowId? just making sure I am not doing something wrong on my end. This table is local only…

EpiDataViews expect (and need) a SysRowID column in any table they are bound to, and not having that column can sometimes yield funny errors. Just add a column called SysRowID with a data type of GUID and initialize the value to Guid.NewGuid();

ok then each row would need an unique GUID as well…

Coolio

1 Like

Not necesarely… but yes that would be better. YOu can just use Guid.NewGuid(); as default value for the column;

DataColumn dc = new DataColumn("SysRowID",typeof(Guid));
dc.DefaultValue = Guid.NewGuid();

Alright gents, got this working. Thank you both for your help!!
The hard coded combobox “DescColumnName” property apparently needs to match the binding name in the epidataview.
Old:

New:
image

I’ll add the SysRowID info and be on my merry way.
Thanks again guys

1 Like

glad I couldn’t help … darn combobox the whole time… lol

Haha, well I learned alot from you about how to property add a row to an EpiDataView! I wish I could give this one two solutions

I actually changed the solution after thinking about it. Since this answers how to add a row to a custom epidataview, your first response was perfect.
The rest was just my crap code being reviewed :slight_smile:

image

5 Likes

True that #ScopeCreep

3 Likes