[quoted text, click to view] On 30 May, 06:37, Rick <e_man_onl...@hotmail.com> wrote:
> Hi,
>
> I don't have hands on experience in ASP .NET but have been assigned to
> a web application, and I'm learning in the school of hard knocks. How
> comes GridView has no support for adding/inserting new records, when
> this is a routine task for any application? In the eighties almost any
> product already supported that (FoxPro, Clipper, etc) why are we going
> backwards? Would someone help me, please?
That's because Web applications are not like Windows applications. The
web application front end is being delivered via a web browser that
can only understand W3C compliant code and whatever controls and
behaviours the browser can support (some enhancement is possible via
Javascript but that too has its limitations). It's not easy emulating
major windows based (or maybe DOS) applications like those you
mention, especially since screen updates usually require roundtrips
between the server and client over the internet, not to mention the
limitations due to lack of program state retention (Session variables
state can help but time-outs can cause problems).
[quoted text, click to view] >
> a) My gridviews need to allow the user to add new records on an empty
> grid line at the end of the grid's data, not on a separate form.
It can be done but only with a lot of extra code to insert a blank
record into the data table, sort the data so that it is the last
record, find the index value and then putting the Grid into edit mode
with the EditIndex property set to the new record index. Also be
mindful that the index of each row being displayed is relative to it's
position on a particular page of the grid if paging is enabled (you'll
also need to ensure the last page of the grid is being shown).
[quoted text, click to view] >
> b) The button for edit an existing row needs to be outside of the grid
> (no repeated buttons on each line), but if I do that, how can I make
> the edit textboxes appear on the grid line?
In other words how do you tell the application which record to edit,
then either signal an update or cancel the changes.
Again the behaviour of text boxes on a Web form are not like those on
a Windows data grid where they can switch between display and edit
modes. On a web form it has to be one or the other, i.e a read-only
text on the page, or a text box.
Sorry!