databinding

ASP.Net Control vs HTML Control Performance

Hello I have heard that we should avoid Default ASP.Net Controls, because they are heavy regarding Viewstate and etc... So I was thinkink in using , , HTML tags whenever I want to only show information, and use the Eval function to insert server-side code in a href or src atribute. But I have also heard that the Eval function is not ...

Solution for filtering all instances of an object?

Hi. I'm wondering if I can do something like this with CollectionViewSource too. I have a DataTemplate that looks like this: <DataTemplate DataType="{x:Type local:MyObject}"> <StackPanel Orientation="Horizontal"> <Grid> <Image Source="Images\gear16.png" /> <Image Source="Images\disk.gif" HorizontalAlignment="Right" ...

WPF Binding XML List

Hi I want to bind the following XML to a couple of controls in WPF. Each category name should bind to the items source of a combo box, then when a category is selected in the combo box I want to bind the list of Products from the selected category to a listview Here is the XML: <?xml version="1.0" encoding="utf-8" ?> <Categories> ...

WPF and WCF User Configurable Fields

Hi I have a requirement whereby a user can specify a variable number of user-defined fields, for example in an xml file. These fields have a user-friendly name which is displayed in the GUI, and a code which is used to persist and retrieve the value of the field to the database. The problem is that I need both my WCF service to consum...

WPF composite control not databinding properly

I am experiencing a weird problem. I have a WPF form into which I insert a UserControl which presents the user with a view of what they are currently doing. So I set MyControl.ViewObject = SomeCompositeObjectInstance, and then add MyControl into my form to make it visible. SomeCompositeObjectInstance has a property of another class ty...

Adding records when binding a datagrid to a list of objects in a winforms app

I have the following classes: public class MyItems : List<MyItem> { ... } public class MyItem { ... } I've instantiated MyItems and assigned it to the DataSource property of a WinForms datagrid. Everything displays properly, but when I try to add rows, nothing happens. What I do is case the grids DataSource back to MyItems, add an ...

Adding Checkbox during Databind

Hello, I have a Datalist and I am trying to insert a checkbox for each record that gets bound to the datalist. The first record has the checkbox but the subsequent records do not. I suspect that what I am doing is just replacing the first checkbox eachtime a record is bound. Can someone give me some insight? I need the checkbox to be re...

Validate data binding in XAML in compile time

I’m working on WPF based application. Environment is VS2008 SP1 with .NET 3.5 SP 1. In our development we are using MVVM pattern widely. I.e. application developers write Models and ViewModels (C#), then UI developers will write Views using WPF Binding (XAML). Application developers also write unit tests on top of ViewModels. We are u...

can i bind cell values of an html table to a data object to pass to an asp.net mvc controller

i have a form that i am submitting to my controller. I created a data class that is used to pass into my controller to do something like this: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Update(ApplicationUpdater applicationUpdater_) { } the issue is i used to have a list in a multi select dropdown and that simp...

wpf - templates - pass template item as ConverterParameter

I have a template for a ListBox. In the ListBox I have a template on the ListBoxItems. I want to disable some of these items (I am still working on what I want to use to make the "event" fire, so I have just put in IsSelected for now) My issue is that I need to get at some of the data for the ListBoxItem to know if it should be disabl...

Can I reattach or suspend a BindingExpression without warnings ?

I have the following test case xaml. <Window.Resources> <XmlDataProvider x:Key="testDS1"> <x:XData> <root xmlns=""> <item>1</item> <item>1</item> </root> </x:XData> </XmlDataProvider> </Window.Resources> <StackPanel> <ListBox ItemsSource="{Binding Source...

can you post complex objects from form to controller in asp.net mvc

i see there are solutions using different model binders like castl but i didn't know if the basic default model binder supported nested complex objects when i am posting a form to a controller. ...

Which is faster, XML + XSL or CLR + DataBinding

Which is faster, XML with XSLT or CLR with DataBinding? I'm assuming that it's CLR + Databinding but I could be wrong. ...

Flex 3 Binding problem

I have a custom ActionScript class: package EntityClasses { import mx.collections.ArrayCollection; [RemoteClass(alias="tkatva.tt.entities.CompanyInfo")] [Bindable] public class CompanyInfo { public var companyInfoId:int; public var companyName:String; public var streetAddress:String; public var postNumber:String; pu...

C# binding a combobox to a growing list

WinForms, .NET 3.5 I have a ComboBox that needs to display a growing list of items -- there is a long running process fetching items, and I want to be able to display items to the user as they build up over time. Setting the DatSource property to a naive Array/List doesn't work since subsequent additions are not registered by the Combo...

WPF DataTrigger - Setting ListBoxItem IsSelected

I have the following data trigger on the ListBoxItems in my Multi-selection ListBox <DataTrigger Value="True"> <DataTrigger.Binding> <MultiBinding Converter="{StaticResource DisableWorkItemConverter}"> <Binding ElementName="MainForm" Path="PickedWorkItemID"/> <Binding Path="Id"/> </MultiBindin...

How to bind table row to Edit-button in jsf?

It's trivial but unfortunately I don't understand some processes 'behind the scenes' in JSF. So, I'm also interested in links to related articles. The problem: I have a list of User-objects. And I represent this list as a dataTable. <h:dataTable var="user" value="#{userService.allUsers}"> <h:column> <f:facet name="header"> ...

How to get the selected value in a DropDownList in the Object Type (not string)?

I fill up a List<> with an object that has properties. I can bind to the DropDownList without any problem: cbo.DataSource = possibleChoice; cbo.DataValueField = "Value"; cbo.DataTextField = "Display"; cbo.DataBind(); But I can't find a way to get the Value. I know the DropDownList has SelectedValue but it return a ...

What approaches are available to dummy design-time data in WPF?

I am working without expression blend and just using the XAML editor in vs2010. The wisdom of this aside, I am increasingly seeing a need for design-time data binding. For simple cases, the FallbackValue property works very nicely (Textboxes and TextBlocks, etc). But especially when dealing with ItemsControl and the like, one really need...

Can MethodParameters in an ObjectDataProvider be databound to other controls?

I've been exploring WPF and XAML for a while now, but have hit a slight stumbling block revolving around binding to a method. My situation is: There is a ComboBox bound to a DataTable. There is a ListBox bound to the return value of a method (GetDates) via an ObjectDataProvider. One of the input parameters of the method GetDates is an ...