Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > MCAD > datagrid

Reply
Thread Tools

datagrid

 
 
chris
Guest
Posts: n/a
 
      02-02-2004
Hello Group,
I came across this question and would like to know the
solution for the same:

Q>You are creating an ASP.NET page for your company. You create a DataGrid
control that displays past purchases made by the user. The DataGrid control
is populated from an existing database when the page is created.

The page contains TextBox controls that allow users to update their personal
information, such as address and telephone number. You need to ensure that
the page is refreshed as quickly as possible when users update their contact
information.

What should you do?

A. Set the Enabled property of the DataGrid control to false.
B. Set the EnableViewState property of the DataGrid control to false.
C. Write code in the Page.Load event handler that populates the DataGrid
control only when the IsPostBack property of the page is false.
D. Write code in the Page.Load event handler that populates the DataGrid
control only when the lsPostBack property of the page is true.

Thanks,
Chris.


 
Reply With Quote
 
 
 
 
ratpik
Guest
Posts: n/a
 
      02-02-2004
Setting the enabled to false will wipe the control right
off the form, the view state has very little to do with
refresh speed in most circumstances, although u can get a
bit more speed with no view state. The IsPostBacks are
the ones to look at, u only really want to fill the grid
from your datasource on the first load if your view state
is on. if u turn the view state off then u have to
populate it every time. i would suggest leaving view
state on and fill if(!IsPostBack)


>-----Original Message-----
>Hello Group,
> I came across this question and would

like to know the
>solution for the same:
>
>Q>You are creating an ASP.NET page for your company. You

create a DataGrid
>control that displays past purchases made by the user.

The DataGrid control
>is populated from an existing database when the page is

created.
>
>The page contains TextBox controls that allow users to

update their personal
>information, such as address and telephone number. You

need to ensure that
>the page is refreshed as quickly as possible when users

update their contact
>information.
>
>What should you do?
>
>A. Set the Enabled property of the DataGrid control to

false.
>B. Set the EnableViewState property of the DataGrid

control to false.
>C. Write code in the Page.Load event handler that

populates the DataGrid
>control only when the IsPostBack property of the page is

false.
>D. Write code in the Page.Load event handler that

populates the DataGrid
>control only when the lsPostBack property of the page is

true.
>
>Thanks,
>Chris.
>
>
>.
>

 
Reply With Quote
 
 
 
 
Sharmila
Guest
Posts: n/a
 
      02-03-2004
Hi,
I think the answer is D.
To explain as simple as possible,
As we need to ensure that data as updated ASAP u need to
refrese the datagrid data as soon as the database is
updated..which is done when the page is posted back when
user edits textbook controls.So write code in Postback(i.e
Ispostback property is true) to update the datagrid with
new data.
Oops has this remained simple.....

I hope I am right here!!

>-----Original Message-----
>Hello Group,
> I came across this question and would like

to know the
>solution for the same:
>
>Q>You are creating an ASP.NET page for your company. You

create a DataGrid
>control that displays past purchases made by the user.

The DataGrid control
>is populated from an existing database when the page is

created.
>
>The page contains TextBox controls that allow users to

update their personal
>information, such as address and telephone number. You

need to ensure that
>the page is refreshed as quickly as possible when users

update their contact
>information.
>
>What should you do?
>
>A. Set the Enabled property of the DataGrid control to

false.
>B. Set the EnableViewState property of the DataGrid

control to false.
>C. Write code in the Page.Load event handler that

populates the DataGrid
>control only when the IsPostBack property of the page is

false.
>D. Write code in the Page.Load event handler that

populates the DataGrid
>control only when the lsPostBack property of the page is

true.
>
>Thanks,
>Chris.
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Datagrid: how cut short display of a long description in a datagrid column Brian K. Williams ASP .Net 0 03-02-2004 08:35 PM
RE: Datagrid: how cut short display of a long description in a datagrid column =?Utf-8?B?U3VyZXNo?= ASP .Net 0 03-02-2004 08:31 PM
datagrid in datagrid BK Kim ASP .Net 1 03-02-2004 06:34 AM
Call Datagrid Command column outside datagrid Dave ASP .Net 0 11-20-2003 11:11 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57