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.
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;