Datagrid's comlumn

  • Thread starter Thread starter rino
  • Start date Start date
R

rino

Hi,
can I have one column in my datagrid as ComboBox.
the user must select only determinates values on this column...

thank's
 
Hi All,

Add some code in ASPX(html):

<asp:DataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 136px; POSITION:
absolute; TOP: 40px"
runat="server" AutoGenerateColumns="False" Width="336px">
<Columns>
<asp:BoundColumn DataField="id" HeaderText="id"></asp:BoundColumn>
<asp:BoundColumn DataField="value"
HeaderText="value"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="check">
<ItemTemplate>
<asp:CheckBox id="chk1" runat="server" Checked =
'<%#Equals(DataBinder.Eval(Container.DataItem,"Checked"),(object)"Y")%>'/>
</ItemTemplate>
</asp:TemplateColumn>

<asp:TemplateColumn HeaderText="comboBox">
<ItemTemplate>
<asp:DropDownList ID="combobox" Runat =server >
<asp:ListItem Value =1>1</asp:ListItem>
<asp:ListItem Value =2>2</asp:ListItem>
<asp:ListItem Value =3>3</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateColumn>

</Columns>
</asp:DataGrid>



HTH
Regards,

WL(ASP.NET&Web Service)
 
Back
Top