This is a migrated thread and some comments may be shown as answers.

Red mark after change the cell of grid

7 Answers 242 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 16 Sep 2013, 08:43 PM
Hi,

Currently, I am referencing http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/batchediting/defaultcs.aspx

But I have no idea how to get the red angle dirty mark after changing.

Thank you so much.

7 Answers, 1 is accepted

Sort by
0
Allen
Top achievements
Rank 1
answered on 17 Sep 2013, 01:28 PM

Anyone has any idea, I will appreciate it.

Thank you.
0
Allen
Top achievements
Rank 1
answered on 18 Sep 2013, 01:24 PM
No one knows about that?

Really appreciate it if you give me some example.

Thank you.
0
Angel Petrov
Telerik team
answered on 19 Sep 2013, 04:09 PM
Hi Allen,

In order to remove the red mark from the cell once it is edited you can include this CSS in the project:
.RadGrid .rgBatchChanged {
           background-image: none !important;
       }


Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Allen
Top achievements
Rank 1
answered on 19 Sep 2013, 04:33 PM
Hi Angel,

Thank you for replying me. 

Sorry, I do not want to remove it. I just want to know how to implement it in the radgrid.

Thank you.

0
Allen
Top achievements
Rank 1
answered on 19 Sep 2013, 04:40 PM
Hi Angel,

Thank you for replying me. 

Sorry, I do not want to remove it. I just want to know how to implement it, how to add it in the radgrid. 

Thank you.

0
Angel Petrov
Telerik team
answered on 24 Sep 2013, 11:49 AM
Hello Allen,

If you want to style a grid cell with the red triangle above you can assign the appropriate CSS class to it. For example:

ASPX:
<telerik:GridBoundColumn DataField="ProductName" HeaderStyle-Width="210px" HeaderText="ProductName" SortExpression="ProductName"
                       UniqueName="ProductName">
                       <ColumnValidationSettings EnableRequiredFieldValidation="true">
                           <RequiredFieldValidator ForeColor="Red" Text="*This field is required">
                           </RequiredFieldValidator>
                       </ColumnValidationSettings>
                   </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QuantityPerUnit" HeaderStyle-Width="135px" HeaderText="Quantity Per Unit"
                       SortExpression="QuantityPerUnit" ColumnEditorID="TextEditor" UniqueName="QuantityPerUnit">
                   </telerik:GridBoundColumn>

C#
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
       GridDataItem dataItem=e.Item as GridDataItem;
      if(dataItem!=null)
      {
          dataItem["ProductName"].CssClass = "rgBatchChanged";
          dataItem["QuantityPerUnit"].CssClass = "rgBatchChanged";
       }
   }

Hope this helps.

Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Allen
Top achievements
Rank 1
answered on 12 Nov 2013, 03:54 PM
Thank you. Got it.
Tags
Grid
Asked by
Allen
Top achievements
Rank 1
Answers by
Allen
Top achievements
Rank 1
Angel Petrov
Telerik team
Share this question
or