I have radio button list in a gridview that needs to be bound to a column. If the value in a column is 0, the first radio button is selected, if 1, the other is selected.
This is the code, some of it is partially removed because it is not necessary
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<>"
SelectC...
I want to bind list of business objects to Winforms control (DataGridview, ComboBox, e.t.c.).
There are several approaches to do that:
I can create wrapper classes for business objects and override their ToString method implementation. That will work nice for ComboBox, ListBox Items.(Add|AddRange) methods.
But this will not work fo...
I have found an excellent video about how to bind controls to an XML dataset completly in Blend without a single line of code.
I am trying to do the same - bind a textbox to a value of Dataset --> MyDataSet.xsd which grabs the total number of rows in a table (executes: select count(id) from books). And I am having a really hard time doi...
Hi,
i'll try to create a hierachical context menu using databinding. The XAML code looks like the following:
< ContextMenu>
< MenuItem Header="MoveTo">
<MenuItem.Resources>
<!-- Display files as menu items -->
<HierarchicalDataTemplate DataTy...
I'm playing with ICollectionView right now, and am encountering a problem where I think I understand the "why", but not the "how do I fix it". :)
I have a ComboBox that's databound to an ICollectionView, and it is initially set with the following code:
NameView = CollectionViewSource.GetDefaultView( names); // names is an IEnumerable<...
Basically when editing an item, I want to bind its ProviderId value to the DropDownList's select value. DropDownList is getting its list of values from other entity entity_List as you can see.
Markup:
<asp:ListView ID="aList" runat="server" OnDataBound="aList_OnDataBound" DataKeyNames="ListServID" DataSourceID="ListServCon" InsertItemP...
I have created a Silverlight User Control. The markup is:
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Width="Auto" Margin="5">
<Button Content="OK" Margin="0,0,5,5" MinWidth="50" Command="{Binding OKCommand}" />
</StackPanel>
The code behind declares a Dependency property 'OKCommand' as:
public ICommand OKC...
Need: Need to bind data to WPF controls for a user to update a database.
Approach: I am trying to implement a solution similar to this but am having an issue because I will be using a DataSet and not LINQ to SQL Class (hitting an Oracle db for my data). If this is a correct approach how can I do this?
I'm also thinking instead of addi...
I have a RadComboBox that i have bound like shown below
<telerik1:RadComboBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" Margin="5,2" ItemsSource="{Binding RepTypes}" DisplayMemberPath="Path=TypeName" SelectedValuePath="Value" SelectedItem="{Binding RepType, Mode=TwoWay}" >
</telerik1:RadComboBox>
When i s...
I am working on an application in C# using the .NET Framework 3.5. I have a TextBox on one of my forms that is bound to the "ID" property of the DataContext of the form, like so:
<TextBox x:Name="txtID"
Grid.Row="0" Grid.Column="1"
Margin="2" MinWidth="200" VerticalAlignment="Top"
Style="{StaticResource validationToolTip}...
Hi,
I have the following class:
public class MyCustomCanvas : Canvas
{
public static readonly DependencyProperty SpritesProperty = DependencyProperty.Register(
"Sprites",
typeof(ObservableCollection<Sprite>),
typeof (MyCustomCanvas),
new FrameworkPropertyMetadata(
null,
FrameworkPr...
Ok, So I have tried to implement a coverflow found on codeplex http://silverlightcoverflow.codeplex.com/
I wanted to use my own class for data binding:
class CoverItem
{
BitmapImage _image;
string _title;
string _link;
string _content;
public BitmapImage Image
{
get {...
hi,
i've started learning Silverlight 4 RIA services. i've gone over alot of samples of how to bind data to a grid. but always there object being bound is a simple one with no child tables.
in my DB there's a table for employees and a table for city names (with id field as pk). in the employee table theres a FK to the CityId field.
t...
Hi,
I've got a ComboBox with an ItemsSource which I've bound to a List(Of String).
What I'd like to do is have the XAML update a String property when the SelectedValue of the ComboBox changes. I've seen a whole bunch of examples for TextBoxes which use
Text="{Binding Path=MyString}"
sort of stuff, but I don't really think that'll be...
I'm trying to databind the visual state of a control (using code from the answer to http://stackoverflow.com/questions/2208363/visualstatemanager-and-databinding) to a property on my viewmodel in Silverlight.
On the viewmodel-side when I expose a standard property
Public Property State As String
Get
Return _state
End Ge...
Hi folks,
I have database on the server but as a developer when we found some bug in the product then to resolved that bug quickly we need to take dump of database which is currently present on the server.As the db size is much larger so it is not possible everyday to create dump and download it which is wasting some times.So I w...
I have a DataList Control as follows
<asp:DataList ID="DataList1" runat="server" DataKeyField="FruitID" RepeatColumns="2" Width="387px">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" Height="104px" ImageUrl='<%# Eval("ImageUrl") %>' Width="135px" />
<br />
Item ID:
<asp:Label ID="lblItemID" runat="server" Text='<...
I am thinking about how an application can be written to work on both Windows 7 Phone and IPhone, one option is to use MonoTouch and structure the app with MVVM, then only the views will need to be different between the platforms.
However MonoTouch does not seem to support data binding.
When (if) data binding support is added to Mon...
I have a listbox and as ItemsSource I give it an IList .
In this object exists another object with name {User} and I am trying to Bind the property {Username} onto a textBlock.
I tried something like this but with no luck
<TextBlock x:Name="usernamtTBL" Text="{Binding 'User.Username'}"/>
This is the full XAML code of listbox
<List...
In .NET I just do something like DataForm.Source = Object and then magic happens. Platform routes data changes from ui fileds to object properties, does validation and so on. Can I do something similar with Cocoa Touch and CoreData objects?
...