GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  Next Question 
 ASP.NET  |  Question 56 of 164    Print  
How a grid can be made editable int ASP.Net?
How to Access a particular cell of Grid?
What is the difference between datagrid and datalist?

  
Total Answers and Comments: 2 Last Update: July 08, 2006     Asked by: ashishmisra78 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 08, 2006 01:35:16   #1  
rspsuba Member Since: March 2006   Contribution: 3    

RE: How a grid can be made editable int ASP.Net?
to make the grid editablepublic void bind() { string str select * from Customer ; OleDbDataAdapter da new OleDbDataAdapter(str con); DataSet ds new DataSet(); da.Fill(ds); dg.DataSource ds;// this reference is used to identify keys in grid dg.DataKeyField CustID ; dg.DataBind(); } then create an event for grid!for update edit deleteprivate void dg_EditCommand(object source System.Web.UI.WebControls.DataGridCommandEventArgs e) { dg.EditItemIndex e.Item.ItemIndex; bind(); // this value is used to mention the respective row of grid idval dg.DataKeys[(int)e.Item.ItemIndex].ToString(); }
 
Is this answer useful? Yes | No
July 08, 2006 01:37:44   #2  
rspsuba Member Since: March 2006   Contribution: 3    

RE: How a grid can be made editable int ASP.Net?
public void bind() { string str select * from Customer ; OleDbDataAdapter da new OleDbDataAdapter(str con); DataSet ds new DataSet(); da.Fill(ds); dg.DataSource ds; // this keyfield is used to identify records dg.DataKeyField CustID ; dg.DataBind(); } private void dg_EditCommand(object source System.Web.UI.WebControls.DataGridCommandEventArgs e) { dg.EditItemIndex e.Item.ItemIndex; bind(); //this is value for identifyin current row idval dg.DataKeys[(int)e.Item.ItemIndex].ToString(); }regards ! rajikiran!
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : we can use the ExecuteNonQuery to perform catalog operations (Insert,Delete,Update) ExecuteNonQuery does not return any rows, any output parameters or return values mapped to parameters are populated with data. executeQuery() is for command objects ...

Latest Answer : ExecuteReader expects to run a query command or a stored procedure that selects records. It expects to have one or more resultsets to return. cmd.Connection.Open(); SqlDataReader dr = cmd.ExecuteReader(); // process ...

Latest Answer : Datagid is a control which is used to display the attribute data at client side.Datareader is a object which is mainly used to store the data executed query data. ...

Latest Answer : Assemblies?Assemblies contains code that the common language runtime executes,An assembly is the unit at which permissions are requested and grantedIt also stores the information about itself called metadata and includes name and verison of the assembly ...

I am searching a record in datagrid.if i enter any value it display record not found,if the record is not there.but i enter Apostrophe it is showing error(Cannot perform 'Mod' operation on System.String and System.String)....how to clear this bug.....
i need answer from someone. 
Read Answers (3) | Asked by : sudhagar

Can i assign datagrid.datasource = datareaderwill it work?will it fill my datagrid with the valuesthankx in advance.parikshit sehgal
Read Answers (10) | Asked by : parikshit

Authentication is the process of validating a user on the credentials (username and password) and authorization performs after authentication. After Authentication a user will be verified for performing 
Latest Answer : Authentication is just like access card for entering inside company. Authorization is doing other works inside the company. ...
Read Answers (5) | Asked by : sanker

What are different properties provided by Object-oriented systems ? Can you explain different properties of Object Oriented Systems? Whats difference between Association , Aggregation and Inheritance relationships?
Read Answers (1) | Asked by : sanker

Latest Answer : The MACHINE.config file contains default and machnine-specific values for all supported setting. Machine setting are normally controlled by the system admin, and app should never be given write access to it.An application can override most default values ...

What is the difference between Session and Cookies. Can we use both in the same webpage. when we should go for cookies.. What are the advantages and disadvantages of both.. Plz send me code also..Thanks in advance..Ravi
Read Answers (2) | Asked by : aspnet


 Sponsored Links

 
Related Articles

ODP.NET - Retrieving Multiple Rows on to the Grid

ODP NET Retrieving Multiple Rows on to the Grid In the previous section we tried to retrieve only one row using OracleDataReader In this section we will try to retrieve more than one row or a result set and populate a DataGridView on a WinForm mosgoogle The following code lists out the details of al
 

N-Tier Architecture: Data Access Layer

N Tier Architecture Data Access Layer In an N Tier architecture the data access layer consists of components that aid one in the process of accessing the database When it is used correctly the data access layer serves as an abstract level for the structures of the database Simple changes that are ma
 

How to Access C++ Class Members

How to Access C Class Members In this C tutorial you will learn how to access Class members dot operator or class member access operator difference between struct and class and  scope resolution operator mosgoogle center It is possible to access the class members after a class is defined an
 

What are Data Access Tools

Data access is the process of entering a database to store or retrieve data. Data Access Tools are end user oriented tools that allow users to build structured query language (SQL) queries by pointing and clicking on the list of table and fields in the data warehouse. Thorough computing history, t
 

What is Access Path

In relational database management system (RDBMS) terminology, Access Path refers to the path chosen by the system to retrieve data after a structured query language (SQL) request is executed. A query may request at least one variable to be filled up with one value or more. A query may look like th
 

What is Access Point

An access point (AP; or also "WAP" for "wireless access point") is a node responsible for the formation of a wireless network through connection between wireless communication devices. It acts as a central transmitter and receiver of wireless radio signals, and is
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape