473,466 Members | 1,378 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Datagrid's comlumn

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

thank's
Nov 13 '05 #1
1 1767
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,"Che cked"),(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)

"R Agam" <ra***@mmm.com> wrote in message
news:OD**************@TK2MSFTNGP10.phx.gbl...
Yes you can. Look for DataGridTableStyle class.
Ronen

"rino" <r.*********@airfire.it> wrote in message
news:eF**************@TK2MSFTNGP10.phx.gbl...
Hi,
can I have one column in my datagrid as ComboBox.
the user must select only determinates values on this column...

thank's


Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
0
by: Richard Ryerson | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls (watch...
2
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
7
by: Dave | last post by:
Are there any add-on products or samples available that can do the following in an vb.net datagrid I want to compare 2 rows in a datagrid - one row from one database and another row for another...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.