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
65
How to get a value of UltraWebGrid's hidden cell by clicking a button?
posted

Please  help!!

I'm a newbie in Infragistics, could you please help to solve a problem that seems to be easy..

I've a button Button1 on my form that generates a server postback and an UltraWebGrid with sorting, filtering, ajax enabled. Datasource links to a database table with two columns: id , name

I made  id column hidden in my grid. Question is how to get its value of selected row (only one row can be selected at the same time) in a grid and press my button (Button1)?

Thank you,

BR

  • 90
    posted

    Hello BR,

     I have done the same through the javascript.

     By using the below code you can get the ID of the active row.

    <Grid>.getActiveRow().getCellFromKey(<Key which you told is hidden>).getValue()

    The above will give you the hidden value from the grid.

    Then you can hide it from the server side when you click on the button.

     

    or you can hide from java script by using the below code

    <Grid>.Rows.getRow(<index>).setHidden

     

    <grid> is the grid name

    <index> is the row index of the row in the grid

    <Key which you told is hidden> is the key provided by you to the hidden column

     

    Regards,

    Sujeeth