Blog Home  Home Feed your aggregator (RSS 2.0)  
artiso Blog - Infragistics WebGrid Control in einer Zelle ansprechen
Neues rund um's Thema .Net
 
 Wednesday, August 08, 2007

Will man in einem Infragistics WebGrid ein Control in einer Zelle einer TemplatedColumn ansprechen, dann ist das gar nicht so einfach wie zunächst vermutet. Man muss ein paar Umwege einlegen. So funktionierts aber dann:

protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
{
   
DropDownList ddlUnit = ((DropDownList)((CellItem)((TemplatedColumn)e.Row.Cells.FromKey("Unit").Column).CellItems[e.Row.Index]).Controls[1]);
    ....
}

Statt dem Controls[1] könnte man auch noch ein FindControl() nutzen, das wäre noch etwas eleganter.

Wednesday, August 08, 2007 10:05:43 AM (Mitteleuropäische Zeit, UTC+01:00)  #    Comments [0]    |   | 
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Copyright © 2008 Thomas. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: