signalr - How can i highlight the Kendo grid cell by color change after update -
I am using Condo U Grid with MVC and SignalR. I can successfully run CRRudio on the grid using SignalR.I want to notify the customers by changing the informed cell (changing the cell color). How can I get it with the following code:
@ (HTML.Kendo (.) Grid & lt; Webapplication1.Models.ShipViewModel & gt; () .name ("ShipGrid" ) Column (c = & gt; {c.bound (m = & gt; m.id). Hydid (); c. Bound (m = & gt; m.LocationViewModel). Title ("location1"); C. Bound (M => M space 2 viewmodel). Title ("Place2"); C. Bound (M => MboxCent); C. Commands (P => {P. Edit (). Text (".") Update Text ("") Canceltext (""); p.Destroy (). Text (""). Html Properties (new {@title = "cancel"})}} );}). Toolbar = (t {= Title} ) .mode (Kendo.Mvc.UI.GridEditMode.PopUp) .TemplateName ("abcEditor"). Events (events = & gt; {events.Edit ("edit");}) .datasource (datasource = & gt; Data source. Signal R. Transport (tr = & gt; tr. "Hub Start". Hub ("Key Hub"). Click (C => c.Read ("abc_reead"). Create ("abc_Insert"). Update ("abc_Update"). Delete ("abc_Delete"). (S = & gt; s.Read ("Abc_Read"). Create ("abc_Insert") update ("abc_Update"). Delete ("abc_Delete"). Schema (schema => schema .model (m = & gt; {m.id (p = & gt; p.Id); m.Field (p = & gt; p.Location1ViewModel) .DefaultValue (ViewData [" DefaultLocation1 "] as Webapplication1.Models.Location1ViewModel; M.Field (p = & gt; p.Location2ViewModel). Default value (WebPplication1.Models.DeliveryLocationViewModel as ViewData [" DefaultLocation2 "]}}}))) )
I want to highlight the cell being updated here. Something like stock market data flashing How can I get this?
I did the same thing. I do not know that it helps you in your default visual model Add additional assets, "renewed" as a boolean, now every time you update a row, then "update" as "correct".
And add a new data bound event to the Kando Grid.
. Events (Events = & gt Work on DataBound (Arg) for Update: I do not know your logic, as long as you put comments, you share it online If you want to do something like that, sites, as far as I could, if you want to highlight different cells in one line, then add another additional field with "update" to "column"; A string can be here, you mark which backend you want to keep back ground color. Say we got it "2" value. For (i = 0 ; I & lt; Items Inactive Grade; I ++) {var tableUID = $ ("#Grid Grid"). Data () .kendoGrid.dataSource.data () [i] .uid; Var TableToColour = $ ("#ShieldGrid .k-grid-content tr [data-uid = '" + TableUID + "']"). mother-father (). Parents () [0]; Var Colometoclore = $ ("#Shield Grid"). Data () Kendo GriddataSourceData () [i]. Column; In the case of AT ("style", "background-color: blue")} In ("style", "background-color: blue")}, you'll find multiple Cells need to be highlighted, send something like "1,2,3,5" in the column; Where 1, 2, 3, and 5 represent the column number of the same line and parsing some strings after the column-to-color, keep it for a loop or some other color;
Hope it helps. Thank you.
Comments
Post a Comment