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
close icon

Filter menu with live data feed

Hi Syncfusion Support,

I am using signalR with the grid for live data.  Trying to allow filtering on the columns but it doesn't work.  The icon for the filter shows, but nothing happens when I click it.

The grid data is pushed by SignalR to it's grid datasource with grid refresh after receiving the json array.  I was wondering why this won't work.  

Please advise.

Thanks.

6 Replies

SR Sellappandi Ramu Syncfusion Team December 5, 2014 11:46 AM UTC

Hi Dan,

 

Thanks for using Syncfusion Products.

 

We have analyzed the reported issue but we are unable to reproduce the issue at our end. Please check with the below attached sample and let us know if it helps. If you are still facing the same issue, please open the Developer tool page and open the console tab, if shows any console error send us that screen shot of web pages. So that we could sort out the cause of the issue and provide you a response as early as possible.

 

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/131898/EJGrid-1172796792.zip

 

 Please let us know if you have any queries.

 

Regards,
Sellappandi R



DA Dan December 5, 2014 01:56 PM UTC

HI Syncfusion,

I tried running the solution but getting an error in the attached file.

Thanks,


Attachment: Capture_636c36e5.zip


DA Dan December 5, 2014 02:18 PM UTC

Hi Syncfusion Support,

I also went over the code in the solution provided.  I see that the grid is prepopulated with data from the home controller.  In my scenario.  The grid starts out empty and SignalR will update the grid with new rows.  

The filter probably works in your case because there's data loaded initially whereas my data never gets pre-loaded but send by the SignalR client methods. 

Would you be able to check the use case that I talked about with grid data not pre-loaded, but pushed in by SignalR instead?

Thanks.


MF Mohammed Farook J Syncfusion Team December 8, 2014 12:14 PM UTC

Hi Dan,

Thanks for the update.

We have analyzed your requirement "signalR with the grid for live date" and created a sample. Please find the code snippet.

 

[controller]

var DataSource = new List<string>();

            ViewBag.dataSource = DataSource;  // empty dataSource

            return View();

 

[view]

 

@(Html.EJ().Grid<object>("Grid")

              .Datasource((IEnumerable<object>)ViewBag.dataSource)

     .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Normal); })

     .ClientSideEvents(c => c.Create("create"))

              . . .

             )

                     .Columns(col =>

        {

            col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Left).Width(50).Add();

                   . . .

           

        })

        )

 

In the above sample we have passed the empty list value to the grid dataSource and used “Create” to bind the empty columns in Grid. Please find the code snippet.

function create(args) {

        $("#FlatGrid").ejGrid({ dataSource: [{}, {}, {}, {}, {}] });

    }

 

Please find the sample from the following location:

 

Sample: SignalR.zip

Please let us know if you have any queries.

Regards,

J.Mohammed Farook

 



DA Dan December 8, 2014 02:28 PM UTC

Does it make any difference, if I initialized the grid with my custom object?  In your example, the ViewBag.DataSource is a List<string>.  What if my ViewBag.DataSource is something like List<MyObject>?




SR Sellappandi Ramu Syncfusion Team December 9, 2014 10:48 AM UTC

Hi Dan,

 

Thanks for your update.

 

We have analyzed your requirement for “grid render using custom object”. Based on your request we created a sample and the same can be downloaded from the following link. In the provided sample we are using object List<MyObject> in the custom class to render the empty grid.

 

Sample Link: SignalR.Zip

Please try the above sample and let us know if you would require any further assistance.

Regards,
Sellappandi R


Loader.
Live Chat Icon For mobile
Up arrow icon