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

Top 5 Contributors of the Month
Post New Web Links

How do I remove a parameter value from one paremeter after it is selected in another?

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

I have two single valued parameters each populated from the same dataset.  After a value is selected in the first parameter I want to remove it as an available value from the second.

So the first parameter list is A,B,C

The users selects B, and then list of values in the second parameter changes from A,B,C to A,C.


View Complete Post

More Related Resource Links

Get ServerReport selected Parameter value to use in vb query


I'm using ReportViewer in Asp.net 2.0 to view a SSRS report. I need the value of the selected parameter to use in a vb query. The parameters are populated on the server and its a single selection. Doing searches I've come across  ReportViewer1.ServerReport.GetParameters() but I can't figure out if I can use this to determine which value the user has selected in the parameter dropdownlist. Any help would be appreciated.

How To Remove a Query Parameter from a URL


for a string such as this:


how would I remove the parameter id 12?


one parameter is selected hide others

Hi All, I have created a report using SSRS 2008. There are four drop down boxes(A,B,C,D) for separate parameters. There are two values for drop down box A. Cat1 and Cat2. What I want is when Cat2 is selected, other dropdown boxes(B,C,D) should be hidden. But still one of the values from each dropdown box is needed to be selected. Those remaining dropdown boxes has N/A value group. I want to select those N/A when Cat2 is selected. Can anyone tell me how to do this pls? Thanksshamen

Add selected CheckBox Row details in Second GDView & remove from second GDView onUncheck

i hv two gridviews first is overview of Requisition and second of Requisition Details
In First GDView I have the requisition columns for checkBox , added by following code

DataGridViewCheckBoxColumn dataGridViewCheckBoxColumnObject = new DataGridViewCheckBoxColumn();
dataGridViewCheckBoxColumnObject.Name = "Select";
dataGridViewCheckBoxColumnObject.Width = 60;

In first GDView I have another column of RequisitionID's

How should I loop through the GDView to get the RequisitionID's of selected rows????

I want to add the details of that requisition in Second GDView as soon as I Checked/Click on the CheckBox of First GDView. Also to remove the Requisition Details as soon as I Remove/Uncheck the CheckBox of first GDView

Can anyone help me

Thank you

ObjectDataSource doesn't remove previously added Parameter



I use an objectdatasource programmatically to use a parameterless method when SearchWord variable is empty and a Search method with one parameter when SearchWord is not empty, the event I use is objectdatasource selecting so that I can adjust parameters conveniently, I have a problem here: I can add a new parameter and set its value but I can't remove a previously added parameter from objectdatasource selectparameters and an error raises because of this, this is the selecting method:

 Protected Sub objWebUploadLog_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) Handles objWebUploadLog.Selecting

        If SearchWord = "" Then
            If objWebUploadLog.SelectParameters("search") Is Nothing Then

            End If
            objWebUploadLog.SelectMethod = "GetWebUploadLogByUserID"
            objWebUploadLog.SelectCountMethod = "GetWebUploadLogCountByUserID"
            If objWebUploadLog.SelectParameters("search") Is Nothing Then
                Dim param As WebControls.Parameter = New WebControls.Parameter("search", TypeCode.String)

howto: display only hierarchy-members (levels) which are selected in the parameter (SSAS and SSRS)


Hi all,

I'm a SSRS/MDX beginner, so this might be a basic question. Sorry for that.

I have a hierarchy, which I use as a parameter. The Hierarchy has 3 levels (level1, level2, level3).

Sample Hierarchy

Now I want to achieve the following:

  • If a user selects CH1 --> the report should show only the CH1 (which is the sum of CH11 + CH12 + CH13)
  • If a user selects CH11 and CH12 and CH13 --> the report should show only these leafs (no aggregations)
  • If a user selects CH1 and CH11 and CH12 and CH13 --> the report should show the leafs and CH1 (seperate)

I guess, this is not that hard, but somehow I don't get it.

