i am trying to delete using Gridview from child first and check if there is no child to delete in parent table i am using sql datasource in the delete tab in sql datasource i put DELETE FROM table1 WHERE (IDtable = @IDtable) IF (SELECT count(*) FROM table1 WHERE parent_dtl_id = 66) =0 BEGIN delete from parent_dtl where order_dtl_id= 66 END
i deleted all items,deleting from 2 tables child and parent was successfully on the last row from gridview but i have this error on my page on the last delete Specified argument was out of the range of valid values. Parameter name: value
i want to create one treeview dynamically which will have child node and sub child node.for this i am getting my treeview value from the table with below column:Id,Name,Parent,IsActivewhere main parent nodes parent id will be 0 and then all other records parent id would be related id. the table structure would look
I have 3 Tables Order, OrderDetails, Item and Order is A parent and Oreder Details is The Child i want when I Select any Order and Delete it to Delete all Its OrderDetials Childs So Could Any One Tell Me what is The Delete Code i will Write in Delete Get and Delete Post Function and How can I Handle That
I have a table that needs sorting by its hierarchial structure of parent-child.
An example of my table is below
As you can see above, my table structure follows this pattern
My overall aim is to have the sql order the table for me, and by using this new "depth" column, I will be able to indent by categories in the menu on the front end, you have probably seen this before, but all the tutorials I have read dont really explain it very well, or assume you are sql savvy.
I have two tables dept and employees those table have parent and child relation ship link column is deptno i want to delte department even this departmetn contains employees i want to write storedprocedure for first delte employees and after department if i wrtie these two querys in storedprocedure will i get any problems
Begin Delete from tbl_employees where Department_Id=@Department_Id Delete from tbl_Department where Department_Id=@Department_Id RETURN END
Simple and blunt: my cascading dropdownlists clear when a postback occurs. Does anyone know a quick way around that?For more information, read on...
I have 5 dropdown lists that define a training class location and line of business: Site, Parent Client, Client, Program, Project I'm trying to build cascading dropdownlists that can work from any direction (i.e. select a site and all other lists are filtered by site...select a project and all other dropdown lists are filtered by project). I've built the SQL Select statement behind the lists that filters (accurately).
In my website I have two forms: parent form and child form(dialog box). Their expected behaviour is like this: if clicked on 'show' button on parent form, a dialog form opens that displays a gridview. In dialog form, if clicked on 'select' button it closes itself and returns value in selected row back to parent form.
To achieve this I write following code (.cs) : in parent form:
void ShowBtn_Click(object sender, EventArgs e)
StringBuilder jScript = new StringBuilder(); [code]....
Now problem is: the code in parent .cs works fine, it opens the dialog properly. But when clicked on 'select', instead of returning back to parent, it opens the same dialog again in new window. This newly open window says "Done but error on page" at left bottom.
I have a parent page with two data controls. I want to be able to open a child window, do something on it, and when it closes I want to rebind only one of the two data controls on the parent page. I have the control I want to update within an UpdatePanel so would like to call rebind it and call UpdatePanel.Update().
I have one table named 'dbo.ac_Products' Within this table there is a column named 'ProductId' There is also another table named 'dbo.ac_CatalogNodes' Within this table there is a column named 'CatalogNodeId' and a column named 'CatalogNodeType'
I need to delete all the rows from 'dbo.ac_Products' and 'dbo.ac_CatalogNodes' where 'ProductId' = 'CatalogNodeId' and 'CatalogNodeType' = 1
I had populated data in TreeView control. How will I drag a particular child node from a parent node and drop the dragged one to a DIV or any portion, using JQUERY ? I know in jquery, there are methods "draggable" and "droppable" to make this possible. But I want to drag a particular child node and drop it.
Or atleast How to fetch the text/id of a particular child node using jquery ? I hope I can drag,if I can fetch the child node
On our site we have a top menu, and a side menu. Other than using the same sitemap, they don't have any other relationship.
On the top menu, we only show the top links, with 0 child nodes, which is what we want.
On the side menu however, we want to show all the child pages when someone hovers over the main links. Some have up to 12 child nodes, and some only 1.
Our challenge is hiding a couple of specific pages from that menu.
An example is a "thanks for contacting us" page which is under the main "contact us" page. Otherwise, a person can hover over the contact page link and see the "thanks" page as a link - and we don't want people going directly to the thanks page. So, we want just "Contact" to show in that menu, no matter where a visitor is in the site.
I have tried a couple of solutions but they haven't worked. Is there an easier way to hide them?