.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Help with multi-dimensional dynamic datagrid in ASP.NET

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
I'm designing a web application in ASP.NET and I have the requirement of a dataset that expands in two directions.  The user can add any number of rows vertically, while scrolling through dates horizontally.  An extremely simplified version of the scenario would look something like:                           <---   9/1/2010  - -->Customer           # of orders   Total $John                         1         $10Bill                            2         $50Dave                         1         $30Mary                         5     

View Complete Post

More Related Resource Links

Cutting Edge: Creating a Multi-table DataGrid in ASP.NET


If you bind a multi-table DataSet to a DataGrid, only the first table is recognized. Here Dino Esposito writes a custom solution the the multi-table problem.

Dino Esposito

MSDN Magazine August 2003

How to create a multi dimensional array in VB .net

 How do I create a multi dimensional array in visual basic. For example I have a soccer team with players. Each player has an id, first name, last name, address, phone number. How would I represent this using a multi dimensional array?

DataGrid - how to make Column sorting dynamic, to cater for when bound data changes?

I'm using a DataGrid in a VS2010 WPF C# project.  I have bound the DataGrid to an ObservableCollection<SummaryItem>.  When you click on a column heading it sorts the data at that point in time.

Question - How would I arrange such that the sorting in the DataGrid is dynamic, so that when data changes (within the ObservableCollection<SummaryItem>) the sorting keeps working.

Notes: Binding approach is via DataGrid

      private ObservableCollection<SummaryItem> _summaryData = new ObservableCollection<SummaryItem>();
      SummaryDataGrid.ItemsSource = _summaryData;
      SummaryDataGrid.AutoGeneratingColumn += (s, e) =>
        //if (e.Column.Header.ToString() == "ProcessName")
        //  e.Column.Width = new DataGridLength(1, DataGridLengthUnitType.Star);
        e.Column.Width = new DataGridLength(1, DataGridLengthUnitType.Star);
  public class SummaryItem : INotifyPropertyChanged
    public event PropertyChangedEvent

How do you store multi-dimensional array to viewstate?


How do you store multi-dimensional array to viewstate?  I am having a problem.  Here's what I did:

public bool[,,] regsettings = new bool[7,5,4];

bool[,,] regsettings = (bool[,,])ViewState["regsettings"];    // this line works!

regsettings[i,j,tab] = (bool)ViewState["regsettings"]; // this line no working?! The error is: Object reference not set to an instance of an object

the letters i,j,tab are just variables in the loop.  They are there.

I also tried: (bool[,,,]) as a cast and it is a no-go either.?


multi dimensional arrays???


I have the following code in which I pass 1 value in the array after comparing 2 data tables.

Now how do I pass all the values from the data tables rows (like docfiletype, docseqid) in one array(or should I use something else)? so that I can sort the array based on docseqid?


Dim ls_attachment_filename() As String = Nothing
 Dim li_attachment_count As Integer
Dim j As Integer
For j = 0 To leadrowcount - 1

                        Dim docidatt As String = recordDatatable.Rows(j).Item(0).ToString
                        Dim docredid As String = recordDatatable.Rows(j).Item(1).ToString
                        Dim docfiletype As String = recordDatatable.Rows(j).Item(2).ToString
                        Dim docsize As String = recordDatatable.Rows(j).Item(3).ToString
                        Dim docseqid As String = recordDatatable.Rows(j).Item(4).ToString
                        Dim k As Integer
                        For k = 0 To rowcasecount - 1
                            Dim caseidatt As String = caseDatatable.Rows(k).Item(0).ToString
                            Dim caseredid As String = caseDatatable.Rows(k).Item(1).ToString
                            Dim casefiletype As String = caseDatatable.Rows(k).Item(2).ToString
                            Dim casesize As String = caseDatatable

Dynamic TextBox Validation not working on dynamic DataGrid on PlaceHolder



