473,494 Members | 2,266 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Urgent:Inserting records from datagrid through drop down list

Respected Assistant

I have table in a database named "student" having fields
like name of student,Roll No and Status.The status is one
of them absent,present or leave.The name and rollno field
is already entered but the status is entered from datagrid
in such a way that name and rollno is feteched from
database and display on datagrid and the status is insert
from the dropdown list in the datagrid.

I want to display the dropdown list in my datagrid and
then the selected value is store in a data base how it
become possible using c#.
thanks
usman.
Nov 17 '05 #1
1 1259
You can use ItemTemplate for creating dropdown in the table

<asp:TemplateColumn HeaderText="Status">
<ItemTemplate>
<asp:dropdownlist ...
</ItemTemplate>
</asp:TemplateColumn>

Then you can access this dorpdown list value in the datagrid by
(DropDownList)(e.Item.Cells[4].Controls[0]).SelectedValue

HTH
Raja

"Muhammad Usman" <mu********@hotmail.com> wrote in message
news:2c*****************************@phx.gbl...
Respected Assistant

I have table in a database named "student" having fields
like name of student,Roll No and Status.The status is one
of them absent,present or leave.The name and rollno field
is already entered but the status is entered from datagrid
in such a way that name and rollno is feteched from
database and display on datagrid and the status is insert
from the dropdown list in the datagrid.

I want to display the dropdown list in my datagrid and
then the selected value is store in a data base how it
become possible using c#.
thanks
usman.

Nov 17 '05 #2

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

Similar topics

4
1084
by: SK | last post by:
Hi i m populating a datagrid with data from excel. is it possible to take the datatable in this dataset and create the same as a new table in SQl database. can some one gimme ideas to solve the same...
4
2551
by: riteshjain82 | last post by:
Hi, I am maintaining a site which is written in ASP. Now i have to create some new pages. In one page we have a table with many rows. Now, I want to enable or disable(showing and hiding also) 2...
0
1323
by: AdrEsqu | last post by:
Can anybody show me how to display a bitmap impage in a datagrid cell? Code: grid.AddNewRow() GridCell cell = grid.AddNewCell(); cell.Text = ???????????????
8
7557
by: Ed Dror | last post by:
Hi there ASP.NET 2.0 VB & SQL Express Lest take Northwind Categories Products as example I create a table that hold these two together and I create a stored procedure like select ProductID,...
0
977
by: chipxsd | last post by:
Folks, please I need your help! I use the .resx to embed the resources in to the assembly. I'm curious how do I get the list of all resources from the assembly. One of my .resx file looks like...
1
2422
by: ºa¤Ö | last post by:
Dear All Experts I faced a problem, I had developed a UserControl (just a simple display the website logo), and added into a ASPX page. Inside the ASPX, i have a DataGrid control, and it...
2
1541
by: msrahul | last post by:
HI ALL Plz Help Me. I have a datagrid with a few colums. One column is conaining 1's or 0's. Its like a flag column. It either has 0 or 1. Now what i need is that if any row has 1 in this column...
2
1311
by: Brock | last post by:
Thanks in advance...I have what seems like it should be a simple thing for a DataGrid. What I'll be using this for is for a user to choose an employee record on the datagrid then hit the detail...
1
1586
by: Sambit123 | last post by:
Hi, This is problem in Pocket PC programing using C#(compact framework).. Can I change the gaps between Cells in DataGrid ? If yes how.... I want to change the font of aparticular Cell when...
0
7119
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7195
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...
1
6873
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7367
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...
1
4889
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
4579
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
1400
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
644
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.