title: How do I prevent the cancel event from changing my grid row color?
body: <p>I search for data and then bind to my grid. In the grid's <code>databound</code> event, I change the row background color according to the cell's value. This works OK. But when I click the Edit button in the grid and then click the Cancel button, the grid no longer has the background color set. I tried to call the <code>databound</code> event in the <code>Cancel</code> event, but it does not work. How do I prevent the Cancel Event from changing my grid color?</p>
  
  <p><strong>grid</strong></p>
  
  <pre><code>   @(Html.Kendo().Grid(Model) 
              .Name("mygrid")
               .Events(e=&gt;e.DataBound("dataBound"))
              .Columns(columns =&gt;
              {
              columns.Bound(p =&gt;p.StudentName).Title("StudentName");
              columns.Command(command =&gt;
               {
                command.Edit().UpdateText("Edit");
                command.Destroy().Text("Delete");
               }).Width(160);
                  })
              .Editable(editable =&gt; editable.Mode(GridEditMode.PopUp)
              .TemplateName("SudentEditor")
              .Window(configurator=&gt;configurator.Width(500)
              .Title("EditStudent")))
              .Scrollable() 
              .Events(events=&gt;events.Cancel("onCancel"))
              .DataSource(dataSource =&gt; dataSource
                      .Ajax()
                      .PageSize(20)
                      .Model(model =&gt;
                      {
                      model.Id(p =&gt; p.Id);
                      })
                  .Read(read =&gt; read.Action("GetStudentForGrid", "Student"))
                  .Create(create=&gt;create.Action("CreateSudent","Equipment"))        
                  .Update(update =&gt; update.Action("UpdateStudent", "Student"))
                  .Destroy(destory=&gt;destory.Action("DestroyStudent","Student"))     
                  .Events(events =&gt; events.Error("error_handler"))
              ))
  </code></pre>
  
  <p><strong>databound event</strong></p>
  
  <pre><code>  //change grid color
     function dataBound(e) {
  
          $("#mygrid tbody tr").each(function(i) {
            $(this).find("td:lt(9)").css("backgroundColor", '#000000');
          });
      }
  </code></pre>
  
  <p><strong>cancel event</strong></p>
  
  <pre><code>     //I try to call preventDefault event and close the PopUp window
      //,but the background is still grey
      function onCancel(e) {
      //e.preventDefault();
      //e.container.parent().css("display", "none");
     // e.sender.clearSelection();
      dataBound();
  }
  </code></pre>