I have a sqlite db from where i am retrieving images. I have to display those images into a windows datagrid. For binding , I have Class Called COntacts , given below
namespace ContactManager.Core
{
public class Contacts
{
private long _id = 0;
public long Id
{
get { return _id; }
...
I have a DataGridView that is bound to BindingSource and it's DataSource is DataView and this DataView has a DataTable bound.
But when I call
DataGridView.Sort(Column, Ascending)
On a column that exists in DGV and in DT I get error:
DataGridView control cannot be sorted if it is bound to an IBindingList that
does not support sorting...
Scenario:
I am building a flexible discounting component, whereby discounts can be specified for different types of customers against different types of products (means tested). The discount categories, product types and discount rates are all configurable by the user and ideally I would like the user to be able to view and edit the dis...
Hi,
I have a view of my data being fed by a viewmodel, but I'm having some issues with comboboxes. The xaml looks like this:
<ComboBox Grid.Row="4" Grid.Column="1" Margin="2,2,10,2"
ItemsSource="{Binding TrialParentValues, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
SelectedItem="{...
In our domain, we override the ToString method on all our domain types.
However, when returning those domain objects in response to a Silverlight service request, the functionality of ToString is lost. ToString() just returns the namespace description of the object as it is imported from the service. My guess is that the domain prox...
I'm trying figure out the best way to validate user input and I've been looking at ValidationRule and IDataErrorInfo. I have a VM and a model and I want to ensure a user does not enter alpha char's into multiple textbox's bound to doubles (or ints).
I'm running into 3 issues
1) When I use the ValidationRule the method returns a 'Valid...
I have a DataGrid that has event handlers bound to SortCommand and PageIndexChanged. How can I determine if those event handlers are about to be called, say on page_load?
These events will fire just fine after page_load, but I'd like to know at page_load if they are to be fired.
...
How can I have a property grid update automatically when the object in its SelectedObject property changes? I've tried implementing INotifyPropertyChanged in my class but the property grid does not actually show the new propertyies of the object in the background until I click on it.
I've tried subscribing to the PropertyChanged event ...
I have a Dictionary of int to char (decimal & ASCII character associated with that int). I want to have two editable combo boxes that are pre-populated with the initial values. If the user selected a value from ComboBox “A” (the dict key) I want the dict value to be populated in ComboBox “B” – and vice versa.
It’s relatively easy to p...
Hi
Im using a List<Patient> object as the data source to a data grid view. I need to use concatenation of two string properties in the Patient class as the value of a single text box column.
I know this can be done by using the OnRowDataBound event in the webforms GridView. How to handle this situation in win forms? I cant see OnRowData...
Okay I have searched and can't seem to come up with where to find the answer to my question.
What I'm trying to do is to turn the generic string list retrieved from a sql table like so:
List<string> UserList = new List<string>() { "User One", "User Two" };
and trying to output it to a web.aspx page using <%# Eval("UserList"):
<asp:L...
Hi I have this code sinnpet
private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
remplirDataGrid();
}
private void frmChercherActesLoad(object sender, EventArgs e)
{
backgroundWorker1.RunWorkerAsync();
}
private void remplirDataGrid()
{
...
Is there a way to use the existing WPF BooleanToVisibilityConverter converter but have False values convert to Hidden instead of the default Collapsed, or should I just write my own? I'm on a project where it's tremendous overhead to do something simple like this (shared stuff goes into a separate solution, and the rebuild/checkin/merge...
How can I make such UI:
1) ListBox with items.
2) Detail information about selected item.
3) When you change any item in details information, the selected item in the list becomes bold...
4) ... until you push "Save" button and all changes go to the database.
For example, for Binding to the list I use Object with String Name property an...
Is there some way to avoid this. I have a lot of classes that are bound to DataGridViews and they are just simple collection of properties with default getter and setter. So these classes are very simple. Now I need to implement INotifyPropertyChanged interface for them which will increase the amount of code a lot.
Is there any class tha...
Hi
I have an Combobox which is poplated with data that is time sensitive.
My setup is a bit hard to explain so lets assume that the Combobox has a itemtemplate containing a textblock.
The textblock is databound to a property returning DateTime.Now, I would like to rebind the value of the textblock (not the whole combobox).
Is there a way...
Hi,
I'm still fairly new to silverlight, so hopefully this is an elementary question: I have a polyline whose 'Points' (type: PointsCollection) property is bound to a PointsCollection public member, Pts, in my view model class. When I add/remove points from ViewModel.Pts, the polyline redraws correctly without any problem. However, if...
Hi there,
I'd like to build an MRU menu that has the following structure:
File
+=>Recent Files
+=> Doc1.txt
+=> Doc2.txt
-separator-
+=> Clear entries
This being MVVM, my mru list is databound to the View Model. Because I want to add the separator, and I don't fancy inserting the separator and the clear entry action in th...
Even if I'm not new to Java, I've only used it in school/university environment so I don't know all the best practices used in the enterprise.
In particular I'm now developing a Java desktop application (using Swing at the UI Layer) and I'm particularly interested in best practices about data binding with swing components.
For example ...
I currently have something like this in a GridView:
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<a href='Link/<%# Eval("Id") %>'>
<img src="/App_Themes/Default/Images/Icons/<%# Eval("Icon") %>" alt="Icon" />
<%# Eval("Name") %>
</a>
</ItemTemplate>
...