Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 2nd, 2012, 10:55 AM
Registered User
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem editing nested datalist from outer datalist

ok here is my question. I have two tables in my database , doctorate and doctoratefeildofstudies tables, but data is comming into this two tables from one form on a web page called doctorate.aspx, onclick of my submit button it splits the data on the form and inserts them into the two tables using link to sql.

Now, i split the form so that it insert its records into two tables because of the primary and foreign key relationship, secondly, the doctoratefeildofstudies table data comes from a chechboxlist, of which i dnt want to have a comma seperated data in a feild in my doctorate tables, thats why i split the tables into two, also the doctorate table is the primary key table.

now what i want is this, you know for every datalist controls to run into edit mode, its either it responds to itemcommand which you use your if statment to check which button was clicked by checking its commandname or it responds to oneditcommand. now since i have my edit button on the outer datalist control, when i click the outer edit button it only gets the outer datalist into edit mode. but what i want is that as i click the outer edit button, it gets both the outer and inner datalist into edit mode since the data are supposed to appear on the page as one. so what i did was to create an itemcommand for the innerdatalist, wrote the whole edit logic, i also wrote the itemcommand for the outerdatalist, the onclick of the outerdatalist edit button, i the wrote an event handler inside the outerdatalist itemcommand which handles the itemcommand of the innerdatalist, so both of the can go into edit mode together. but not working. pls help. another option is to put an edit button inside the itemtemplate of both datalists controls, but if i do the it will look like data from two seperate tables. But i dont want that, all i want is that as i click the outer edit button, that same button will turn both datalists controls into edit mode at the same time.

I used linq to sql for my retrieval and objectdatasource for my binding





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem editing nested datalist from outer datalist babafemi ASP.NET 4 General Discussion 0 February 2nd, 2012 10:53 AM
Nested datalist arijoy ASP.NET 1.0 and 1.1 Professional 0 December 6th, 2006 01:23 PM
Nested DataList Problem orcities C# 0 July 12th, 2004 01:40 PM
HELP!!! Datalist Editing cjcd ASP.NET 1.0 and 1.1 Basics 1 April 3rd, 2004 08:17 PM
Datalist editing not working cjcd ASP.NET 1.0 and 1.1 Basics 4 April 3rd, 2004 07:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.