We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Formula in DataBoundGrid

Hi, I have used a Databoundgrid and tried giving one of the coulmn as a formula. When i have given the following property the system is getting hanged and goes into a infinte loop. grid1.Binder.InternalColumns(3).StyleInfo.CellType = "Static" grid1.Binder.InternalColumns(3).StyleInfo.CellType = "FormulaCell" grid1(1, 4).Text = "="c + "sum(a1:b1)" If i give grid1.Binder.EnableAddNew = False then it is working fine. But i want to allow the Add to be happen in the grid. Please help me in solving this issue. Thanks in advance. Regards, vamsi.

3 Replies

AD Administrator Syncfusion Team April 15, 2003 07:19 AM UTC


VK vamsi krishna April 15, 2003 11:44 AM UTC

Hi, Thanks for the immediate response. I have dowloaded the sample given and tried but it is not working fine if Me.gridDataBoundGrid1.EnableAddNew = False is commented. I want the grid to be editable. Please let me know if there is any workaround to implement this. Thanks is advance. Regards, Vamsi.

AD Administrator Syncfusion Team April 15, 2003 04:02 PM UTC

If you change <= dt.Rows.Count to < dt.Rows.Count, you will avoid the problem with the addnew row. Of course, when you add the new row, you will have to add a new FormulaTag to the arraylist if you want any cells in teh new row to be formula cells.

Live Chat Icon For mobile
Up arrow icon