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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

dynamic filter

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :Sql Server

I have a measure calculation called : ave cost

I would liket to show years( only selected years) that has avg cost value in it.. when I select the year i want to show only years when there is a avg cost in it.. how can i do  this in MDX?



View Complete Post

More Related Resource Links

MVC3: Define Dynamic ViewModel property inside Action Filter



How can I define a Dynamic ViewModel property in MVC 3 inside an action filter?

I am looking to have something like but inside the ActionFilter and not in the controller:

ViewModel.Title = "Home";

Thank You,


How to apply dynamic filter in Datasheet View from Query String

The datasheet view doesn't support either connections/dynamic filters from Query string. How to filter the data using query string?

Dynamic dimension member filter


Is it possible to set a dimension data rule for a role that will filter dimension members dynamically such that only members relating to at least one fact record will be shown?   In particular, the rule should be applied after all other filters on the fact data for the user have been taken into account.

This situation is there is a single client dimension but users should not be able to see the client information (e.g. name, address) unless it is related to a fact that the user has access to.




Dynamic Data Foreign Key Filter - how to limit the # of dropdowns on the list view



I have a visual basic website in VS 2010 framework 4, linx to SQL, with scafolding.... and this dataclass has about 10 foreign key fields, of which all 10 are shown in the list view of the website.  I want the ability to exclude those filters from the list view (or exclude some and keep some), but without eliminating them from the edit forms.  Using <scafoldingcolumn("False")> does the trick to remove them entirely but that will also remove them from the grid/list itself, which I don't want, and remove the column from the edit record views, which I don't want either.

Any help would be great!!!!

Dynamic Column filter on table variable or temp table



I created a  procedure which first populates a table variable /temp table with data. Then based on input parameter (say, @ColumnNames) I want to filter the result set.

Here is the snippet I have created, -

create PROCEDURE [dbo].[GetAlerts]
	@roleId varchar(20),
	@fields sysname
declare @temp table(
	ID int,
	role_id varchar(20),
	CRITICALINFO varchar(1000));

    insert into @temp select * from dbo.commonalertdata where role_id= @roleId);

	declare @sql varchar(300);
	set @sql='select ' + @fields + ' from @temp';
	exec dbo.sp_executesql @sql; 

Then i tried to run it as follows, -


And It gave the following error.

Msg 1087, Level 15, State 2, Line 1

Must declare the table variable "@temp".

Now, I tried using table variable or temp table or even UDF with no good. Can anybody help me in getting dynamic columns from a calculated table valued result set like temp table / table variable / inline table valued UDF?

Linq Query with dynamic where clause i.e filter with dynamic no of filter columns



I want a linq query with dynamic where clause.

Following is explanation of problem:


Following line returns me n no of rows.

IEnumerable<XElement>  xeleRows = (from xele in xdocFile.Root.Elements(strCtlLookUpXMLNode) select xele);

structure of xeleRows will be like:













Now I want to get one row from N Number of rows on basis of filter criteria that can be dynamic, the no of columns in filter criteria will vary at run time.

Anybody know shows to achieve this using Linq. Please guide.



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.

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.

Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

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.

Adding Dynamic Rows in GridView with TextBoxes

I decided to write this article because this has been asked so many times before at the forums(http://forums.asp.net) . Basically, this example shows on how to generate a Row in GridView with TextBoxes when clicking a Button that is residing inside a GridView Footer.

Adding Dynamic Rows in GridView with TextBoxex in C#

I decided to write this article because this has been asked so many times before at the forums(http://forums.asp.net) . Basically, this example shows on how to generate a Row in GridView with TextBoxes when clicking a Button that is residing inside a GridView Footer.

GridView Multiple Filter AJAX Control

This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.

What is the difference between "dynamic" and "object" keywords?

Let's take a quick look at the object keyword first. I'm not going to talk a lot about it because it's been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object, which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not everything in C# derives from object.) This is a powerful mechanism, since you can assign almost any value to instances of this type.

Dynamic in C# 4.0: Introducing the ExpandoObject

You have probably already heard about the new dynamic feature in C# 4.0 and how it is used to support COM interop. If you haven't, I strongly recommend reading the following MSDN articles: Using Type dynamic and How to: Access Office Interop Objects by Using Visual C# 2010 Features.



Dear gentlemen and ladies of the Microsoft Dynamic Data Team,

Mr. Steve Naughton says (and I hope so) that there might be chances that you read the posts published in this forum: I really hope so.

If that were the case then I am formally requesting to you in providing a "real answer" to my question:

I want to customize a dynamic data page (the details one) so I can have access to the data it has been already gathered from the end user UI (details.aspx) and use it to pass this same data to the following controls/pages that I am going to display next time to the end user.

For instance:

I have a screen with different types of data in it: texts, numbers, dates, check boxes, radio buttons and dropdownlists that has been filled with data by the end user. I want now to reset all fields exept the dropdownlist of which I'd like to keep the previously chosen values(the very same thing you do between dropdownlist of List.aspx ad Details.aspx). Even with FoxPro I could do that because data and controls were available there. It was as simple as setting carrying on to true.


I have found my

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