Questions tagged [commandparameter]

127 questions
0
votes
1 answer

WPF MVVM Interaction Binding CommandParameter to UI element

I want the text in a TextBox to get selected when the TextBox gets focused. Therefore I need to binding a Command to the "GotFocus" event. The special thing is, that the TextBox is created dynamically via an ItemsControl. So there is a binding to…
bene_rawr
  • 119
  • 1
  • 10
0
votes
2 answers

Using parameters to configure the table name in an SqlDataSource SelectCommand

I have an ASP.NET 3.5 web form with a DropDownList bound to a table of company names in a database. I also have a data bound GridView which I would like to update with data from the database depending on the company name selected in the…
Amr Bekhit
  • 4,613
  • 8
  • 34
  • 56
0
votes
3 answers

How to pass ContentControl Element to CommandParameter?

I have a toolbar that show many Button with Image and TextBlock. Then, I create a CommandManager to manager all Button's commands. So, I want to implement a factory to assign action by Button's TextBlock. This is my xaml and Command function, I try…
Po-Sen Huang
  • 445
  • 6
  • 24
0
votes
1 answer

Argument To Input Into VS12.0 Command Prompt To Open To a Specific Line Number vb.net

I'm looking to write some code to open the visual studio command prompt and move to a specific line number. Here's what I've gotten so far: Process.Start("C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts\Developer Command…
0
votes
1 answer

Binding CommandParameters to Property from other View

I have a view (Main View) with a toolbar and a TabContent region (PRISM). In the TabContent region I have two tabs (two views -View A, View B-) representing the same model (Contacts) in a different way. View A contains a DataGrid with Contacts. The…
chincheta73
  • 187
  • 1
  • 22
0
votes
1 answer

Changing the where clause to use Oracle Command Parameter

I am currently creating the web API to accept one input parameter and using them in the particular field in the where clause. Below is the code for the service public HttpResponseMessage Getdetails( string JRS_NO,string DOB) { …
trx
  • 2,077
  • 9
  • 48
  • 97
0
votes
1 answer

BindingExpression path error: '' property not found on 'current item of collection' ... BindingExpression:Path=/;

I have seen several similar questions to mine so please don't quickly dismiss it. The scenario seems different here and I can't see why it would be wrong. My DataGrid has some bindings to keys and mouse clicks:
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
1 answer

Crystal Reports: Set date parameter value to calculation without using a sub-report?

Is it possible to set the value of a command parameter to a date calculation i.e 2 months from the date run without putting it in a sub-report and passing the values from a main report?
jch
  • 187
  • 3
  • 17
0
votes
0 answers

cannot convert from System.Data.SqlDbType to System.Data.DbType

DbCommand retcommmand; var attachmentDetails = this.ConvertToDatatable(curfewRequestForSave.Attachment); List SqlparamUpdate = new List(); //…
user3048027
  • 387
  • 1
  • 5
  • 24
0
votes
1 answer

Passing the control as CommandParameter programmatically

When trying to pass the control in xaml, we write the following code:
Idanis
  • 1,918
  • 6
  • 38
  • 69
0
votes
2 answers

Passing control as CommandParameter with Binding is null

i have writte a custom ICommand implementation which is available as a static property: public class GridViewCommands { public GridViewCommands() { } /// /// Toggle Selection-Command /// public…
BendEg
  • 20,098
  • 17
  • 57
  • 131
0
votes
1 answer

How can i make this CommandParameter work?

I've been learning WPF in college this semester but there are still some things I do not fully understand. I have the following code:
Exevan
  • 335
  • 1
  • 3
  • 24
0
votes
1 answer

WPF CommandParameter binding fails in ToolBar?

Here's the situation: It's a bit hard to describe, so skip to the steps to recreate and copy/paste the code into a new project if you want. ListViewModel contains a list of ViewModel (Items) and a list of ICommand (Actions). MainWindow has a…
Andy Clark
  • 516
  • 1
  • 4
  • 21
0
votes
1 answer

ContextMenu in ListView, click on a menuitem doesn't fire the expected command

I have a listview, with contextmenu associated to each listviewitem. But a click on a menuitem doesn't call the corresponding Command myCommand. myCommand is linked to a "Execute" and a "Can Execute" methods. The "Can Execute" method works, but not…
Hermios
  • 622
  • 1
  • 5
  • 20
0
votes
0 answers

Bound CommandParameter on MenuItem is null

I don't understand why my commandparameter is null when all of the rest of the bindings seem to work, the correct image is displayed, the text is correct and the command CanExecute is called, but for some reason the parameter is null. …
Matthew Sanford
  • 1,069
  • 1
  • 13
  • 21
1 2 3
8 9