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
185
check/uncheck checkUIElement in header
posted

HI

I added a checkBox through CreationFilter in the header of the datagrid. in its click event i am calling a function to freeze/unfreeze the column. Now I need to check or uncheck this checkbox(in the header) according to some condition (for example, if a column is not freezed, this should be unchecked). I want to do all this in the InitializeLayout event of the datagrid. But I am not clear with how to access this checkBox for its properties.

Please guide me through

Thanks

Anoop

  • 469350
    Verified Answer
    Offline posted

    Hi Anoop,

        I am guessing that you used the KB article that demonstrates how to do this. I'm not sure, but my guess is that the article uses the Tag property of the column or maybe the column header to store the value of the checkbox. The element itself can't store it's checked state, the state has to be stored somewhere else, so check the code and see who is holding on to the state of the check box. Then all you have to do is change the value and call grid.DisplayLayout.UIElement.VerifyChildElements to refresh the grid's elements, I think.