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

Unbound columns

Thread ID:





125766 Sep 9,2016 09:12 PM UTC Sep 19,2016 06:13 AM UTC ASP.NET MVC 3
Tags: Grid
Bernard Jurlina
Asked On September 9, 2016 09:12 PM UTC

What is the best way to do something like this:

I have one table in database and this is also one entity in EF model in the project. Let's say there is 10 columns in that table.
On the page I bind the grid on datasource from that table and it's working normally. Now, I want to add 3 unbound columns in the grid and I want to set their values for every row  by calling some service which is outside of the project. I'm using signalR connection from controller to page to pass the values which I want to set in the grid, and that's working fine.

Is it better to render the grid with columns in javascript, get the signalR message and then loop through the rows and set the values in unbound columns (by the way, how can I loop grid rows in javascript?), or is it better to render it on server-side in controller and set the values for these columns there, and pass the grid properties to the view?


Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On September 12, 2016 01:02 PM UTC

Hi Bernard, 

We could see you would like to pass the unbound column changes to the another page on the basis of SignalR concepts. We have achieved this by using the template columns which will also be treated as an unbound column. In the template columns, we have rendered the ejNumericTextBoxes. On the change event of them, server modify method has been called to update the Grid rendered on the another page. Refer to the following code example. 

        d => 
    .Columns(col => 
                 . . .. .  
        col.HeaderText("temp1").Template("<input class='numeric' type='text' />").Add(); 
        col.HeaderText("temp2").Template("<input class='numeric' type='text' />").Add(); 
        col.HeaderText("temp3").Template("<input class='numeric' type='text' />").Add(); 
<!--Reference the SignalR library. --> 
<script src="~/Scripts/jquery.signalR-2.1.2.js"></script> 
<!--Reference the autogenerated SignalR hub script. --> 
<script src="~/signalr/hubs"></script> 
    function refreshtemplate(args) { 
            value: 10, 
            change: "change" 
        }).attr("id", args.column.headerText + args.rowIndex); 
    $(function () { 
        window.signal = $.connection.signalRTestHub; 
        window.signal.client.modify = function (userIp, action, details) { 
            $("#" + action).ejNumericTextbox({ 
                value: details.value 
        $.connection.hub.start().done(function () { 
            window.change = function (args) { 
                window.signal.server.modify($("#userName").text(), this.element.attr("id"), args); 

Note: Since we have update the template column’s value in the change event of the ejNumericTextBoxes, there is no need to iterate the Grid rows.  

We have also prepared a sample that can be downloaded from the following location. 

Seeni Sakthi Kumar S. 

Bernard Jurlina
Replied On September 17, 2016 07:14 AM UTC


I'll give it a try.
Thanks a lot!


Ragavee U S [Syncfusion]
Replied On September 19, 2016 06:13 AM UTC

Hi Bernard, 
Thanks for your update. 
Ragavee U S. 


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

or the page will be automatically redirected to 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