FAQ Database Discussion Community


How to bind MvxTableViewSource to dynamically created ViewModel with MvvmCross and Xamarin.iOS

ios,mvvm,data-binding,xamarin,mvvmcross
I have created table source and want to bind it not to current data context but to another ViewModel which is dynamically created by Controller. //some button click var context = new DynamicViewModel(); var source = new MyTableViewSource(); source.ItemsSource = context.DataItems; //I want this line to work with bindings ...

Bind a custom type property to a custom control

c#,wpf,data-binding
I am trying to bind to a user control a property of a custom type (in our exemple, let's call it DataContextOne). This custom type is composed of two strings. I then have a user control to which I want to bind this custom type. The weird thing is that...

Polymer dropdown data binding with AJAX response

javascript,ajax,data-binding,polymer
I'm very new to JS and Polymer. Can't figure out why this is not working, I've rewritten it a millin times based on the few topics out there. The idea is to have a very simple dropdown with it's choices data bound to the response of the AJAX request. Based...

ObservableInt causes crash on DataBinding Library

android,data-binding
I was playing with the new data binding library and tried to implement observable interface . But it keeps crashing no matter if i set the age variable to textview or not. The code works fine if i convert age variable to String. Is there any way to make it...

Blink highlight a button according to its value changes

c#,wpf,data-binding,wpf-controls
I have WPF control, it has a list view with many buttons I need those buttons to blink and highlight for a short time when their binded value changes (to Green when value goes up and to red when it goes down). What is the best way doing that?...

MVVM Light DataGrid binding

wpf,mvvm,data-binding,datagrid,mvvm-light
I'm developing a WPF with C#, .NET Framework 4.5.1, MVVM Light framework and Entity Framework 6.1.3. I have this DataGrid in a window: <DataGrid x:Name="LevelConfigurationDataGrid" Grid.Column="1" Grid.Row="1" Margin="20,0" ItemsSource="{Binding LevelConfigs}"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding CODE_LEVE}" Header="Nivel"/> <DataGridTextColumn Binding="{Binding CODE_NAME}" Header="Nombre"/> <DataGridTextColumn Binding="{Binding IS_ACTIVE}" Header="¿Activa?"/> <DataGridTextColumn...

Asp Dropdownlist does not return selected value. (Dropdownlist is Databound)

c#,sql,asp.net,data-binding
I have created a dropdownlist, which loads its data from table column. Now i want to select the value of dropdownlist on Index_change_event. protected void Page_Load(object sender, EventArgs e) { string username = Session["username"].ToString(); SqlConnection con = new SqlConnection("Data Source=DLINK\\SQLEXPRESS;User ID=sa;Password=logmein;Initial Catalog=AndroidAppDB"); SqlCommand cmd = new SqlCommand(); cmd.Connection = con;...

Need help resolving a BindingExpression issue

c#,wpf,data-binding,binding,binding-expressions
I have this style: <DataTemplate> <Button Width="44" Height="24" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalAlignment="Left" HorizontalContentAlignment="Center" Command="{Binding UninspectedPrintSelectedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}"> But the command does not work correctly. Looking at the output window yields this issue: System.Windows.Data Error: 40 : BindingExpression path error: 'UninspectedPrintSelectedCommand' property not found on...

Databinding a Datagrid

c#,wpf,data-binding,datagrid
After being unsuccessful in databinding my Observable collection to my datagrid (Another question in this same forum), i tried to reduce the scope. Now my project has only one datagrid, one ObservableColection and one class. But still my databinding is failing.. please help.. using System.Collections.ObjectModel; using System.Windows; namespace TestDatagrid {...

Not able to reference Observable Class fields from xml layout

android,android-layout,data-binding,android-m
I'm looking at the new Data Binding plugin for Android and trying to integrate it in a project. While reading about creating observable objects, i encountered the ObservableFields documentation that involves using self-contained observable objects example from documentation : public class User extends BaseObservable { public final ObservableField<String> firstName =...

knockoutjs data bind hidden field value

ajax,knockout.js,data-binding,hidden-field
I'm having a hidden field in a knockout template that its value gets updated with jquery. The problem is when trying to pass this value to the server with ajax, I get null value in the controller. But the html source code shows that the value of the hidden field...

Understanding Polymer data-binding and HTML tags

data-binding,polymer
I'm new to Polymer and while testing data-binding, I discover that I have to encapsulate double-mustache expressions within HTML tags (for example <span>{{var}}</span>). If not, variable is simply not expanded and printed as is. An exemple (from Polymer Quick Tour), with a line more to show this behaviour. You can...

Angular2 two-way data binding

data-binding,2-way-object-databinding,angular2
I know Angular2 doesn't have two-way data binding but is there a way to mimick the two-way data binding behavior from Angular1.x?

WPF Change Binding values on update

c#,wpf,mvvm,data-binding
I have a ListView that is as follows: <ListView ItemsSource="{Binding OrganizationInfo}"> <DockPanel> <StackPanel Width="130"> <!-- Name --> <Label Content="Organization Name" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Margin="4" Height="25" /> <!-- Street 1--> <Label Content="Address 1" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Margin="4" Height="25" /> <!-- Street 2--> <Label Content="Address 2" VerticalContentAlignment="Center"...

Failing to reach checkbox within listbox item or bind data to it, or the checkbox to the textblock

c#,xaml,checkbox,data-binding,windows-phone-8.1
My item class has string name and bool picked. I use a class with a static ObservableCollection with static methods to maintain the list. This is all working. I cannot access the checkbox within the listbox item. I've tried multiple ideas I've found on Stack Overflow and elsewhere. I have...

How to properly position elements in a stack panel?

c#,wpf,xaml,data-binding
Let's say, I have a class that looks like this: public class Item { public string Name { get; set; } public List<Item> SubItems { get; set; } } I want to display a list of such items in such a way that top-level items are arranged horizontally, and their...

What's the difference between binding to [[var]] and {{var}} in Polymer 1.x?

data-binding,polymer,2-way-object-databinding,polymer-1.0
I am familiar with bindings with curly braces, like {{variable}}, from Polymer 0.5. However, in examples and code snippets for the release version of Polymer, I've begun to notice bindings with square brackets, such as [[variable]], as well. Does {{variable}} mean something different now, or is it the same and...

Datagridview doesnt auto select first row after filling datasource

vb.net,visual-studio-2010,data-binding,datagridview
i have datagridview with 4 columns [Nam] , [ID] , [Shuru] , [Payan] second column ([ID]) is hidden and is used to gather some details about the data. this is the Load code : Private Sub SalMali_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.DGV_SalMaliTableAdapter.Fill(Me.FDBDataSet.DGV_SalMali) End Sub which...

Bind multiple keys to a Table using template

javascript,data-binding,sapui5,openui5
I want to bind multiple keys from a JSON to a sap.ui.table.Column. I am using a JSON-View. This is how it looks like: { "Type": "sap.ui.core.mvc.JSONView", "content": [ { "Type": "sap.ui.table.Table", "id": "backendConnectorsOverviewTable", "columns": [ { "Type": "sap.ui.table.Column", "label": "Label", "template": { "Type": "sap.ui.commons.TextView", "text": "{text} {headerText}" } } ]...

Unable to bind to DataContext

c#,wpf,xaml,data-binding
I am having a really weird problem. I am trying to bind a property to the DataContext but it is not working. This is what I am doing (in the Window.Resources section): <myNS:MyClass x:Key="myObj" MyProp="{Binding}"/> Elsewhere in the code, I set the data context like this: myWindow.DataContext = MyNameSpace.MySingleton.Instance; I...

Bind complex object to mvc controller

c#,asp.net-mvc,asp.net-mvc-4,data-binding
I'm creating an mvc4 application and i have an issue. I have a model class for example: public class ModelClass { public ClassA a {get; set;} public ClassB b {get; set;} public ClassC c {get; set;} ... } Each of thease classes have their own properties, for example: public class...

c# MVVM update Datagrid after combobox selection

c#,wpf,mvvm,data-binding,datagrid
I am creating a small wpf programme which filters a dataset by date. It will eventually group and sum the data, but at the moment I am just trying to display the data rows. I want a window with a ComboBoxat the top with possible dates to select and a...

Binding string lists into wpf listview returns BindingExpression path error

c#,wpf,listview,data-binding
I've two string lists declared as below: Config.cs: public class AgentSkills { public List<string> agentSkillsNameList=new List<string>(); public List<string> agentSkillsLvlList=new List<string>(); } I retrieved the strings from an XML and added them to the lists as below: Config.cs: foreach (XmlNode skillNameNode in skillNameNodeList) { agentSkills.agentSkillsNameList.Add(skillNameNode.Attributes["value"].Value); } foreach (XmlNode skillLevelNode in skillLevelNodeList)...

Dart Polymer: Removing element from List

data-binding,dart,polymer,dart-polymer
I have a custom element with some models. Here is the code for custom element. message-element.html <polymer-element name="message-element" attributes="message"> <template> <table class="table"> <tr template repeat="{{attrib in attribs}}"> <td><paper-input name="message-attrib-name" label="New Attribute" value="{{attrib.name}}"></paper-input></td> <td> <paper-input name="message-attrib-value" label="" value="{{attrib.value}}"></paper-input> <core-icon-button...

Binding the CheckBox IsChecked Property to SelectedItems Property of a ListView

c#,wpf,listview,mvvm,data-binding
I struggle with MVVM data binding. In my Example I have a ListView filled with items which contains a CheckBox and some other content. <ListView Background="#f0f0f0" Grid.Row="1" ItemsSource="{Binding ListViewCollection}" SelectedItem="{Binding SelectedItem}" IsSynchronizedWithCurrentItem="True" BorderThickness="0" Margin="5"> <ListView.View> <GridView> <GridView.Columns> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <CheckBox Tag="{Binding TheValue}" IsChecked="{Binding...

binding to controller object in Angular

javascript,angularjs,data-binding
I'm new to angular, trying to bind an an element's content into the controller's Scope to be able to use it within another function: here is the scenario am working around: I want the content of the <span> element {{y.facetName}} in <span ng-model="columnFacetname">{{y.facetName}}</span> to be sent to the controller an...

Polymer's two way data-binding not working in an element's child's attribute value

javascript,html5,data-binding,polymer
I have a product-card custom element that looks like this: <dom-module id="product-card"> <template> <div class="card-main-content layout horizontal center"> <content select="img"></content> <content select="h3"></content> <content select="h4"></content> </div> <content></content> <paper-icon-button id="carticon" icon="add-shopping-cart" on-tap="cartTapped"> </paper-icon-button> </template> </dom-module> <script> (function() {...

AngularJS seems to ignore my bindings

angularjs,data-binding
I'm trying to bind a dictionary of data to Angular, and it is being quite ornery about ignoring whatever I tell it to do. I have an object that looks like this: { "Attributes" : [ "Stamina": 1, "Strength": 2 ], "Coefficients": [ "Constitution": 0.5 ] } Using a controller...

WPF Binding to Text property Of a TextBlock inside Selected TabItem of a TabControl

c#,wpf,data-binding
I know normally we can use this codes to bind Selected Tab Header Text and show selected tab: <TabControl Name="MyTabControl"> <TabItem Header="Tab1"/> <TabItem Header="Tab2" /> </TabControl> <Lable Content="{Binding ElementName=MyTabControl, Path=SelectedItem.Header}"/> But how can i bind when i have this codes: <TabControl Name="MyTabControl"> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <Image Source="/Images/a.png" /> <TextBlock...

Binding a datagrid template column (as datepicker column) to a datatable column

c#,wpf,data-binding,datatable,datagridcolumn
I am building a database-access program that dynamically creates datagrid columns, as well as dynamically requests data based on account preferences. I have several datagrids that work in identical manners and for the most part they work perfectly. All of my text columns bind to the datatables that I use...

How to use data binding in select parameter of sqlDataSource?

c#,asp.net,gridview,data-binding
I have a sqlDataSource in which I use select parameter as below : <asp:sqlDataSource ID="EmployeeDetailsSqlDataSource" SelectCommand="SELECT EmployeeID, LastName, FirstName FROM Employees WHERE EmployeeID = @EmpID" ConnectionString="<%$ ConnectionStrings:NorthwindConnection %>" RunAt="server"> <SelectParameters> <asp:Parameter Name="EmpID" Type="Int32" DefaultValue="<%#userid%>" /> </SelectParameters> </asp:sqlDataSource> In my backend code, I have assigned a value to userId and also...

How to update Datagrid with an ItemsSource that doesn't know when an item is added?

c#,wpf,data-binding,datagrid
I know I Should implement the INotifyPropertyChanged interface if I want to notify the grid that it should update for the properties in the items, So I did and it was working before. I decided to change the getter of the bound ObservableCollection so that it would be relative to...

Discriminate if knockout observable has been changed by user or programatically

knockout.js,data-binding
I have a model with an observable, binded to an input html field with value binding. I operate on this observable in many ways, but I'd need to distinguish if my observable has been changed by the user altering the input value or by a call to myObservable(someValue) programatically. I...

Images aren't displayed in WPF ListBox

wpf,data-binding,listbox
I'm trying to display images in a ListView. The images are being loaded through Entity Framework from a SQL Server database. Somehow the images don't get displayed in the ListView and I can't figure out why. I've created a test Visual Studio project. The images are stored in an ObservableCollection<ImageViewModel>:...

What am I doing wrong so the data binding target doesn't get affected by data binding source

c#,.net,wpf,xaml,data-binding
I've recently moved from Windows Forms to WPF. I started with Reed Copsey's series 'Better User and Developer Experiences – From Windows Forms to WPF with MVVM'. On the 4th part of the series, the following code should fill text boxes with data: <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=Feed.Title, Mode=OneWay}" />...

Databinding ObservableCollection to Datagrid not working

c#,wpf,data-binding,datagrid,observablecollection
Update Now I think I have narrowed the problem. I created single class public class OptionStrike { public OptionStrike(double p1, double p2, int p3) { // TODO: Complete member initialization P_OI = p1; StrikePrice = p2; P_Volume = p3; } public OptionStrike() { // TODO: Complete member initialization } public...

Meaning of POCO classes in MVVM and Entity Framework

wpf,entity-framework,mvvm,data-binding,poco
Please bare with me as I am in process of learning. I am trying to understand how WPF binding works in junction with MVVM and Entity Framework. So far I understand databinding as a concept related to properties. However, when it gets to EF I lose understanding of which objects...

Polymer 1.0 Data Binding in s>

html,data-binding,polymer
I'm tinkering around with Polymer again and there is something I want to do but it doesn't work and the workaround looks so messy. I want to style an element but take advantage of Data Binding. Basically I try to do this: <dom-module id="proto-element"> <template> <style> #wrapper{ width:{{pixels}}; background: #e1e1e1;...

WPF DataGrid Binding to CurrentItem or SelectedItem?

wpf,data-binding,datagrid
If I have a DataGrid in my View and a Property in my ViewModel that represents currently active DataGridRow (e.g. focused item or clicked item) should I bind my Property to SelectedItem or CurrentItem. Say I chose to bind it to SelectedItem, then What's CurrentItem for? should I bind another...

WPF Data Binding to property that returns class

c#,wpf,data-binding
I have a class that encapsulates several other classes that have more detailed definitions. For example class MyProperties { SubProperties Props { get; set; } } class SubProperties { double MyValue { get; set; } } Is there any way to bind to this subproperty, "MyValue"? I'd like to have...

Bind XAML TreeView MaxHeight to Containers Height

c#,wpf,xaml,data-binding,treeview
I have the problem that i want to bind the max-height of my TreeView to the height of my UserControl but the binding doesn't work. I tried the following <UserControl> <StackPanel Name="Container"> <TextBlock>Header</TextBlock> <TreeView MaxHeight="{Binding ElementName=Container,Path=ActualHeight}"></TreeView> </StackPanel> </UserControl> I would expect, that if I resize my window, the UserControl resizes...

Angular - how to one-way link two input values?

angularjs,data-binding,oneway
I have a large HTML form with lots of text. There are some duplicated input fields and customer wants to prefill bottom fields with values filled earlier, but without affecting already filled inputs. Think about it as in the following scenario: you are filling a licence agreement and enter your...

WPF Data Binding vs. Inheritance - Bind to property of base

c#,wpf,inheritance,data-binding
I've got the following setup. Base class public class ToolPathBaseItem { private double _x, _y, _z; public double X { get { return _x; } set { _x = value; } } public double Y { get { return _y; } set { _y = value; } } public double...

ADO.Net Data Binding Error to ASP DropDownList

c#,asp.net,entity-framework,data-binding
Error Message: Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery) is not supported. Instead populate a DbSet with data, for example by calling Load on the DbSet, and then bind to local data. For WPF bind to DbSet.Local. For WinForms bind to DbSet.Local.ToBindingList(). Has something changed in VS2012...

value and ng-model are conflicted

javascript,html,angularjs,data-binding
I am working on an angular form with the possiblity for the user to send updates of their data and to cancel the edit if needed. I found out that I should save the edit in a seperate variable. So here is some code: //if editor is turned off it...

Application crashing when using with certain properties in a textblock

c#,wpf,xaml,data-binding,wpf-binding
I am using <Run Text={Binding ...}/> inside a TextBlock in order to concatenate 2 strings (one which is hard coded, the other one is a binding expression on a property). This is being done in a DataTemplate : <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <DataTemplate x:Key="MarketOrderDataTemplate"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions>...

Binding and writing values back to parent scope without using isolated scope in a directive

javascript,angularjs,data-binding
What is the preferred way of passing data back to parent scope in Angular, without isolated scopes? Given I have a directive x, and want to know it's value a, I want to do something like: <x a="some.obj.myA"></x> current a: {{some.obj.myA}} I would define the x directive like so: app.directive('x',...

BindableProperty not updated on ViewModel

xaml,data-binding,xamarin.forms
In Xamarin.Forms I implemented a custom Picker. The ItemsSource is set correctly. However when i change the selected item it does not update the property on my ViewModel. The BindablePicker: public class BindablePicker : Picker { public BindablePicker() { this.SelectedIndexChanged += OnSelectedIndexChanged; } public static BindableProperty ItemsSourceProperty = BindableProperty.Create<BindablePicker, IEnumerable>(o...

Grails: how to programatically bind command object data to domain object in service?

grails,data-binding,gorm
I have a command object that I want to convert into a domain object. However, the object I want to convert the command object into may be one of two domain classes (they're both derived classes), and I need to do it in a service (which is where, based on...

Simple DataBinding in wpf application

c#,wpf,data-binding,2-way-object-databinding
Hi I am trying to study simple data binding in wpf. I tried and am not succeeding.. please suggest ways.. <Window x:Class="WpfTestApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="250" Width="350"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="70"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="50"/>...

How to bind a fresh object to the view with Rivets JS?

javascript,jquery,data-binding,rivets.js
I am working on the profile section of an application where the user can see the details of his profile on one side and if he clicks edit, a section on the right becomes visible which let's him edit the details. I am using RivetsJS to make it a single...

List not displaying correctly WPF

c#,wpf,xaml,data-binding,wpf-controls
Situation Hey guys, for a program I'm developing I have a getRaces() method: public string getAllBaseRaces() { //string to hold a list of members string strRaces = ""; foreach (BaseRace s in races) { strRaces = strRaces + s.ToString() + "\n"; } return strRaces; } I'm trying to populate a...

Binding to a static property is not responding to PropertyChanged

c#,wpf,xaml,data-binding
I am fairly new to XAML and WPF and have read numerous examples of how bind control properties but none seem to apply to my problem. I have a static class Analyse that inherits INotifyPropertyChanged Summary of the code below class Analyse : INotifyPropertyChanged { public static DataSet moodleData; //...

DataBinding Collection and change element of collection

c#,wpf,xaml,data-binding,windows-8.1
I have a colection and a ListView to which I have binded a collection of objects: <ListView ItemsSource="{Binding Levels}"... /> Here is a Levels collection: private ObservableCollection<Level> _levels; public ObservableCollection<Level> Levels { get { return _levels; } set { SetProperty(ref _levels, value); } } And here is a Level class:...

angularFire 3 way data binding won't update an function

javascript,angularjs,data-binding,firebase
I have a firebaseObject (MyFirebaseService.getCurrentUser()) bind to $scope.user. After binding successful, I loop tho the object to see if the object contain "associatedCourseId" equal to some value ($stateParams.id). If does, the $scope.finishLessonCount count up. The problem is, when I add new Object inside the firebaseObject (that bindto user) via other...

Error message in a property

wpf,vb.net,data-binding,properties
This is my problem. If a user type a number in the textbox is all right, but if he type a char, I don't see the messagebox () in the property. Why ? <TextBox HorizontalAlignment="Left" TabIndex="12" Text="{Binding Time_HH, UpdateSourceTrigger=PropertyChanged,StringFormat='{}{##}'}" FlowDirection="RightToLeft" MaxLength ="2" Height="30" Width="30" /> And this is the property...

React to changes in model when usercontrol updates it

wpf,data-binding
I have created a custom control that updates my model thanks to two way binding, using mvvm light. <cbtn:BillCounter Value="{Binding MoneyTypes[0].Paid, Mode=TwoWay }" /> MoneyTypes is an array that contains several of them. I see that when i check that array that my changes have gone thru to the array...

Databinding using SQLite and Entity Framework

wpf,entity-framework,sqlite,mvvm,data-binding
First of all, here is what I am trying to achieve: I want to have a View that automatically pushes any changes to the SQLite database if any of its Controls' properties change (Simple!). My logic, which might also be bogus due to lack of experience: Add an empty object...

How to call async method in the View Model everytime when page is navigated to

mvvm,data-binding,windows-phone-8.1
I am using MVVM light and Cimbalino Toolkit in my Project, I want to update my ListView when the page is navigated to. I implemented one async method in the View Model: private async void getMyNoteList() { ObservableCollection<Note> list = await _noteSessionService.getNoteList(); NoteList = new ObservableCollection<Note>(list); } Here, in my...

Bind Items to a DropDownBox in OpenUI5

javascript,data-binding,openui5
I am trying to bind a Value inside of an Array with Objects to a sap.ui.commons.DropdownBox. My JSON-structure looks like that: { "forms": [ { "name": "First Object" }, { "name": "Second Object" } ] } Now I try to bindItems to my DropdownBox like that: var oItemTemplate = new...

JSON data binding in spring mvc

java,json,spring-mvc,data-binding
I have received json data from android application in my Spring MVC controller using following code . import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RequestHeader; @RequestMapping(method = RequestMethod.POST, produces = "application/json") public @ResponseBody String getMethod(@RequestHeader(value="json") String headerStr) { System.out.println("POST"); System.out.println(headerStr); return "hello"; } The output of...

DataRowView issue when I try to Fill DropDownList from Database

c#,asp.net,database,data-binding
Baglanti.FnkBaglan(); SqlCommand DropDown = new SqlCommand("SELECT * FROM [Yazar]", Baglanti.baglan); SqlDataAdapter Adp = new SqlDataAdapter(DropDown); DataSet ds = new DataSet(); Adp.Fill(ds); DrpYazarSec.DataTextField = ds.Tables[0].Columns["Yazar_isim"].ToString() + " " + ds.Tables[0].Columns["Yazar_soyisim"].ToString(); DrpYazarSec.DataValueField = ds.Tables[0].Columns["YazarID"].ToString(); DrpYazarSec.DataSource = ds.Tables[0]; DrpYazarSec.DataBind(); I used this code but this error occured; Additional information: DataBinding:...

Improve performance of loading images into ComboBox

wpf,image,data-binding,combobox,virtualization
I am using WPF ComboBox to populate a list of countries as following: Inside ComboBox I have a VirtualizingStackPanel that contains an image and a TextBlock: <ComboBox.ItemTemplate> <DataTemplate> <VirtualizingStackPanel Orientation="Horizontal"> <Image Width="30" Height="30" Margin="0" Source="{Binding code, Converter={StaticResource ImageComboBoxConverter}}" VerticalAlignment="Center"/> <TextBlock Margin="5" Text="{Binding country_Text}"/> </VirtualizingStackPanel> </DataTemplate>...

How to bind and refresh UserControl binding in WPF?

c#,wpf,mvvm,data-binding,user-controls
I'm trying to do a simple OneWay binding for a user control, but I honestly don't understand why some parts aren't working. To be simple, I created a WPF standard UserControl with some dependency properties. In my main window, I hide/display the UserControl depending of some events, and I bound...

Caliburn.Micro ItemsSource is bound not to current viewmodel but to parent

c#,wpf,xaml,data-binding,caliburn.micro
I'm using Caliburn.Micro for WPF (using VS 2012 and targeting to .NET 4.5.1). I have problem with binding itemsSource to ComboBox (but I investigate that in my case it happens also with other controls with ItemsSource property, like ListBox). I have nested views (usercontrols) with viewmodels created with SimpleContainer (IoC)....

Flex valuation of conditional expression issue (data binding ?)

flex,data-binding
I'm in trouble with valuation of conditional expression in Flex. Let me explain. I have this : <s:Label text="SomeTextLawyer" includeInLayout="{Session.isLawyer()}" visible="{Session.isLawyer()}"/> <s:Label text="SomeTextDoctor" includeInLayout="{Session.isDoctor()}" visible="{Session.isDoctor()}"/> This Session object is defined as below : public class Session extends Singleton { [Bindable] private static var user:User; [...] public static function isDoctor():Boolean {...

Binding to ComboBox displays Model name instead of property contents

c#,data-binding,combobox,windows-universal
I've set up the binding for a combo box using a property in the ViewModel. But when I debug the app on a device, the contents of the combo box is just the Model name for each index like LC_Points.Model.Grade. To debug this issue, I've gone through the following checks:...

Binding to an array of structs in WPF

wpf,data-binding
In my application I store an array of structs containing how much bills/coins i need to pay to a client and how many I effectively pay. public struct MoneyType { //contains more, but left out for readability public int Requested { get; set; } // How many are requested for...

ExtJS 5.1: Binding record value to component property

extjs,mvvm,data-binding,extjs5
Let's say I've got a ViewController, ViewModel, and my View. In the View, I've got a form panel that gets a loaded record. When this record loads into the form, I want to hide or show a button based on the record's status field, so I figured do something with...

Bind constraints in Input control of SAPUI5

data-binding,sapui5,openui5,sap-fiori
My rest service expose me a group of fields: each filed has a value and a list of attributes: enabled, maxLength (in case of string), minLength (in case of string), decimals (number of decimal digits - in case of float). In OpenUi5 I have: value and enabled are properties of...

ASP.NET DataGrid is empty

c#,asp.net,data-binding,datagrid
I have a ASP.NET datagrid which is on a user control. I have a main page which adds the user control ( sometimes multiple copies of the user control ) and restores them when a post back occurs. The dataGrid has insert / edit / delete links. I can add...

Databound DropDownList default option always returns 0

c#,asp.net,data-binding,drop-down-menu,selectedindex
I am creating a form to upload images. I have a dropdownlist fed by a SQL database, which contains the name and Id of previously created albums that the user may upload images into. If I select the second or lower option in the dropdownlist it always returns the correct...

Filtering ObservableCollection with ICollectionView

c#,wpf,xaml,mvvm,data-binding
I have ObservableCollection binded to dataGrid and now I want to filter the presented data I see that I need to use ICollectionView but I am not sure how to add ICollectionView with my MVVM pattern. My code simplified looks following: public class MainViewModel : ViewModelBase , IBarcodeHandler { public...

DataContext scope during binding

wpf,data-binding,user-controls,scope
I have a View A that has a UserControl U containing its own UserControl UChild. When I set the DataContext of A, will UChild get the DataContext of A using direct binding to its grandparent's property i.e. { Binding PropertyFromA } within UChild? I am trying to achieve this but...

How to generate dynamic buttons inside a canvas in Windows Phone 8.1 from viewmodel?

c#,wpf,xaml,data-binding,win-universal-app
EDIT: As becuase there are too many suggestions I got, so firstly I consider to change it step by step, so my first problem is to get the dynamic Buttons from ViewModel to View. I am writing a WP 8.1 Game apps. So from MainPage.xaml my game navigate to GamePage.xaml....

Validation on Radio Buttons

c#,wpf,validation,data-binding,radio-button
I'm not really sure how to word this, so here goes. I've got some radio buttons on a form in my WPF application which get validated. They're basically a required field for this form. When I start to fill in the form, both radio buttons are marked with a red...

How to databind nested tables with filters using knockout.js?

knockout.js,data-binding
I'm new to knockout.js for data binding. I have a simple example below using knockout.js to data bind a table, but when it comes to data binding nested tables with filter is hard for me to figure it out in knockout.js. If you look at the two sample tables below,...

XAML Binding data of an XML attribute and displaying its value

c#,xaml,data-binding,rss,xmlserializer
I am making simple RSS reader for Windows Phone which reads an XML file using XML Serializer and displays the list of items. I have Rss.css file and amongst others I have item class (below fragment): public class Item { [XmlElement("title")] public string Title { get; set; } [XmlElement("link")] public...

Any significant bug or issues with Android Databinding Library?

java,android,data-binding
Can anyone who uses android databinding library (com.android.databinding:dataBinder) comment about this beta library? In android developer site says "It might contain bugs, and it might not work for your use case, so use it at your own risk. " , so any issues or significant bug or bugs about it...

Anonymous function and data binding mechanism explanation on example of D3.js implementation

javascript,arrays,d3.js,data-binding,anonymous-function
My question is about the work with D3.js visualization JavaScript library. I have an array of objects, each object contains the same properties, but with the different numeric values. Now, I want to find the maximum value of the specific property among the objects of this array. Here is the...

Bind to List of objects that contain Dictionary

c#,wpf,data-binding
I’ve got a Model class called BaseNode which has a Name property and a Dictionary property. I’ve got methods in this class to manage the Dictionary and there is a list of BaseNodes in my BaseNodeViewModel. In my example code below I have added 2 BaseNodes to the List, the...

Angular data binding with calculation

javascript,html,angularjs,data-binding
This seems like a pretty simple question but I haven't been able to find the answer anywhere. When using data binding in AngularJS as such: <iframe height="{{bodyHeight}}"> </iframe> I just want to subtract a number from bodyHeight similar to: <iframe height="{{bodyHeight - 90}}"> </iframe> I was hoping to do so...

DataGridView binding to an object's “ToString” property

c#,winforms,data-binding,visual-studio-2013,datagridview
I am binding a list of objects to a Winform DataGridView. This works fine and has a column for each property on my object. I have now overridden the “ToString” on the object that outputs text based on the properties. I would now like to change my DataGridView so that...

Updating a property inside a LINQ clause breaks databinding to UI

c#,linq,xaml,silverlight,data-binding
I have a problem where a Silverlight UI datagrid is not updating, when the underlying data property changes. I can make it work if I introduce a temp variable and update the data in one chunk, but do not understand why the original code does not work. This is the...

Add Item to ObservableCollection

c#,xaml,data-binding,windows-phone-8.1,observablecollection
I have one TextBox which the Text content has data binding to the View Model. I need to save different string from the TextBox to one collection, but seems it always replicates the last current TextBox's text to all the items. Although each time i have typed different text. Here...

Update ObservableCollection where the items are received from another List

c#,wpf,xaml,data-binding,observablecollection
I want to display all my CONTACTS in a ItemsControl dynamically. I have a List Contacts in my Logic (this one gets updated if someone removed me or if someone accepted my request) and I've added this List to a ObservableCollection<> which is bound to the ListBox. C# Contacts =...

Gracefully handling expected BindingExpression errors

wpf,xaml,data-binding,wpf-controls
I have a ComboBox bound to an ObservableCollection where the DisplayMemberPath references an object property Url. My CompositeCollection contains a null item, allowing the user to have an optional selection: <ComboBox Grid.Row="7" Grid.Column="1" Height="24" VerticalAlignment="Top" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedNotificationServer, Mode=TwoWay}" DisplayMemberPath="Url"> <ComboBox.Resources> <CollectionViewSource x:Key="comboBoxSource" Source="{Binding Path=NotificationServers}" />...

ObjectListView: Binding a list to DataListView

vb.net,list,data-binding,objectlistview
I'm using the DataListView (from ObjectListView) to bind a custom-object list, but I'm unable to make it work out. Here's my code: Class MediaItem Property Title As String Property Artist As String Property Album As String End Class Dim library as New List(Of MediaItem) dataLV.DataSource = library Now when I...

bind array from template to controller with angular

javascript,angularjs,data-binding,bind
Hi I have a problem with bind data from template to controller with angularjs The first I have object (edited) $scope.data = { } After that I bind it to html <input ng-model="data.item.test[0].value" /> But I controller I get { item: object() { 0: object() {value: "ok"} } } What...

Setting binding on usercontrol to mainwindow's ViewModel

.net,wpf,xaml,mvvm,data-binding
I have following user control <UserControl x:Class="Station.Controls.FilterTraceDataControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> <TextBox x:Name="PartNumbTextBox" Width="120" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="5,0,0,0" Height="25"/>...

Evaluate Binding Path Dynamically in Silverlight in XAML

silverlight,data-binding,silverlight-5.0
How can I evaluate a binding path dynamically, that is, the actual path comes from a property? For example, suppose I have a property of DisplayMemberPath, and I wanted to have something like: Content="{Binding Path=(DisplayMemberPath)}" I know that this doesn't work, it's just to explain what I wanted. I know...

Passing params to nested directives with isolated scope

angularjs,data-binding,scope,directive
I have an object data in the MainCtrl. This object is used to pass data to directives first-directive and second-directive. Two-data binding is neccesary in both cases. For first-directive, I pass the complete object data but for second-directive I want to pass numbers object (scope.numbers = scope.dataFirst.numbers). The problem: When...

Unexpected behaviour with KnockoutJS Keypress event on input

javascript,html,knockout.js,data-binding
I have an event binding on an input of type search, this is in order to fire a search off to the server side and populate the list as the user is typing. That part is fine and I have established a skeleton example using pure javascript, when it came...

DataGridRowEditEndingEventArgs 's row.item returning null

c#,wpf,xaml,data-binding,wpfdatagrid
I just created a new WPF MVVMLight Project, simple : MainWindow.xaml <Window x:Class="DG.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:command="http://www.galasoft.ch/mvvmlight" DataContext="{Binding Main, Source={StaticResource Locator}}"> <i:Interaction.Triggers>...

Cannot make DataGridView to bind to data source more than once

c#,multithreading,winforms,data-binding,datagridview
I have a Winforms GUI app. I have a list of simple class called FinishedTests_Loops_DGV. This list is being added in a different thread (timer thread). After new class is added to the list (inside timer thread), I call updateLoopsDGV() which invokes the DataGridView and updates it: public void updateLoopsDGV()...

Modular Web Components with View-Based Data-Binding context

javascript,html,knockout.js,data-binding
I'm trying to make my code as modular as possible and mimic the patterns of WPF and Caliburn.Micro. Here's what I've tried so far using Knockout components. Component ViewModel function welcomeViewModel() { this.greeting = 'Hello world!; } App ViewModel function appViewModel() { this.firstGreetingVM = new welcomeViewModel(); this.secondGreetingVM = new welcomeViewModel();...

Implementing data binding in a MVVM framework

c#,mvvm,data-binding,system.reactive
I'm developing a MVVM framework (C#) and I'm looking for information on how to implement data binding / synchronization (one-way, two-way, multi-binding, etc.). Also, is there any other frameworks I should consider utilizing, e.g. Reactive Extensions?

Binding issue in UserControl contained in a ListView

c#,xaml,data-binding,datacontext,windows-universal
My app structure is as follows: MainPage.xaml has a ListView that has it's ItemSource set to a CollectionViewSource which is populated in code-behind: MainPage.xaml <Page.Resources> ... <CollectionViewSource x:Key="src" IsSourceGrouped="True" /> ... </Page.Resources> <Grid> ... <ListView ItemsSource="{Binding Source={StaticResource src}}" SelectionMode="None" ItemTemplate="{StaticResource processTemplate}" ItemContainerStyle="{StaticResource ListViewItemStyle}"> <ListView.GroupStyle> <GroupStyle...

What is the point of WPF data binding? Implementing INotifyPropertyChange versus manual GUI updating

c#,wpf,data-binding
I recently made a very simple app in WPF that simply reads data from a few TextBoxes and updates records in an SQL Server database. I also put back and forward buttons to allow the user to scroll through the available records. Everytime the user clicks Next on the app,...

XAML MenuFlyoutItem Command Binding in ListView

wpf,listview,data-binding,windows-phone-8.1,mvvm-light
I am using MVVM light in the project, and I have a ListView in the NoteListPage. In the ListView, I define 2 MenuFlyoutItem, I want to bind each one the command I have created in my View Model. Here is some detail in my NoteListPage.xaml: DataContext="{Binding NoteListPage, Source={StaticResource Locator}}"> In...