- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
DataGrid Interview Questions & Answers - Learning Mode

DataGrid Interview Questions & Answers - Learning Mode

Data Grid is the standard control for viewing data in .Net environment. A data grid control is represented in .Net by System.Windows.Forms.DataGrid class.

Try DataGrid Interview Questions & Answers - Exam Mode

1 2 Next

Sort By : Latest First | Oldest First | By Rating

DataGrid Interview Questions & Answers - Learning Mode
Try DataGrid Interview Questions & Answers - Exam Mode
Question: How to sort the data in Datagrid ? when we use DataBound event of Datagrid, I want to display te data using controls....
For an example,
If i click a button, which is outside of the datagrid, entire data should be shown. 1st column in TextBoxs. second column in Drop down List Boxs..
How to bind the data in Dropdownlist,which is in DataGrid at run time?
Row1 Row2 Row3 Row4 ----------------- This is the record in datagrid...

When we click button (Bottom of the DataGrid), This Record should be shown...
Row1 in TextBox,,, Row2 in TextBox, Row3 in DropDownlistbox, Row4 in TextBox...
How to do this one?
Which event we should use?

Answer: Sorting in DataGrid.Using the SortCommand Event in the datagrid u can sort the value in datagrid.For Example.Dim con as new oledb.oledbconnection("connectionstring") sql as stringsql="query"Dim DataAdapter as new oledb.oledbdataadapter(sql,con)dim ds as new datasetdataadapter.fill(ds)Private Sub DGMain_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles DGMain.SortCommand Dim datasort As DataView datasort = LocalLibrary.GetD Source:
Question: How do I change the grid popup editor font?

Answer: Another one from the list. Herald asked > I changed the font for the DATA Grids, so I could look at Unicode. Now I see the chosen font in the datagrid, but if I open the popup editor it still gives the old font. Is it possible to change this font also, I didn't find it in the options, or could you make the grid popup editor font the same as the data grid font.

After much searching, Brad supplied the following obvious LOL solution :

Go to View → Toad Opti Source:
Question: How to insert value in the combo box cell of dataGridView using insert query in C#?How to handle the data error event?

Answer: we can insert details by two types

mostly we use stored procedure.
so we have to create insert query in database.

create database emp
create table empdetails
empid int,
name varchar(20),
salary money

create proc insertdata
(@empid int,@name varchar (20),@salary money)
insert into empdetails
values empid=@empid,name=@name,salary=@salary
exec insertdata

Question: How do I delete a record?

Answer: Assuming that the result set is editable (i.e. you have written a query that includes the ROWID, or you have used the TOAD Edit command), you can do one of the following:

"Delete row" button on the SQL Editor toolbar
Single Record View, Delete Button

Question: How can I see the data in nested tables?

Answer: TOAD 7.5 and up can show nested table data in popups from the data grids if you are using an 8.0 or higher Oracle client. The nested table data will appear in the grid cell as "(DATASET)". Right-click over this cell and choose "Popup editor". TOAD 9.0.1 now supports nested table data in its "run as script" function. TOAD versions 7.4 and previous do not support nested table data due to a limitation in their data layer. Source:
Question: Why can't I edit the results of a query in the SQL Editor?

Answer: Query statements MUST return the ROWID to be updatable. For example:

select * from employee where salary > 2000

would not be updatable, whereas:

select employee.*, rowid from employee where salary > 2000

would be updatable.

To reduce this obvious nuisance, you can use the TOAD-specific EDIT statement. For example:

edit employee where salary > 2000

If the resultset should be editable but remains read-only, make sure the TOAD Options > D Source:
Question: Why can't I add an entry via the grid for a table containing a CLOB column?

Answer: In older versions of TOAD, the grid is limited to adding/modifying CLOB's for existing records. This should be working in TOAD 7.6. Note, however, that since TOAD does not support Unicode databases, that there are often errors when viewing CLOB data in the data grids for databases with Unicode character sets. Source:
Question: Why does saving to XLS instance not work sometimes?

Answer: From the Toad lists.

One of my co-workers experiences a very strange problem. When he is saving the results of a query using "Save As" into Excel Instance nothing happens. There is 1 opened Excel and it stays empty. All other "save as" option work fine (including saving into Xls File). What could be the problem?

