datagrid

What is the code behind for datagridtemplatecolumn, and how to use it?

Hi. I have a datagrid in wpf. And I am trying to add buttons to certain cells of the grid, after it is bound to a particular itemsource. I have tried to do this in the xaml like this: ` <dg:DataGridTemplateColumn.CellTemplate> <DataTemplate> <awc:ImageButton...

WPF: Adding Button Column to Datagrid

Hi how can i a Button column to a Datagrid programatically. I want to do this through code in codebehind file. Also i want to selectively enable or disable this button based on record (If status is Open then Enable it else disable this button). Here Status is a Column in the DataSource. Thanks, Abhi ...

Handle DataGridHyperlinkColumn Click Event

How to handle click event of DataGridHyperlinkColumn programatically through code(in .xaml.cs file). ...

BeginEdit of a specific Cell from code behind

Is possibile begin edit of a specific cell from code behind with DataGrid control (WPF Toolkit)? I have to enable the celledittemplate of first cell of selected row after a button action...how can I do? ...

How can I access x:Name from Code Behind?

I have a datagrid in which I am using DataGridTemplateColumn and DataGridTextColumn. I want to access these columns at runtime so I have assigned x:Name property to them. But I was not getting that value in code behind, so I looked for DataGrid and then read objects by iterating through DataGrid.Columns. How can I read x:Name property fr...

C# disable datagrid scrolling

Hi, Is is possible to disable DataGrid scrolling ? If yes, how ? Thanks. ...

Flex Datagrid Drag and Drop into Cell

Hi all, I am creating an application that will allow users to model configuration information by allowing them to Drag and Drop objects from a Flex Tree into a DataGrid. I know that both the Tree and DataGrid both support Drag and Drop quite well. My problem is that I want users to drop items from the Tree into a particular Datagrid ce...

Datagrid - Stop event HEADER_RELEASE when push headerRenderer checkbox

Hi, i have this code in flex: <mx:Application ... > .... <mx:DataGrid id="filtros" styleName="grid" rowCount="10" dataProvider="{_larcFiltros}" allowMultipleSelection="true" > <mx:columns> <mx:DataGridColumn dataField="titulo" textAlign="left"> <mx:headerRenderer> <mx:Component> ...

How can I programatically create a WPF Toolkit DataGridTemplateColumn?

I was able to recreate this XAML DataGridTextColumn: <tk:DataGridTextColumn Binding="{Binding FirstName}" Header="First Name"/> in code like this: DataGridTextColumn dgtc = new DataGridTextColumn(); dgtc.Header = propertyLabel; dgtc.Binding = new Binding(propertyName); theDataGrid.Columns.Add(dgtc); But how do I recreate th...

WPF DataGrid CellEditingTemplate with floating control

Hello, I'm using the WPF DataGrid and want to make my own CellEditingTemplate. I want to replicate something like the DatePicker that doesn't replace the whole contents of the cell when its being edited, but instead just floats Like this: http://i3.windowsclient.net/SiteFiles/1000/wpfsp1/wpf-35sp1-toolkit/107-2.png?cdn_id={b4d0570c} I t...

Add new row to database table from Datagrid

Hi All, I am trying to update a database table from my datagrid using an event handler and ItemCommand. I manage to call the routine and everything is working fine except the text that is inserted into my database is empty. I managed to track this back to the text not being passed from my datagrids footer to the sql parameters. I tried ...

WPF: How to highlight all the cells of a DataGrid meeting a condition?

The (wpftoolkit) datagrid generally represents a collection of objects with rows representing each object, and the columns the repective properties. I am not using it this way. I am using it to represent the "intersection" between 2 collections. Rows represent objects of collection A and columns represent objects in collections B. A ce...

WPF Datagrid: Programmatically editing a cell

I have a cell that needs its value to be set on it just being clicked. It is multibound to different properties. Where am I supposed to do this? I have been trying to do it in the datagrid beginingedit handler like this (without much success). I am able to manually click twice(once to select cell and then to start edit) and the value g...

Silverlight 3 - Add a value converter for the SortMemberPath property of a data grid column header

Hello everyone, I created a DataGrid, that utilizes customized data cells using the DataGridTemplateColumn.CellTemplate directive. I placed a textblock inside with the Text field using a Binding to one of the ItemSource members. As the content of that member differs between "Green", "Yellow" and "Red". Everything works fine. The Foregro...

How can i do select multiple rows ( allowMultipleSelection="true" ) in datagrid using flex ?

I have id(array) used in my application . i want to select number of rows mathching given array but if i used gatagrid selected Index then it will be selected only one row only . i set data grid allowMultipleSelection="true" also .. . how can be select mutipule rows in datagrid ? please refer me for(var i:int=0;i<id.length;i++) { ...

WPF datagrid problem

I created this datagrid, and it all works fine, but there's this little annoying problem here's a screenshot of my datagrid http://users.telenet.be/i_dislike_mushrooms/datagridproblem.JPG But there's this small "column" to the left which annoys me like hell. Here's my code: <Window x:Class="IMDB.ML.Window1" Name="This" xmlns="http:/...

Freezing a DataGridTextColumn in WPF

I would like to freeze a DataGridTextColumn in WPF but it looks like there is not a property for that in that class specifically. However, looking at the source for the WPFToolkit, there is a IsFrozen in DataGridColumn which is the parent of DataGridBoundColumn, which is the parent of DataGridTextColumn. So...why isn't that property avai...

wpf ValidationRule question

Hello I am having trouble firing a validation rule in the context laid out below. From a visual standpoint I have a DataGrid with columns for every day of the week where a user can enter the number of hours worked on a given activity. There are also labels to display the total hours entered for each day, as well as for the week. It is ...

passing selectedItem as CommandParameter from DataGrid WPF

Hi, I have a Datagrid, which i have a Hyperlink column as When user ...

WPF datagrid empty row at bottom

I bind my datagrid using //fill datagrid public DataTable GameData { get { DataSet ds = new DataSet(); FileStream fs = new FileStream(IMDB.WebPage.Class.Config.XMLPath, FileMode.Open, FileAccess.Read); StreamReader reader = new StreamReader(fs, Encoding.Default); ...