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

GridControl ColumnName

Thread ID:





129963 Dec 26,2007 09:43 AM UTC Apr 12,2017 12:03 PM UTC ASP.NET MVC 3
Tags: Grid
Amol Choudhari
Asked On December 26, 2007 09:43 AM UTC

I am using syncfusion GridControl.
Now I have to change the 0 displaying cell to empty cell. for this I am using QueryCellInfo
But my problem is either In "e" I am not getting currents cell's value or even I am not able to find the current cell's columnname.

Please help me:
In short how can I convert 0 value containing cell to empty value cell.?
How can I find the columnName in gridcontrol ?

Thanks in advance,
Amol Choudhari

haneefm [Syncfusion]
Replied On December 26, 2007 10:45 PM UTC

Hi Amol,

For GridControl:

How can I convert 0 value containing cell to empty value cell.?
You can handle the QueryCellInfo event of the grid and set the e.Style.CellValue/Text to new value.

void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
if( e.Style.Text ="0")
e.Style.Text = string.Empty;
How can I find the columnName in gridcontrol ?
Call the GetAlphaLabel method to get the column labels in a grid. Here is a code snippet

string strColumnName = GridRangeInfo.GetAlphaLabel(this.gridControl1.CurrentCell.ColIndex);

Best Regards,

Replied On April 11, 2017 01:03 PM UTC

Hi, I am having a similar issue, I would like to replace all cell values from the grid (cell value containing 0.00) with an empty value.

Asp.Net MVC, using .ClientSideEvents(eve => { eve.QueryCellInfo("queryC"); })

Mani Sankar Durai [Syncfusion]
Replied On April 12, 2017 12:03 PM UTC

Hi Customer, 

We have analyzed your query and based on your requirement we have prepared a sample that can be downloaded from the below link. 
In this sample we have shown the cell text as empty when the value contains ‘0’ using QueryCellInfo event in grid. Refer the code example. 
              .ClientSideEvents(eve => eve.QueryCellInfo("query")) 
            .Columns(col => 
<script type="text/javascript"> 
    function query(args) { 
        var grid = $("#FlatGrid").ejGrid("instance"); 
        if (args.column.field == "Freight" && args.data.Freight == 0) { 
Refer the documentation link. 

Please let us know if you need further assistance. 

Manisankar Durai. 


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

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