John Dorlon replied :

Close excel.
Look in task manager.
If you still see excel running, kill it.

It seems Source:
Question: In DataGrid, is it possible to add rows one by one at runtime. That means after entering data in one row next row will be added.

Answer: Yes, for this you have to use datatable and after inserting the first row in datatable u have to bind that datatable to the grid and next time , first u have to add the row in datatable and next bind it to datagrid. keep on doing.
u have to maintain the datatable state.
Question: My string data is all coming out as question marks!

Answer: We have found that this happens when the database character set is WE8ISO8859P1, and the Oracle client is This is an Oracle bug, and upgrading your client to or higher should resolve the problem. In any other case, please generate a TOAD Support Bundle from the Help menu and let us know what you are seeing. Thanks! Source:
Question: Why can't I add a new record by hitting the down arrow key in the data tab?

Answer: Please upgrade your copy of TOAD to at least version This functionality has been restored. Source:
Question: How to add DateTime Control in ormal DataGrid Server Control

Answer: cvv Source:
Question: How do I name the tabs when I run a script?

Answer: When you run a script in the MOE using F5, the output of the script is displayed at the bottom of the screen. Each command creates a separate tab for its results, as well as being included in the main script output tab. These tabs are simply named 'Grid n' where n is an incrementing number starting at 1. If you run a script with 5 SELECT statements, you get 'Grid 1' though 'Grid 5'.

A question on the list from Roger Simoneau, asked how we could programatically rena Source:
Question: What is the OCI Buffer Array Size option for in the View - Options - Oracle - General section?

Answer: After a SELECT query is executed, we must retrieve the rows from the Oracle server to your PC. We do not retrieve the rows all at once, nor do we retrieve them one at a time (unless there is a LONG or LOB column involved). We retrieve the rows in blocks. The number of rows retrieved in each block is the number of rows you specify with "OCI Array Buffer Size". TOAD defaults to 25 because SQL*Plus defaults to 25. In my opinion, an optimal setting is more like 500 or 1000. Here is why: If your data Source:
Question: What is the Clone Cursor Options for on the SaveAs dialogs in the Schema Browser and (SQL) Editor?

Answer: When "Clone Cursor" is turned OFF, and a user goes to the "save as" screen and begins an export, we use the actual cursor which is tied to the data grid. The advantage to this is that the query does not need to be re-executed. The disadvantage to this is that the whole dataset must be held in your PC's RAM, because this is a scrollable dataset (it is this mechanism that allows scrolling in the grids). When "Clone Cursor" is turned ON, and a user goes to the "save as" screen and begins an exp Source:
Question: How to refresh the data in datagrid automatically

Answer: For refreshing data in data grid control we can use chasing technique
Question: How can I view the Chinese and Japanese character sets through Toad?

Answer: Reset NLS_LANG on your Client machine to AMERICAN_AMERICA.JA16SJIS to view Japanese and AMERICAN_AMERICA.ZHT16BIG5 to view Chinese. Then change the font script for each language by right clicking on the data and choosing Grid Options | Data Grids - Visual | Fonts | Grid and choose Arial Unicode MS as the Font. This changes the script to Japanese for Japanese characters or to ChineseBig5 for Chinese. Source:
Question: How can I see nested object data?

Answer: TOAD 7.5 and up can show nested object type data in popups from the data grids if you are using an 8.0 or higher Oracle client. Right-click on the cell that should contain the data and choose "Popup editor". TOAD 9.0.1 now supports nested object data in its "run as script" function. TOAD versions 7.4 and previous do not support nested object data due to a limitation in their data layer. Source:
Question: Consider a sales invoice and the programmer has to save multiple items in one sales invoice. On entering the rate and qty, the amount and total amount should be automatically calculated. The invoice number will be the same for all items in that invoice. Item, Rate, Qty Amount will be in grid and total amount will be voucher wise. Please let me know the coding for that.

Answer: No answer available currently.
Question: What is the Datagird ?

Answer: Displays text and controls in columns and rows using a template to control appearance.Datagrid controls have built in formatting, sorting and paging capabilities. Source:

1 2 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.03125 Seconds