datagrid

WPF DataGrid duplicates new row when the newly added item is attached to the source collection.

<Page> <Page.Resources> <data:Quote x:Key="Quote"/> </Page.Resources> <tk:DataGrid DataContext="{Binding Quote}" ItemsSource="{Binding Rooms}"> <tk:DataGrid/> </Page> Code: Private Sub InitializingNewItem _ (sender As DataGrid, _ ByVal e As InitializingNewItemEventArgs) _ Handles...

How to adjust row height in datagrid at runtime in C# .net?

How to adjust row height in datagrid at runtime in C# .net? ...

WPF DataGrid window resize does not resize DataGridColumns

I have a WPF DataGrid (from the WPFToolkit package) like the following in my application. <Controls:DataGrid> <Controls:DataGrid.Columns> <Controls:DataGridTextColumn Width="1*" Binding="{Binding Path=Column1}" Header="Column 1" /> <Controls:DataGridTextColumn Width="1*" Binding="{Binding Path...

WPF: Custom control in DataGridTemplateColumn using a binding property

I have a datagrid who's DataContext is bound to a list of a custom class. I want to add a DataGridTemplateColumn and bind a property in the custom column to the property in the custom class that represents that column. 'Minutes' is an int property in my custom class. And MinuteSlider is a custom UserControl that consist of a slider and ...

Defining a ContextMenu in a DataGridRow style

I'm trying to clean up some of my xaml in my views by moving a lot of the DataGrid styles into a ResourceDictionary. One of the things I'd like to move is the ContextMenu that is bound to some commands in the ViewModel. However, when I move the context menu to the ResourceDictionary, the commands are are never firing anymore, and I can...

Silverlight DataGrid not stretching to accommodate all items in data source?

I'm having problems getting a Silverlight DataGrid to stretch to accommodate all the items in it's dataSource. I've got a Grid that contains two DataGrids. I've tried setting height=Auto on the Grid and the DataGrids. I've tried setting HorizontalContentAlignment="Stretch" on the Grid and the DataGrids. The object tag has height="100%"...

How to control the whole DataGridCell background and not just the text part?

Hi, I'm trying to control the DataGrid cell background in a column conditionally on its value. Unfortunately I'm getting something like this: Which is not very aesthetic, I would like to have the whole cell in a different colour, not only the part behind the text. Here is the code part: <DataGridTextColumn Binding="{Binding Path...

How to: RadioButton in custom DataGridColumn ItemRenderer in AS3

I have a datagrid that I want to add a column of radio button using AS3 (instead of mxml). I was able to do this with a custom itemRenderer. var dgc:DataGridColumn = new DataGridColumn(); dgc.itemRenderer = new ClassFactory(com.mypackage.RadioBtnColumnItemRenderer); In my RadioBtnColumnItemRenderer.mxml, I have a box with a radioButt...

Building a datagrid to show different tables depending on Request.QueryString

So, I have a control with a datagrid in it and I was wondering if depending on the value I get back from the a Request.QueryString if I could set the table name to that (that is the value being sent) and then have it build the columns? I have about 3 different tables, and they have different amounts of columns, and of course with differ...

Add effects to datagrid invalidate

Is it possible to add an effect to a datagrid when I call invalidatelist to update the data? If it can be done, can the effects be selectively applied to only certain cells in the grid? The grid is showing an array with some nested array in it. I'm using an int counter to keep track of the nested array element position. When the coun...

Adobe Flex Datagrid: addEventListener MouseEvent.CLICK

I have a datagrid with a custom label itemrenderer (basically it makes the label look like a traditional html hyperlink). <mx:DataGridColumn id="itemId"> <mx:itemRenderer> <mx:Component> <controls3:HyperlinkLabel text="{data.doc}" /> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> The above works perfec...

Flex, How do I disable an itemEditor when the datagrid is disabled?

I have a Flex datagrid with a combo box as an itemRender on one column and the renderIsEditor set to true.. When I disable the datagrid, the combo boxes are still enabled and can receive input and change their values. How can I disable the combo boxes at teh same time the datagrid is disabled? Thanks. ...

Silverlight DataGrid changes between version 3 and 4

Hi Does anyone have a list of changes from Silverlight 3 DataGrid to Silverlight 4 DataGrid? Best Regards, Jesper ...

Inject Rows into Silverlight DataGrid

Does anyone know of a way to inject rows into a Silverlight DataGrid? I need a way to add totals rows after every 6 entries. The totals are for all rows above the summary row, not just the previous six. I've tried doing it with grouping but that only shows the totals for the group and displays the totals rows above the actual rows. I...

updating/refereshing dojo datagrid with new store value on combobox value changes

hey all, I have a combo box and a datagrid in my page. when the user changes the combo box value i have to update the grid with children details of newly selected parent. How can I achieve this using Dojo combo box and datagrid. the following code snippet not working for me. when I use setStore method on the grid with new json data. <...

Hang during databinding of large amount of data to WPF DataGrid

Im using WPFToolkit datagrid control and do the binding in such way: <WpfToolkit:DataGrid x:Name="dgGeneral" SelectionMode="Single" SelectionUnit="FullRow" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDele...

Dynamically specify and change a Silverlight DataGrid's columns during runtime (MVVM)

What's the best method of dynamically specifying DataGrid columns in the Silverlight DataGrid control at runtime following the MVVM pattern? What I'd like to do would be bind the "DataGrid.Columns" property to a property in my ViewModel so that, if the user adds/removes columns, I simply update the ViewModel property and the DataGrid wo...

Grouping in datagrid - rows not getting displayed

Hello, I have to group the data int the datagrid. I have done following for that: Have added the style to resources as: > <Style x:Key="GroupHeaderStyle" > TargetType="{x:Type GroupItem}"> > <Setter Property="Template"> > <Setter.Value> > <ControlTemplate TargetType="{x:Type GroupItem}"> > ...

Silverlight DataGrid Navigation and Hidden Rows

I have a scenario where I want to show hierarchical data in a DataGrid in Silverlight 3 while having the header rows still have the standard set of cells and being editable. The user needs to be able to collapse and expand rows to hide child rows. I've accomplished this by having a button on each parent row that looks like either a coll...

in wpf datagrid can I update a cell value in a row as i type in another cell in another row?

in a wpf datagrid, if we have 2 rows. and each have 2 columns ... in the following format A, B, C, D are text columns row1: A B row2: C D when ever i type value in A, I want to change value in D and continue typing in A Thank you in advance for your ideas ...