databinding

Slow Databinding setup time in C# .NET 4.0

Hello, I have got a problem. I have windows forms application with dynamic generated layout, but i have a problem in performance. In this form i use DataBinding from .NET 4.0 and databinding after setup works fine, but he binding setup time for ONE control blocking my application on approx 0.7 second. I have some controls and time of bi...

WPF - How do I get an object that is bound to a ListBoxItem back

Hi there here is what I would like to do. I get a List of objects from a database and bind this list to a ListBox Control. The ListBoxItems consist of a textbox and a button. Here is what I came up with. Up to this point it works as intended. The object has a number of Properties like ID, Name. If I click on the button in the ListBoxIte...

WPF Datatemplate + ItemsControl each item uses > 1 MB Memory?

Does that sound right to anyone???? I have an ItemsControl that displays data from a custom object that implements iNotifyPropertyChanged. The DataTemplate consists of: Border 3 buttons 5 textboxes An ellipse A Bindable RichTextBox (custom class that inherits from RichTextBox... so I could make Document a dependency property (to suppo...

Does Microsoft hate firefox? ASP.Net gridview performance in firefox bug?

Could someone please explain the significant difference in speed between a firefox updatepanel async postback and one performed in IE? Average Firefox Postback Time For 500 objects: 1.183 Second Average IE Postback Time For 500 objects: 0.295 Seconds Using firebug I can see that the majority of this time in FireFox is spent on the ser...

Binding a combobox in XAML to a childwindow property

Hi, I want to display a child window that contains a combobox with several values coming from one of the child window's property: public partial class MyChildWindow : ChildWindow { private ObservableCollection<MyClass> _collectionToBind = // initialize and add items to collection to make sure it s not empty... public Observabl...

DataBinding to GridView

Hello, I Have a gridview object and i want to bind it to Object.. My Object is namespace DataBinding { public class BindingObject { public ColorInfo Color { get; set; } public string Name { get; set; } public struct ColorInfo { public string Red { get; set; } public string Green { get; set; } publi...

Binding to a collection of DependencyObjects in Silverlight 4

As of Silverlight 4 it is possible to data bind against a DependencyObject (instead of a Framework element in previous versions). So far so good, but how do I bind agains a collection of DependencyObjects. The DataContext is not passed from the ObservableCollection to the collection elements, so that the DependencyProperties of the Depe...

Is it possible to bind a List to a ListView in WinForms?

I'd like to bind a ListView to a List<string>. I'm using this code: somelistview.DataBindings.Add ("Items", someclass, "SomeList"); I'm getting this exception: Cannot bind to property 'Items' because it is read-only. I don't know how I should bind if the Items property is readonly? ...

How to retrieve datas from access Database to Datagridview

I have datas as unitprice with 10 decimal places in access database. I want those decimal places to reduce when it comes to datagridview(round to 2 places). How can i achieve this. Any idea. Thanks in advance ...

Retrieving substring of a bound value

I am binding some data to control, but want to limit the number of character of a specific field to a 30 first characters. I want to do it, if it's possible, on aspx page. I tried this: Text='<%# String.Format("{0}", Eval("Title")).Substring(0,30) %> ' But got this error: Index and length must refer to a location within the ...

Any reason why PresentationTraceSources.TraceLevel=High would not print any info to the output window?

I've been trying to get to the bottom of an issue with binding the SelectedItem of my ComboBox and since I've had not success thusfar I started looking at ways to get more detailed debugging information by setting PresentationTraceSources.TraceLevel=High for specific bindings. Unfortunately after doing so I don't see any related items in...

WPF - Binding to a list within a Listview Item

So I am trying to bind to a list within a ListView item but I can't seem to get the binding correct. If some one could help me with the corrected binding that would be great! Here is the source you will probably need: //class that xaml is initially bound to public partial class UploadMngPanel : Grid { .... //initial list to bin...

Override the default row error behavior for a DataGridView

I have a DataGridView that is bound to a DataTable. When a row in the table has an error (row.RowError is not empty), the DGV helpfully displays an error icon and tooltip with the error text. Instead of, or in addition to, this behavior, I would like to change the entire row color. What event does the DGV subscribe to in order to handle...

dropdownlist binding from function in code behind aspx vb

so I have this working in C# , why it is not working in VB public string[] CustomizedRoles() { int length = Roles.GetAllRoles().Length; string[] arrRoles=Roles.GetAllRoles(); string[] customizedRoles= new string[length+1]; customizedRoles[0] = ""; for (int i = 1; i < length+1; i++) { customizedRoles[i] = arrR...

How to save the IsExpanded state in group headers of a listview

Hi, I have quite a tricky problem: I am using a ListView control with the ItemsSource set to a CollectionViewSource including a PropertyGroupDescription to group the ListView elements. The CollectionViewSource looks like this: <CollectionViewSource x:Key="ListViewObjects"> <CollectionViewSource.Source> <Binding Path="CurrentL...

Validation errors prevent the property setter being called

Hi, I am looking for a simple solution to the following problem: I am using a simple TextBox control with the Text property bound to a property in the code behind. Additionally I am using a validation rule to notify the user of malformed input. ... error display style h...

how to insert an integer value from a Grid to Sql table?

Hi, I have a AdvWebGrid where the 7th coloumn is DynEdit where user will enter the value.Now I have to take the enetered value and insert into the Sql tablel. For example i have 7 records in the grid the user will enter some comments for the first three record and save.Now i have to insert/update the first three comments in the table. ...

How to synchronize data between model and view (2 ways) in javascript?

I try to use jQuery plugins like chain.js or DataBind, but it is not quite what I need... Chain.js can't store changed data to the model (as I know). DataBind have method unbinddata(), that store changed data in JSON structure, but can work only with form inputs, not with attributes or $(el).data(). ...

Having hard time binding array of object from web service call to wpf listbox

Hello guys! i started a WPF application (with vs 2008 sp1) which connects to a web service to get Collection of objects. I can be contactInfo[] or groupInfo[]. here is my main.xaml.cs public main() { InitializeComponent(); //service.addContactCompleted +=new addContactCompletedEventHandler(addContactCompleted); ...

Of Datagridviews, databinding, and non validating cell values.

Lets simplify. Lets say I have this class: class T { public string Name { get; set; } public int Age { get; set; } public int height{ get; set; } ... } and I have a DataGridView's DataSource bound to a BindingList <T>, with N columns, each one bound to each property. I need to: Allow the user to enter non validating age...