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;
Hi
i m sending you the code..i m using right now,
oGrid = igtbl_getGridById(grid);
but this doesnt work ...
var oNewRow = igtbl_addNew(oGrid, 0);
but i failed to execute.
i send the parameters for this function as AddNewRow('taskgrid.ClientID')
i want to addrow when there is no rows in the gird also...
tell me where am i going wrong...
I successfully added and saved the row.But when the page is posted back , the newly added row appears, but its details such as grid.rows.count doesnot taken into account of newly added row.
How do i correct this.
yes, you are right... i got it worked now... thanks a lot.
I have same requirement, but need to fetch the selected value from dropdown list from javascript.
I was trying to do so like
grid.Rows.getRow(num).getCellFromKey(
"Type").getValue(0)
Thanks
Sandip