Search code examples
asp.netvb.netgridviewhiddenfield

getting value of a hidden cell of grid view


I have a vb.net application in which a grid view is there with a hidden field. I want to get the value of that hidden cell

Code behind statusGrdvw.Rows(assign).Cells(5).Text


Solution

  • Well you can add this style in the html

    <style>
    .hidden {display:none;}
            #exportother {
                position: relative;
                top: 13px;
                left: -840px;
            }
        </style>
    

    Then on the field you want to hide

    ItemStyle-CssClass="hidden"
    HeaderStyle-CssClass="hidden"
    

    The field will be hidden but will be accessible from code behind.