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
5549
Hidden Column not possible
posted

hi, (currently use version 10 vol 2)
i want a column (auto id ) hide from showing in the grid .
i do the following
  Dim Datacolumn1 As New BoundDataField
            Datacolumn1.DataFieldName = "L_ID"
            Datacolumn1.Key = "L_ID"
            Datacolumn1.Header.Text = "L_ID"
            Datacolumn1.Hidden = True

            WebDataGrid1.Columns.Add(Datacolumn1)

WebDataGrid1.DataSource = MyRS

WebDataGrid1.DataBind()

if i do that , i've got the following error

Die Steuerelementeauflistung kann nicht geändert werden, da das Steuerelement Codeblöcke enthält (z.B. <% ... %>).

 

how did i set a column invisible? the data (when i later select some row) i still need.
in the old ultragrid i did it with

Band.Columns(0).Hidden =

True

Parents
  • 6748
    Suggested Answer
    posted

    Hi Martin,

     

    I can tell you a way to avoid this error. Create a css class:

    <style type="text/css">

        .hidden

        {

        display:none;

        }

        </style>

    And then apply it to your column instead of setting Hidden = true:

    Datacolumn1.CssClass = "hidden"

    I would like to investigate this issue anyway so if it is possible for you to attach a sample in the support ticket that you created it would be very nice (and let me know if you get this error even when you set the css class.

     

    Regards,

    Lyuba

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

     

Reply Children