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
256
select value from dropdown embedded in ultrawebgrid
posted

Hi all,

I was trying to select a particular value from dropdown which is a column type of Ultrawebgrid.

I  populated the older rows in ultrawebgrid.But couldnt set the index of the column type dropdown  to the database value ...

I need to set the  index dynamically of that column ....please reply as soon as possible.

 

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    I believe you can achieve that using templated columns. In a templated column you can have any content - for example you can start with just a dropdown in the templated column, e.g.

    <igtbl:TemplatedColumn>
        <CellTemplate>
            <asp:dropdownlist runat ... />
        </CellTemplate>
    </igtbl:TemplatedColumn>

    and  then in InitializeRow, you can do something similar to this (pseudo code, just for reference)

    TemplatedColumn col = (TemplatedColumn)e.Row.Cells.FromKey("SomeKey").Column;
    CellItem ci = (CellItem)col.CellItems[e.Row.Index];
    DropDownList dropDown = (DropDownList) ci.FindControl("placeHolder1"); 
    if (e.Row.Index == 5)

        dropDown.SelectedIndex = 3;

     

Children