I have a placeholder to which I programmatically add DataGrids... In the DataGrids, I programmatically add TextBoxes along with dynamic validations. Somehow, the DataGrids show up, but the dynamic validations don't work. If I set them to static, the blank space for them appears, but still, they wont work.

I'd appreciate your help on this.



Dynamic SQL in SSRS - Multi Value Paramaters


I am tring to pass comma split multi values in for a paramater in to ssrs.  The Sproc that is points to uses dynamic sql and the paramater is nested in a an oracle query

in visual studio I have multi values selected but it does not seem to work..  below is the stored procedure





--SET @EM_ITEM_NUM = '1100015' 
--SET @TIMEFRAME = '18 Months'

 declare @sqlQuery VARCHAR(8000)
declare @finalQuery VARCHAR(8000) 

SET @sqlQuery = 'select
			sum(oss.SLS_QTY) as QTY
			,sum(oss.SLS_AMT) as AMT

Multi-Value Parameter Dynamic MDX Syntax


I have the following SSRS MDX working with single-value parameters (Note the StrToMember() function calls below).  I need to write a similar SSRS report which has a multi-value parameter which will replace the TopCount([Dim Developer]...) below.  I'm uncertain how to write similar syntax for multi-value parameters.

SET [Top 10 Developers] AS TopCount({Filter(Filter([Dim Developer].[Developer Id].Children,
                                [Dim Developer].[Tracked].[Tracked].&[Actively Tracked]),
                         [Dim Division].[Hierarchy].[Country].&[No Country])},
                     10, [Measures].[3 Year Total])
SET [Rest of Developers] AS {Except(Filter(Filter([Dim Developer].[Developer Id].Children,
                                [Dim Developer].[Tracked].[Tracked].&

what are relational and multi-dimensional format?

I read an interview question:
"In which format SSAS stores data?"

Well, I remeber having read, that ROLAP stores and operates their data and metadata in  relational format (OLTP relational database) that permits to use SQL, above of only MDX for SSAS storage.

What are exactly relational  and multi-dimensional (SSAS) formats?
What are details of their storage, resp., and what are the differences? 

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Dynamic Data Templates in GridView ASP.NET 3.5

At a high level, Dynamic Data Templates can be seen as a system to very quickly build up a User Interface linked with the relevant data model, immediately enabling you to perform CRUD operations (Create, Read, Update, Delete) on the database using the specified data source. They provide a powerful method for building up these kinds of applications, and I'm going to focus on an overview of what Dynamic Data Templates actually are, and a few ways of customizing them to suit industry needs.

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.

Multi-threading in .NET: Introduction and suggestions

This article uses the C# type shorthands throughout - int for Int32 etc. I hope this makes it easier for C# developers to read, and won't impede any other developers too much. It also only talks about the C# ways of declaring variables to be volatile and locking monitors. Developers using other languages can find the equivalents in their own preferred environment, I'm sure.

ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities

I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I'm sitting 30,000+ feet over the Atlantic ocean, I don't have access to VS2008 at the moment to check.

Use Jquery with repeater, gridview, datagrid

Before we talk about jquery inside any itemtemplate (repeater, gridview, datagrid), we need to understand the basic use of jquery functions

ListBox tricky to set in a DataGrid/GridView

Listboxes are very tricky to set selected items in grid - there is no real nice way to do it. It would have been great if Microsoft included a property that accepts an array or comma separated values - or anything! But they only allow each item in the list to be selected individually. The way to do this in a grid is a bit messy, but it is fairly simple to implement. When a row is created (as per the event), select the items of the listbox as per the datagrid source data:

Dynamic Systems Development Model (DSDM) Methodology

The Dynamic Systems Development Model was developed in the U.K. in the mid-1990s. It is the evolution of rapid application development (RAD) practices. DSDM boasts the best-supported training and documentation of any of the agile software development techniques, at least in Europe. DSDM favors the philosophy that nothing is built perfectly the first time and looks to software development as an exploratory endeavor.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend