Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

nested gridview problem

Posted: Dec/14/2010   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:197   Vote Up (0)   Vote Down (0)    

Hi I want a simple nested gridview to display data records, that's it, very basic no edits, etc. Just when user clicks on grid a nested grid

appears for order showing.  Right now I get an error, object expected when I click on the grid defaulting at runtime. I don't have

gifs for images, or an image folder, I don't think that would cause an error, or the second grid not to display???

Here's my code. Any help would be deeply appreciated. Many thanks!

<script>
 
   function switchViews(obj,row)
        {
            var div = document.getElementById(obj);
            var img = document.getElementById('img' + obj);
           
            if (div.style.display=="none")
                {
                    div.style.display = "inline";
                    if (row=='alt')
                      {
                           img.src="Images/expand_button_white_alt_down.jpg" mce_src="Images/expand_button_white_alt_down.jpg";
                       }
                   else
                       {
                           img.src="Images/Expand_Button_white_Down.jpg" mce_src="Images/Expand_Button_white_Down.jpg";
                       }
                   img.alt = "Close to view other customers";
               }
           else
               {
                   div.style.display = "none";
                   if (row=='alt')
                       {
                           img.src="Images/Expand_button_white_alt.jpg" mce_src="Images/Expand_button_white_alt.jpg";
                       }
                   else
                       {
                           img.src="Images/Expand_button_white.jpg" mce_src="Images/Expand_button_white.jpg";
                       }
                   img.alt = "Expand to show orders";
               }
       }
  
</script>

<div>
  &nbs

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

Edit GridView Cells in ASP.NET

  
You may not want the entire row in edit mode if you are using DropDownList controls for several columns in the EditItemTemplate. If each DropDownList has many options then loading them all at once may result in a sluggish page. Also, if your data structure is more like a 2 dimensional array rather than a set of rows, you may want to edit each cell individually.

How to format and update GridView and DataGrid rows using JQuery

  
The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Selecting Checkboxes inside the GridView Control

  
The ASP.NET GridView control is the successor to the ASP.NET DataGrid control which has many built in functionalities like paging, sorting, editing or deleting data. In this article I will explain how to select checkboxes inside the GridView control.

Gridview paging and multiple row delete using checkbox

  
This article gives you information about GridView paging and multiple row deletion using CheckBox selection and LINQ.

GridView Formatting

  
This article shows how to format a GridView. What is GridView? The GridView is an extremely flexible grid control for showing data in a basic grid consisting of rows and columns. It has selection, paging and editing feature, and it is extensible through templates. The great advantage of Gridview over Datagrid is its support for code free scenarios. In GridView you can do many things without writing any code like paging and selection.

Introducing ASP.NET 2.0: GridView Control

  
In this article, you will learn how to work with the GridView control using the data from a Microsoft Access database. I will examine how to perform advanced tasks such as displaying, sorting, paging, updating and deleting data using one of the powerful controls included with Visual Studio 2005 in a step-by-step manner.

ASP.NET 2.0 Tutorials : GridView Filtering

  
In this tutorial you will learn how to add a filter to a Grid View Control, To modify the query with a parameterized filter, the WHERE Clause, Parameter properties, Parameter Value Editor and To test filtering.

Running Total In Gridview Footer in ASP.NET C# VB.NET

  
In this example i am going to demonstrate how to display running total in footer row or footer template of GridView in ASP.NET using C# and VB.NET. This method works with paging enabled gridview as well.

Inserting new row in GridView in ASP.NET 2.0

  
The GridView was not designed to insert new rows, but there is a way to accomplish this with very little code.

Customary Functions of GridView in ASP.NET 3.5

  
The following project contains the ordinary functions which are used by ASP.NET 2.0 programmers through GridView control.
 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge