Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
685
Getting the Below Error While trying to hide column Programatically
posted

Hi Please check the attached code snap shot...below

after binding source .....when i'm trying to hide the column with below line of code n ...i.m getting the error : Object reference not set to an instance of an object

_grdviewSearch.Columns[

"StartDate"].Hidden = true;

 

please let me know any of you have solution ?

Parents
No Data
Reply
  • 33839
    posted

    Hi prasantkumar ,

    The Columns collection will not contain any autogenerated columns.  Only columns you have actually defined on the aspx or added from the code behind.  Perhaps that will help.

    regards,
    David Young 

Children