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
45
Remove the column from UltraGrid in desgin
posted

How I can remove the above column from the ultraGrid

Thanks in Advance.

  • 1700
    Verified Answer
    Offline posted

    Hello,

    I was wondering if you managed to achieve your requirement.

    One additional thing that I can think of is the scenario If we assume that the column you want to remove is a row selector column you can remove it by setting the RowSelector property of the grid to false in the InitializeLayout event.

    Please observe the code snippet below which demonstrates how to do this:

    private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)

    {

    e.Layout.Override.RowSelectors = DefaultableBoolean.False;

    }

    Please let me know if you need further assistance.

    Sincerly,
    Ivan Kitanov

  • 1700
    Offline posted

    Hello,

    Thank you for posting in our community!

    I will need some clarifications regarding your scenario in order to ensure that I understood your requirement correctly. From the screenshot provided I am not quite sure what kind of column are you trying to hide. Is it just a regular column or a column resulting from adding a specific control or a property? If it is a regular column, it could be hidden by setting its property Hidden to true like this:

    this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Hidden = true;

    I have created a sample that uses a data source with three columns and hides the first one with the Hidden property. Attached you will find my sample for your reference. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated please feel free to provide your own sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach in in this case.

    Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior. 

    I noticed that in the header of your post you mentioned, “Remove the column from UltraGrid in design”. In case that your requirement is to do this in design time below is a screenshot illustrating how this can be achieved.

    Looking forward to hearing from you.

    Sincerly,
    Ivan Kitanov

    RemoveSpecificColumn.zip