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

Essential grid unbound column

Hi,

I would like to add an unbound column to the essential grid using the GridPropertiesModel. 
I want to add my own custom functionality to the controls in that column (e.g. clicking an 'edit' control (button) in the column would navigate to an edit page). However, there are no examples available on the examples section of the Syncfusion website that use the GridPropertiesModel. So I tried to achieve this functionality with the following code:

GridPropertiesModel gridPropertiesModel = new GridPropertiesModel<NetworkObject>();

gridPropertiesModel.Columns = new List<GridColumn<NetworkObject>>()
                    {
                        new GridColumn<NetworkObject>()
                            {
                                MappingName = "ValidDateFrom",
                                HeaderText = "Valid date from"
                            },
                        new GridColumn<NetworkObject>()
                            {
                                MappingName = "ValidDateTo",
                                HeaderText = "Valid date to"
                            },
                        new GridColumn<NetworkObject>()
                            {
                                HeaderText = "Manage records",
                                Format = "<a rel='nofollow' href=\"#\">Delete</a>"
                            }
                    };

But This won't work. When I run the code, I get an NHibernate exception telling me that there is no open session. 
This tells me that the grid wants to load something from the NetworkObject for some reason, but is unable to do so because all of the sessions are already disposed of. 
If however, I don't include the 'Format' property on the GridColumn<NetworkObject>, the code works... but there are no controls in the unbound column.

So my question is, why does the 'Format' property try to load additional data from the model, and how do I achieve my desired functionality ?

Thanks in advance.

Kind regards,
Yanik Ceulemans

2 Replies

AR Ajith R Syncfusion Team July 29, 2013 08:51 AM UTC

Hi Yanik,

 

Thanks for using Syncfusion products.

 

Query : Why does the 'Format' property try to load additional data from the model, and how do I achieve my desired functionality ?

 

We would like to let you know that we have already fixed the reported issue. As we do not provide confidential information through community forum. We suggest you to create a separate incident using your direct-trac account for getting the patch information and other details about the reported issue.

                                                                                                                             

Please let us know if you have any concerns.

 

Regards,

 

Ajith R



AR Ajith R Syncfusion Team August 5, 2013 10:39 AM UTC

Hi Yanik,

 

Thanks for using Syncfusion products.

 

We have created a new incident (111448) on behalf of you. We suggest you to follow up the incident for further reference using your direct trac account.  

 

Please let us know if you have any concerns.

 

Regards,

 

Ajith R


Loader.
Live Chat Icon For mobile
Up arrow icon