I've done this as follows...
UNDER <Columns> tag, i've added
<igtbl:TemplatedColumn key="Year of joining" AllowUpdate="Yes"
<Header Caption="Year of joining">
<RowLayoutColumnInfo OriginX="2" />
</Header>
<Footer>
</Footer>
<CellTemplate>
<asp:DropDownList ID="DropDownList1" runat=server Width=70px>
</asp:DropDownList>
</igtbl:TemplatedColumn>
Here, I've used NorthWind as the data source.... and i hav dropdown appearing for each row in the grid.. but
==> all dropdowns are like appearing in 1st column with the caption "Year of joining"..
==> If I set IsBound="true" in TemplatedColumn tag ... then all my DropDowns disappear
How can i tackle this...??? OR Is it like I can't use DropDowns for NorthWind Database......
I want to populate the DropDown list and use it to update, insert into the NorthWind Dtatabase using the Ultrawebgrid....
Can any1 plz help me in these????
Hello,
It really depends on the specific situation. An approach that might be applicable in this situation is to hook the grid InitializeRow event and to find the dropdownlist directly from there (I assume that the dropdown will be placed in a templated column): TemplatedColumn col = (TemplatedColumn)e.Row.Cells.FromKey("dropDownContainer").Column;CellItem ci = (CellItem)col.CellItems[e.Row.Index];DropDownList archive = (LinkButton)ci.FindControl("dropDownListID");
From what I see, you are using the standard built-in asp:GridView (or DataGrid) control - is this the case? System.Web.UI.WebControls.TemplateColumn is a templated colunm in the standard grid and not in Infragistics UltraWebGrid.
Can you please paste your complete ASPX code? There is something strange that is going on, so maybe this will probide additoinal clues.
sorry some problem in the browser thatI've sent .aspx code through mail Rumen... hope u wod hav got it...
I've attached the code here below now
<%@ Register Assembly="Infragistics2.WebUI.WebCombo.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
</head>
<body>
<form id="form1" runat="server">
<div>
<igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server"
Height="310px" Style="z-index: 100; left: 53px; position: absolute; top: 126px"
Width="681px" OnDeleteRow="UltraWebGrid1_DeleteRow" OnInitializeLayout="UltraWebGrid1_InitializeLayout" OnUpdateGrid="UltraWebGrid1_UpdateGrid" OnUpdateRow="UltraWebGrid1_UpdateRow" OnInitializeRow="UltraWebGrid1_InitializeRow">
<Bands>
<igtbl:UltraGridBand AllowAdd="Yes" AllowDelete="Yes" AllowUpdate="Yes">
<Columns>
<asp:ListItem Value="1990" Text="1990" Selected=True/>
<asp:ListItem Value="1991" Text="1991" />
<asp:ListItem Value="1992" Text="1992" />
</Columns>
<RowEditTemplate>
<br />
<p align="center">
<input id="igtbl_reOkBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px"
type="button" value="OK" />
<input id="igtbl_reCancelBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px"
type="button" value="Cancel" /></p>
</RowEditTemplate>
<RowTemplateStyle BackColor="White" BorderColor="White" BorderStyle="Ridge">
<BorderDetails WidthBottom="3px" WidthLeft="3px" WidthRight="3px" WidthTop="3px" />
</RowTemplateStyle>
<AddNewRow View="NotSet" Visible="NotSet">
</AddNewRow>
</igtbl:UltraGridBand>
</Bands>
<DisplayLayout BorderCollapseDefault="Separate" Name="UltraWebGrid1" RowHeightDefault="20px"
Version="4.00" AllowAddNewDefault="Yes" AllowDeleteDefault="Yes" AllowUpdateDefault="Yes">
<FrameStyle BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="8pt"
Height="310px" Width="681px">
</FrameStyle>
<Pager>
<PagerStyle BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
<BorderDetails ColorLeft="White" ColorTop="White" />
</PagerStyle>
</Pager>
<EditCellStyleDefault BorderStyle="None" BorderWidth="0px">
</EditCellStyleDefault>
<HeaderStyleDefault BackColor="LightGray" BorderStyle="Solid">
</HeaderStyleDefault>
<RowStyleDefault BackColor="White" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px"
Font-Names="Verdana" Font-Size="8pt">
<Padding Left="3px" />
</RowStyleDefault>
<AddNewBox Hidden="False">
<BoxStyle BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
</BoxStyle>
</AddNewBox>
<ActivationObject BorderColor="" BorderWidth="">
</ActivationObject>
<AddNewRowDefault Visible="Yes">
</AddNewRowDefault>
</DisplayLayout>
</igtbl:UltraWebGrid>
</div>
top: 38px" Width="289px"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString2 %>"
SelectCommand="SELECT [Title] FROM [Employees]"></asp:SqlDataSource>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="UltraWebGrid1"
position: absolute; top: 95px"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="UltraWebGrid1"
top: 95px" ValidationExpression="^\D[a-z'\s\DA-Z]+"></asp:RegularExpressionValidator>
position: absolute; top: 37px">
</body>
</html>