Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kmeyer

@kmeyer
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Why don't companies like Borland see the obvious? [modified]
    K kmeyer

    Borland did have it once, Quatro Pro the dos version had tabbed workbooks and quite few other features that later appeared in Excel. Paradox (Dos) was a great appliction, handled databases on a 386 with forms and procs and no no system memory compared to todays world of resource hungry Java & .net all before Ms Access was even heard of. There were a lot of business applictions written in Paradox for Windows in the early days of Windows as well. Then can came Delphi 1 with object pascal, light years ahead of any Win 32 development platform from the other vendors, I cant recall where VB was at the time I am pretty sure VB was not capable of compiling anything in those days, Delphi exe database front ends flew, for those of us old enough to remember. Kim

    The Lounge csharp c++ delphi visual-studio business

  • Insert from GridView to DetailsView record
    K kmeyer

    Thankyou for your patience, I will keep chipping away at it and take on board your suggestions. I have been trolling the Net on and off for a couple weeks and am pleased I am not the only one in this prediciment. Both the Gridviewguy and Gridviewgirl sites are good and I have seen posts from Gridviewguy assisting on forums but unless I missed something I could not see an example of what I am doing. Scott Mitchell (www.4guysfromrolla.com) also has contributed some good examples to the Microsoft MSDN site at the following link. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx.asp Scott has also contributed a number of good articles for Microsoft under learn at www.asp.net There are 13 articles with more coming and can they be downloaded as PDF files At the moment I am compiling eveything I have trolled up and will go through it again in case I have missed something. I am trying to teach myself C# ASP.NET whilst building an in house application. My previous backgroud dates back to the xbase dos pre Windows days and then some early db work in Delphi and object pascal, so I am starting from scratch. Thanks Again Kim

    ASP.NET question database algorithms tutorial

  • Insert from GridView to DetailsView record
    K kmeyer

    Thankyou for the reply, it would seem from the number of posts on various ASP.NET forums I am not alone. I am not alone, I will explore the RowDataBound event as a means to capture the values in the GridView (CustomerID & Name) I thought this was going to be easy, hooking up a Gridview and DetailsView for some standard Master/Detail data entry. For anyone reading this post if you can recommend a good book that focuses on C# ASP.NET database front ends I would appreciate knowing its name. I have already purchased 3 books reviewed on the Microsoft site, one is over 1000 pages only find very little on hooking up these two controls in a real world examples. I have both forms linked and working well when details data exists. I also have the DetailsView defaulting to Insert by using the following useful code snippet I found on another post, when there is no detail record. protected void SqlDataSource2_Selected(object sender, SqlDataSourceStatusEventArgs e) { if (e.AffectedRows < 1) { DetailsView1.ChangeMode(DetailsViewMode.Insert); } } Its at this point I want to populate the CustomerId & Name values from the selected Master record into the empty DetailsView record which is on a different page. Many smaller examples show both controls on the same page. I have tried the following from a post by Polita Paulas the creator of the GridView, DetailsView and FormView controls. "The best way to do this is to handle the DataBound event, check if the Mode is Insert, then set the text in the controls to the default properties. For instance: protected void DetailsView1_DataBound(object sender, EventArgs e) { if (DetailsView1.CurrentMode == DetailsViewMode.Insert) { ((TextBox)DetailsView1.Rows[0].Cells[1].Controls[0]).Text = "Default"; } } " I have tried this with test data and cannot seem to get it to work, the Cell always remains empty, no errors are thrown. A number of posts suggest you must use template fields, like the following post, I could not get this to work either. protected void DetailsView1_DataBound(object sender, EventArgs e) { if (DetailsView1.CurrentMode == DetailsViewMode.Insert) { TextBox tb = (TextBox)DetailsView1.FindControl("TextBox1"); tb.Text = DateTime.Now.ToShortDateString(); } } I am thinking this must be so easy and thats why my posts on this site and another go vertually unanswered or its too hard and no one really knows.

    ASP.NET question database algorithms tutorial

  • Insert from GridView to DetailsView record
    K kmeyer

    Hi All, Probably seems like a stupid question but how do I pass something like a CustomerID value from a GridView master record to an attached DetailsView form when creating a new details record in Insert mode. I have been searching for a good example and can only find samples working with existing records in both the Master and Detail tables. What I am trying to do is open the DetailsView form in Insert mode perhaps with a LoadForm event or similar when the attached query returns no detail records and automatically pass the key record value for a new details record from the GridVew. I do not want the user inputting this information and would also like to possibly insert other values into the details record from the selected master in the GridView at the same time. :~ Thanks in advance Kim

    ASP.NET question database algorithms tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups