Hi,
I am looking for some examples for gridview for common tasks like displaying, editing, deleting, paging, sorting, batch updates etc, but WITHOUT using any datasource controls. I would like to bind the data in the code to custom object collection. all the samples I found on the web so far use some data source control, I think Enter...
Hi all,
Consider a serviceCall which returns an object:
// the int is the ID!
Dictionary<int, Dictionary<MyObject, List<AnotherObject>>> theData = Service.GetData();
MyObject looks like this:
class MyObject
{
public string Name { get;set;}
}
I have 2 comboboxes.
Combobox1 : I want to display the int from the dictionary. So ...
I've got a custom control ive created that is instanced in my view, in my custom control (a text box) i have a dependency property set up which is bound to the text value, this all works correctly and updates. However I now want to bind a dependency property of my view to the dependency property of my control but I cant get this to quite...
I have code like this:
<ListBox ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock>Some Other Stuff Here</TextBlock>
<ComboBox ItemsSource="{Binding}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
The problem is,...
I have master-detail relationship. Basically I have a list of states and a list of towns per state.
I want for it to display something like
Oklahoma
> Tulsa
> Oklahoma City
Arizona
> Phoenix
> etc etc
and etc.
The city names and the state names are stored in different tables with each city containing a state_id
I am using SubSo...
I have some problem to access the Window's DataContext from within a DataGrid.
The DataGrid is bound to a IBindingList:
public IBindingList Items{ get; set; }
private void initItems()
{
//ItemFactory is a Linq2SQL Context, Items is the view of availabe Items
this.Items = this.ItemFactory.Items.GetNewBindingList...
Here's a part of XAML of the application I'm working on:
<ListView Name="lsvCustomerDetails" ItemsSource="{Binding myDataTable}">
<ListView.View>
<GridView>
<GridViewColumn Header="Script Name" DisplayMemberBinding="{Binding ID}"/>
<GridViewColumn Header="Status" DisplayMemberBinding="{Binding status}"/>
...
I'm having an issue with data binding that doesn't seem logical!
I have a control that I have inherited from a custom base class:
<a:DataPanel x:Class="Sample.Controls.DataPanel2"
x:Name="Panel2"
xmlns:a="clr-namespace:Sample.Controls">
<Grid>
</Grid>
</a:DataPanel>
DataPanel is a class that I've inher...
I'm relatively new to WPF, and it looks like there are probably a bunch of ways to do this, but I can't get any of the ones I have tried to work.
I have an ObservableCollection that contains two different types.
I want to bind this list to a ListBox and display different DataTemplates for each type encountered. I can't figure out how ...
Is there a way to specify a default property to be referenced by the Path with data binding within XAML? I am looking to be able to do something like what CollectionViewSource does when using Binding.
When you bind to a CollectionViewSource within XAML, it is automatically hooking up Path to the View property.
Eg: {Binding Source={Sta...
Hi, I recognise this is a popular question but I couldn't find anything that answered it exactly, but I apologise if I've missed something in my searches.
I'm trying to create and then measure a control at runtime using the following code (the measurements will then be used to marquee-style scroll the controls - each control is a differ...
I have a list of models displayed in a listview when the listviewitem is clicked I open a dialog that is bound to the listviewitem's data model and allows the user to edit the various properties.
I am trying to figure how to deal with the ok and cancel buttons. On the one hand if I bind the dialog directly to the listviewitem's model t...
I'm once again in WPF binding hell :) I have a public class (Treatment) as follows:
public class Treatment()
{
...
public Ticker SoakTimeActual;
...
}
Within Ticker is a Dependency Property:
public class Ticker : FrameworkElement
{
// Value as string
public static readonly DependencyProperty DisplayInter...
Hello Everybody,
I am dealing with the following problem:
I use a MSSQL Stored Procedure for displaying my data in a DataGridView. The Update and Insert Commands work, but there is one problem:
On inserting a new Row, the auto-numbered primary key isn't send back to my DataAdaptar. So the insertion is successfull in the database, but ...
To make this as simple as I can think to ask, if I have to classes:
Order, OrderType, where an Order has 1 to 1 relationship with OrderType, how can I Bind (List) to a datagrid, and see the desired column/field from OrderType?
When I bind a List to a datagrid, in the Order.OrderType 'field', I just get the name of the OrderType class w...
I have a window in one assembly that has a TextBlock control that I want to bind to the value of a Property of a class that is the property of the DataContext of that windows parent. The class that is serving as the DataContext is only defined within the second assembly. My question is what type do I need to specify as the Type in my b...
I'm a bit of a .net newbie and I've been working on my first big silverlight project. So pardon the lack of lingo and the length of the question. But my problem is as follows.
The project is being built according to the MVVM pattern ( in this case I'm using LightMVVM ). Most of the views contain ListBoxes. These listboxes need to ha...
Just wondered what that best approach is for this scenario - trying to databind to a collection which is being populated in another background thread.
My background thread is adding items to the collection in a processing loop which may run for several minutes. Every now and then it raises an event to the UI and passes a reference to t...
Hi,
I'm doing a generic controller, right now is one button from telerik with two direferents datatemplates. Each dataTemplate has an specific key to id and in code-behind i change between them.
My problem is i cannot do the binding to my properties. For example:
My Xaml looks like:
<telerik:RadButton x:Class="Itim.Framework.Silv...
Hi,
I am making a custom control based on a Panel. The main idea is to bind a datatable to this panel. There are functions for selecting a row + updating, saving and deleting this row in the custom Panel. The only problem is binding the data. I have this function:
private void _addBindings()
{
_src = new BindingSource(...