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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

AddNewRecord Row

Thread ID:





62828 Jun 22,2007 03:47 PM UTC Jul 4,2007 06:49 PM UTC WinForms 6
Tags: GridControl
Hans Dampf
Asked On June 22, 2007 03:47 PM UTC


I am wondering if I can modify the appearance of the "AddNewRecord" row. So I want the AddNewRecord row to be only one cell (merge all columns in that row) and the row should be read only. When the user clicks on that row a dialog opens to add a new item (row) to the grid. So that the main purpose of this row is to open a dialog. The row should also contain some text e.g. "Click here to add a new record".

Is this possible with syncfusion?

A small example would be great.


Rajagopal [Syncfusion]
Replied On June 22, 2007 07:19 PM UTC

Hi Carl,

This can be done by handling a couple of events in grid. Using the CoveredRanges method of the TableModel, all the cells in the addnewrecord can be made to look as a single cell. Please refer to the sample below that does what you have described.

Here is the sample download link

Thanks for your interest in Syncfusion Products.

Have a nice time.

Replied On June 25, 2007 09:09 AM UTC

Hi Rajagopal,

thank you for your reply. I have modified your sample so that it fits to our approach. When you run the sample and click on the "Fill Table" button you will get an exception.

Can you tell me what's wrong here?



Replied On June 25, 2007 08:39 PM UTC


any news on that issue?


Replied On June 27, 2007 04:44 PM UTC


its me again, just wanna know if you have any updates on this issue. Currently we are stuck at the new record row problem.


Replied On July 4, 2007 09:02 AM UTC


any news on that issue - it would be great if you can help us here - we are still locking for a workaround.

Best regards,

haneefm [Syncfusion]
Replied On July 4, 2007 06:49 PM UTC

Hi Carl,

My sincere apologies for this delay in responding.

The reason is that you are setting the Style.CellValue for the AddNewRecord cell in a QueryCellStyleInfo event. Instead of setting the CellValue of the AddNewRecordCell, try hanlding the TableControlDrawCell event to draw the AddNewRecordCell manually. Below are the code snippet to show this task.

void gridGroupingControl1_TableControlDrawCell(object sender, GridTableControlDrawCellEventArgs e)
GridTableCellStyleInfo styleInfo = (GridTableCellStyleInfo)e.Inner.Style;
if (styleInfo.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.AddNewRecord
&& e.Inner.ColIndex > 0 )
e.Inner.Renderer.Draw(e.Inner.Graphics, e.Inner.Bounds, e.Inner.RowIndex, e.Inner.ColIndex, e.Inner.Style);
e.Inner.Graphics.DrawString("Click Here to add a new record", new Font("Arial", 10f), Brushes.Blue, e.Inner.Bounds);
e.Inner.Cancel = true;

Please refer to the attached sample for modification and let me know if this helps.

Many thanks for your patience.

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon