﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Can't add new record to Janus grid</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 16:03:16 GMT</lastBuildDate><ttl>20</ttl><item><title>Can't add new record to Janus grid</title><link>http://forum.strataframe.net/FindPost31233.aspx</link><description>I'm using typical BusinessBindingSource techniques to bind to Janus GridEX (3.5) control, all works well except when adding new records. The new values disappear from the grid when you move to the next row and you receive Null key value error when trying to save.&amp;nbsp; I have tested BO/BBS with DataGridView and it works fine.&lt;br/&gt;&lt;br/&gt;Janus support suggests that ..."&lt;span lang="EN-AU"&gt;if you implement AddItem method in the IBindingList interface, it will add the records without the need of handling the GetNewRecord event" GetNewRecord&amp;nbsp; is a grid event to handle manually adding a new row to a collection or when implementing IList interface. &lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span lang="EN-AU"&gt;Seeing BBS implements IBindingListView I thought that AddItem would be handled.&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span lang="EN-AU"&gt;Anyone had this problem, any ideas?&lt;/span&gt;</description><pubDate>Fri, 06 Jul 2012 09:09:59 GMT</pubDate><dc:creator>Kingsley Price</dc:creator></item><item><title>RE: Can't add new record to Janus grid</title><link>http://forum.strataframe.net/FindPost31255.aspx</link><description>Any suggestions or feedback ?&lt;br/&gt;&lt;br/&gt;As a work around, do I need to sub-class the BBS and try to implement &lt;font size=3 face=Calibri&gt;IList.IndexOf as suggested by janus guys?&lt;/font&gt;</description><pubDate>Fri, 06 Jul 2012 09:09:59 GMT</pubDate><dc:creator>Kingsley Price</dc:creator></item><item><title>RE: Can't add new record to Janus grid</title><link>http://forum.strataframe.net/FindPost31243.aspx</link><description>Trent, I have received this reply from Janus support team, is there any validity in what they are saying?&lt;br/&gt;&lt;br/&gt;...&lt;font face="Calibri"&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun: yes;"&gt; &lt;/span&gt;"YourBusinessBindingSource does implement IBindingList but it doesn't implement allthe methods of the interface. In particular, the method that is not implementedcorrectly and the one that I think is causing the problem is IList.IndexOf.When the control uses IndexOf method in your BindingSource after adding theitem using AddNew, the method returns -1 while it should return 0 (when it isthe first item added or, the actual index of the item). &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font face="Calibri"&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;T&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;ry to implementthis method especially and the other methods in the IList interface and it shouldwork."...&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;font color="#000000" size="3" face="Times New Roman"&gt;&lt;/font&gt;</description><pubDate>Mon, 11 Jun 2012 21:47:33 GMT</pubDate><dc:creator>Kingsley Price</dc:creator></item><item><title>RE: Can't add new record to Janus grid</title><link>http://forum.strataframe.net/FindPost31236.aspx</link><description>&lt;font size=2&gt;Thanks Trent. Trace (attached) is from GridEx AddingRecord event, after which entered data disappears and a blank row is left in the Grid. I can send sample project if you wish.&lt;br/&gt;&lt;br/&gt;Also got this (clue maybe) of a DevEx forum "...With GridEX (janus), when you add a new row, there is no need to add a new row/record to the datasource first. You can put values in the column and once they are completed/validated, it is only at that point that a new row/object is requested. GridEX then SETs all of the values and the new row/record is then added to the data source..."&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;update: just discoverd that the newly added grid row is being overridden by the BO's default values. Initially I had them&amp;nbsp;= nothing, now have I have given them values I can see this happening.&amp;nbsp;So it looks like an event timing issue?&lt;/font&gt;&amp;nbsp;</description><pubDate>Wed, 06 Jun 2012 20:14:28 GMT</pubDate><dc:creator>Kingsley Price</dc:creator></item><item><title>RE: Can't add new record to Janus grid</title><link>http://forum.strataframe.net/FindPost31234.aspx</link><description>I have never tried the Janus grid before, but it should work.&amp;nbsp; If the standard DataGridView works, then there is probably something else happening on the Janus side.&amp;nbsp; The DevExpress and Infragistics grids are used in vast numbers with the SF BBS, so I doubt that there is anything that should be changed.&amp;nbsp; I also know that the SF BBS works with the Telerik grids as I have recently tried that out.&lt;br/&gt;&lt;br/&gt;Do you have a stack trace coming back?</description><pubDate>Wed, 06 Jun 2012 09:08:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>