datagrid

How to handle Wpf DataGrid CellEditEnding event in MVVM?

MVVM doesn't allow code behind and so event handling. So what's the MVVM way to be notifyed that a cell been changed ? ...

Have a DataTemplate in XAML, need to programmaticaly set CellTemplate

I have DataTemplate, written in XAML <DataTemplate x:Key="AnalogTemplate" x:Name="AnalogTemplate" > <TextBox Text="{Binding parameter}" Background="Black"/> </DataTemplate> And I have some DataGrid How to apply DataTemplate "AnalogTemplate" to the one specified column in DataGrid programma...

How to Remove Default Row In Wpf data Grid

hello Experts i m using Wpf data Grid When Ever it to be loaded it is to be Come With A blank Defaul Row. there is no such property like windows grid to disable it..how can i disable it than ks in advance shashank ...

Disable Column Wpf Data Grid

hello Expert i have a problem i have some data in my data table there are 12 column in this whenever i want to bind it to a wpf datagrid(i want that first to column is to disable) and all other are shown in grid how can i do this thanks shashank ...

Silverlight adjust DataGrid height at run time

I have a Grid of 5 rows. At row 2 and 4 I have a DataGrid. The other rows have a fixed Height. The contents of the tables in the DataGrids is of course dynamically determined, and therefore their height too. As in my particular app there is a relation between the height of the two tables, I want to adjust the MaxHeight of both at run-tim...

How to DataBind from the Header property of a Silverlight DataGrid

How can the "Header" property of the DataGridTemplateColumn (or DataGridTextColumn) be bound to some text property of the ViewModel in the DataGrid of Silverlight 4? "Ideal" solution (that does not work): <sdk:DataGrid AutoGenerateColumns="False" ...> <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn Header="{Binding MyViewModel...

Dojo EnhancedGrid nested sorting not working

I am trying to create an Enhanced Grid with nested sorting functionality in Dojo but when I go to add the nested sorting functionality via the plugins the grid no longer works (shows up) in the page. My enhanced grid creation code is as follows: dojo.require("dojox.grid.EnhancedGrid"); dojo.require("dojox.grid.enhanced.plugins.NestedSo...

ValidationException in WCF

I am trying to implement ValidationException against a serialized DataMember of a class in a WCF web service. This datamember is of float type. I am getting the default data type validation messages, however the range validation that i had added is not working. Thanks for any input. Following are the details - Logic from WCF.... [Data...

show sorting arrow on flex datagrid other then sorting column

Hi , I am stuck with a requirement,I have a datagrid with following field Name, Age,Salary,code And my Array collection is as follow name, name_index, age, salary, salary_index, code, code_index. I am sorting array collection on datagrid headerelease event with column index. name column sort depend on name_index, age column sort o...

Fill datagrid with paging enabled in asp.net

Hi, I have datagrid with paging enabled that can have 10 rows per page. Also I have DataTable with 16 rows. I want to fill the datagrid dynamically with 'for' loop to go over all the DataTable and fill the DataGrid. I understand that there is a problem when the counter will hit row 11. Do I need to change the page of the datagrid when ...

What row index has a template checkbox in a datagrid?

I have a datagrid and there is a checkbox which is template in each row. Suppose I am in CheckedChanged event of one of the checkboxes. Is there any way I can tell in which row of the datagrid that check box is in? ...

fetch selected row from DataGrid

I'm using WPF Grid. The first column is a CheckBox column, and there is one save button on my page. When the button is clicked, I'd like all the checkboxes row to be set checked, insert a in a datatable. How can this be done? ...

How to use autocomplete in a datagrid?

I have a Datagrid with a DataGridTextColumn. This is populated by using databinding, and can be edited by users. Is it possible to add autocomplete to the DataGridTextColumn ? ...

Datasource of Datagridview is null

I am populating a datagridview with objects like this: foreach (NavField field in this.Fields) { DataGridViewColumn column = new DataGridViewColumn(); column.HeaderText = field.Caption; column.Name = field.FieldNo.ToString(); column.ValueType = field.GetFieldType(); ...

Bug in WPF DataGrid after upgrading to .NET 4.0

Situation is as follows: A DataGrid has a RowDetailsTemplate, which contains another DataGrid (the subgrid). If you add a DataGridTemplateColumn which contains an EventHandler, a NullReferenceException is thrown by PresentationFramework.dll. This issue is only present in .NET 4.0. If the project targets .NET 3.5 (and uses WPFToolkit f...

Asp.net GridView BoundColumn Format

Hi; Html Code: <asp:DataGrid ID="myGrid"> <Columns> <asp:BoundColumn DataField="CustomerName" HeaderText="Customer"> <ItemStyle Font-Bold="True" /> </asp:BoundColumn> </Columns> </asp:DataGrid> Code Behind: public string TestFunction(string str) { return str.replace("A","B"); } how to call TestFunction ? DataF...

WPF datagrid : how to sort a column programatically ?

Hi, How do I sort a column programatically ? I would like to have a function such as myWPFDataGrid.Columns[0].Sort(..) MadSeb ...

WPF Datagrid / Datatable: Large number of rows

I have a Datagrid connected to Datatable, which needs to load a very large amount of rows. To speed things up, I load 10% of the rows, and display the form. Most of the time the user only needs those 10% (they are the most recent entries). In a background thread I load the remaining 90% of the rows into another datatable (SecondData). ...

Wpf DataGrid - Adding new rows only when I want them

I have a datagrid with two columns a and b. Column b represents a percentage. I want to have a single editable row at the start, and have them fill in column a and b. In the case that column b is less than 100%, I want to add a new editable row. I want to always add a new row when the total percentage is less than 100%. Any ideas on h...

WPF Datagrid Performance

I have a very large comma-seperated text-file. I need to display this in a WPF Datagrid, which method would result in the highest performance of loading all the data to the grid? I'm only aware of two methods: Using a Datatable, and adding each line as row (looks like overkill) Using an ObservableCollection, creates object for each lin...