Telerik mvc grid cell cell data to include columns. Team

I cannot find a way to refer to the value in a column in the grid, in my case it is StatusId. Based on the value of the cell in this row, for StatusId I need to return true or false to the ".Visible (???)" method. It would be nice to find the answer in the documentation online, but I could not. It’s hard for me to believe that I would be the first person who ever needed this functionality.

I would be very grateful for any help, since no one on the telerik forums knows.

.Columns(columns => {
    columns.Command(commands => { 
    commands.Edit().ButtonType(ButtonType); 
    commands.Delete().ButtonType(ButtonType); 
}).Width(90).Visible(???);

Thank! Azee

+3
source share
2 answers

Visible . false, . CellAction:

.CellAction(cell =>
    {
        if (cell.Column.Title == "Commands")
        {
            if (cell.DataItem.StatusId > 0) //check whether to hide the cell
            {
                cell.HtmlAttributes["style"] = "visibility:hidden";
            }
        }

    })
+2

Ajax.... , Color in Red.. "ie Cell_Text =" In Error ", , , Ajax- Grid-, Cell_Text .... .

0

Source: https://habr.com/ru/post/1781532/


All Articles