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
535
How to determine whether column is templated column or not
posted

Hi,

we are using Ultrawebgrid (10.0) in our asp.net c# application. We have a global routine that goes thru all the page controls dynamically and saves the contro's values into hash table and upon coming back from child page, this hash table data is used to restore page state. We had to do this because user may have done many filters and selections before going to child page via link and come back to parent page. They don't want to loose their filters and selections.

Everything is fine and we are able to store ultrawebgrid's sorting values also into hash table. But some of the page's grid's have checkbox controls in template column. Upon restore, checkbox state is not restored because we are not storing it in hash table.

how can I determin ultrawebgrid has templated column with checkbox control? if i get code for this, then I can loop thru rows and get the state of checkbox control and store the value.

I appreciate your response.

Thanks,

Prathiba.

Parents
No Data
Reply
  • 15979
    posted

    Hello Prathiba,

    What you can try is to get column type like this:

    var columns = UltraWebGrid1.Bands[0].Columns;

    var type = columns[2].GetType();

    string col = type.Name;

     

    if (col == "TemplatedColumn")

       {

       }

    And check if some column is Template Column by looping trough grid columns collection.

    Test this approach in your application and let me know if you have additional questions.

Children