Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

ASP.NET GridView Control basic question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny Jörgensen - 12 Mar 2008 17:09 GMT
This is probably a stupid question, but I've never used the ASP.NET GridView
control before, so I hope you'll bear with me and give me a clue.

I've got a Gridview on my webform to show the contents of a database table.
It's configured to show both "edit" "delete" and "insert" options in the
commandfield.

That's all well and fine, the edit and delete options work as they're
supposed to, but I simply don't understand the insert row functionality.
First of all: When I start out, my table is empty. That means that instead
of rows, the EmptyDataText is show, and thus no "insert" button is shown in
the grid. How do I go about inserting the first row?

Second: When my table DOES contain data, all three options are shown, but
the Insert option doesn't do anything. Are there other properties I have to
set or other considerations I have to make than just set the CommandFields
ShowInsertButton property to true?

Cheers,
Johnny J.
Johnny Jörgensen - 13 Mar 2008 11:26 GMT
OK, I spend all day yesterday trying to figure out why it didn't work. At
last I went out and bought myself a book about databinding in ASP.NET - and
there I learned that it isn't possible at all inserting rows in the GridView
control - you have to use the DetailsView control for that.

Stupid me, I assumed that the Web GridView worked like the Winforms
DataGridView control...

However, it would have save me a lot of time plus 100 bucks if somebody
could just have told me right off that it wasn't possible.

/Johnny

> This is probably a stupid question, but I've never used the ASP.NET
> GridView
[quoted text clipped - 20 lines]
> Cheers,
> Johnny J.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.