Here my sample mdx-query (the hierarchy I'm writing about is "Lieferantenstruktur" and the parameter "@Lieferant" (BOLD)):
(right now, only the leaf-level [Lieferant] is returend by the query)

SELECT NON EMPTY { [Measures].[Einheiten] } 

, NON EMPTY { ([Lieferantenstruktur].[Lieferantenstruktur].[Lieferant].ALLMEMBERS 
* [Artikel].[Artikel Kategorie].[Artikel Kategorie].ALLMEMBERS 
* [Artikel].[Artikel Gruppe Code Name].[Artikel Gruppe Code Name].ALLMEMBERS 
* {[Kundengruppen].[Kundengruppen].[Verkaufskanal].ALLMEMBERS 

remove select a value in parameter dropdown


Hi all,

I need to remove the select a value option in report parameter: so i did this

="<Select a Report>"       NULL

="Score"                   ="[Measures].[Indicator Score]"

="Rank"                    ="[Measures].[Indicator Rank]"

="Value"                   ="[Measures].[Indicator Value]"

Default value


In BIDS i dont see the select a value parameter.
When rendered to report manager/reportviewer it shows Select a report but also shows Select a value before that...this is still there...

ie it shows
<Select a Value>
<Select a report>

In report manager I can go to properties and in the parameters section i can see a default value..

I deleted the parameters and re did them. I also created a new report and added jus these parameters but its still not work?? :(

I also deleted the reported and re-deployed also deleting the paremters an re-deploying fresh re

Drop down remove selected item on post back


Hi ,i have a place order form and i have a drop down list that contains list of items

whenever i add item (for example item1)  to place order and click add another item button,

i need to remove  (item1 ) from drop down list to avoid dupplicate insert in sql table

or mayb need to fill the drop down but without (item1) cause i already selected it

it s kind of validation

i am using sql datasource to fill the drop down list of items

Compare the value of ColumnGroup in Matrix to Parameter selected


I have a SSRS 2005 matrix with one column group and one row group. The column group is based on a calendar month which means the matrix will output 12 columns since there are 12 months within a year.

My report has two parameters; month and year. The end-user would like to display blank columns for months not selected in the parameter. Each month is assigned a number 0-11 (jan = 0, Dec = 11).

If an end-user ran the report and selected Feb as the month, the user would only like to see data in the first two columns and have all other columns be blank which is what I'm trying to illustrate in the example below.


  ColumnGroup ColumnGroup

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Gridview that exports selected rows to Excel

his seems like a messy workaround, but I ended up using two Gridviews - one to display my data and show my checkboxes, and the other which was invisible amd would eventually end up as my Excel spreadsheet.

Enterprize library 4.1 getting output parameter after adding record in db, plz guide



I need to get output parameter (flag) from db after saving record in database. I am using Microsoft Enterprise Library 4.1 for DB. I am inserting record using I Data reader.

Please guide


How to let user edit selected gridview columns, not entire row



I've got a gridview I would like to let the user edit a couple of columns.  Seems like everything I'm coming across so far makes the entire row editable.  

Hopefully the solution isn't too complicated.  Can someone point me in the right direction?


Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


Use a column as parameter for a sds in another column; gridview


Hola, I have a gridview which is bound to a sds which returns 7 columns and I added two columns from the GUI.  What I want is to fill up the 9th column with DDLs and these  DDLS will get their data from a different sds which is using a stored procedure with a single parameter.  I created the 9th row, used template field, made the sds for 9th row, the stored_procedure, threw a DDL in Item template and all  I need now is to pass a parameter in the first column to the sds in the 9th column.  I can code this but i'm getting tired of aspx.cs :) and would like to do it from the GUI.

Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

Remove #Region from whole web site


Hi All,

I need to deliver source code to client and my boss need to remove all the comments and #region sections from the whole web site source code.

So is there any functionality available in visual studio 2010 or may be in an other 3rd party tool available to do so, which can remove all the #region from all over the source code ?

Otherwise my developers has to do donkey work.... :(( and I don't wish it. 

Any help or tips/tricks would be appreciated.


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