datagrid

WPF Datatrigger for DataGrid only changing the entire row

Hi, I've got a datagrid with a datatrigger set. When it's value is "UP" I'd like the trigger to only change the background in the 'directionColumn' datagridcolumn only. What i've got so far updates the entire row. I also tried placing 'targetname' in the setter element but that just gives an error. Please help Thanks the xaml: <...

binding EntitySet to DataGrid in WPF

hi there Whats the ideal way to bind a EntitySet to a DataGrid? I use VS2010 and the .NET 4.0 Framework. The item in the class bound to the DataContext of my form does have the following property: public EntitySet<MyObject> objectsToBind { get { return context.MyObjects; } set { context.MyObjects= value; } } Any help or hints gr...

how to get selected date on DateField Adobe Flex Datagrid ItemRenderer

Hi! I am trying to get the selected date on the datagrid. I used the itemrenderer to display the datefield on my datagrid. <mxataGridColumn dataField="dt" headerText="Date of Transaction" itemRenderer="mx.controls.DateField" rendererIsEditor="true" editorDataField="selectedDate"/> Thanks! ...

ASP.NET How to Set Datagrid CSS classes from Codebehind

I have a datagrid where i am setting CSS for ItemStyle,Header style and Alternating item style in .aspx page markup as follows <asp:DataGrid runat="server" ID="dgScannedEsn" AutoGenerateColumns="True" CssClass="gridCls" HeaderStyle-CssClass ="clsItemHeader" AlternatingItemStyle-CssClass ="clsAlternateItemRow"" ItemStyle-CssClass ="cls...

Unable to refresh/update data grid after insert in Silverlight 4

Hello, I am creating a master detials silverlight page and am having trouble updating the datagrid after inserting a new record. On the top of the page I have text boxes to enter information, when a user clicks on save I would like the information automatically updated in the database and displayed on the datagrid without refreshing th...

Summarizing rows in Silverlight DataGrid with CollectionViewGroup

Hi All, I have a PagedCollectionView and bound that with the result from a WebService. I have grouped the PagedCollectionView with a GroupProperty and the bound it to a DataGrid. Now I need to show Summarized total for each Group as a last item. Can anyone help me on how to do it using CollectionViewGroup. Thank you. ...

Binding the Result from a webservice to an ObservableCollection which to be bound to a DataGrid

Hi All, I'm getting a List as a result from my webservice. I need to bind it to an ObservableCollection and then bind the ObservableCollection to a DataGrid This is my coding. ObservableCollection<SubTotals> ds = new ObservableCollection<SubTotals>(e.Result); but I'm getting an error. Can anyone ple help me out. Thank you. ...

multiple grid layout wpf

I have a timesheet presentation which requires two grids, one for project (ie, billable) activities and one for all other activities. Each grid has a data entry column for every day of the week, as well as a Description column. The project section also requires the 1st column in the grid to display the Project Number. The totals for each...

Bind datagrid column to a collections index (Silverlight 4)

I have a datagrid bound to an ObservableCollection of objects. I want to show the index in the first column of the grid. There's numerous example on how to do this based on the LoadingRow event but I need my index to be dynamic - they can add items and remove items from the ObservableCollection so it's easiest if I can bind directly to t...

How to access a value based on siblings or parent in datagrid databinding

Sorry for the wordy title - I am battling to work out if my problems are caused by Bad class design (likely) Ignorance (very likely) Both (most likely) I have spent ages googling but due to not really understanding my problem it's harder to find the solution. Basically, I have a "Day" class which has an ObservableCollection of Perio...

How to get the number of items in Datagrid

I am using Datagrid control in flex. I need to get the count of number of items in that Datagrid. What is the method to get that? ...

Unreasonable WPF DataGrid Loading Time

I've always had long loading times with WPF DataGrids, and I cannot find any similar reports online, so I suspected that I was doing something wrong. Now I am sure of it, since adding layout complexity considerably slows down execution. In a very simple layout, the DataGrid populates instantaenously, whereas the code below takes around...

How to add a row hyperlink for an extJS Grid?

Can someone please throw some light on how to go about rendering an hyperlink in the cells of a particular column in ExtJS? I have tried binding the column to a render function in my JS, from which I send back the html: <a href="ControllerName/viewName">SELECT</a> However, with this, the problem is that, once I hit the controller thro...

wpf set sorting programmatically, so that the header is toggled as sorted

I have a problem in wpf toolkit datagrid. I have a Itemsource whit three columns: FirstName LastName Address in C# Codebehind i set the sort direction and wich column to sort on like this: ICollectionView view = CollectionViewSource.GetDefaultView(dataGrid1.ItemsSource); view.SortDescriptions.Clear(); view.SortDescriptions.Add(new S...

Flex AdavcedDatagrid Sorting is case-sensitive

I have several datagrids with changing columns. For the text fields the datagrid's sort function neems to be making a case sensitive compare. eg. the following list sorted would look like this apples strawberries Autos Autos should be with apples but since the capital A is counted differently all capital letters come after. I've fou...

How to reorder columns in a datagrid Dynamically?

I am using autogeneratecolumns ="false" and using some template fields. It works when I use: tempColumnNew = Me.DataGrid.Columns(oldColIndex) tempColumnOld = Me.DataGrid.Columns(newColIndex) Me.DataGrid.Columns.RemoveAt(oldColIndex) Me.DataGrid.Columns.RemoveAt(newColIndex) Me.DataGrid.Columns.AddAt(oldColIndex, tempColumnOld) Me.Dat...

Setting Boundfield.Datafield property to nested/linked table

Hi, I have a situation where I'd like to set a BoundField.DataField property to a nested table. The page is loading an nHibernate object (a HotSpot) which as a sub-object (a Link). The datasource for the grid in this case is the HotSpot object and I can bind to its properties without problem. However I need also to access some of the ...

Silverlight DataGrid TemplateColumn adding problem with ComboBox

I am in little trouble with this problem. I have made a DataGrid and it have DataTemplate Columns. here is the XAML for that <data:DataGrid x:Name="PortsGrid" Height="124" Margin="23,0,17,2" VerticalAlignment="Bottom" ItemsSource="{Binding PortsGridData, Mode=TwoWay}" AutoGenerateColumns="False" SelectionMode="Single"> <data:Dat...

ItemsSource data type displayed in DataGrid

Hello Stackies I'm using a DataGrid inside a StackPanel inside a Grid which causes the GridView to be wider than its preferred size. All the columns are displayed correctly but after the last column the end of the ItemsSource data type name is displayed. Apparently its is drawn in the background and hidden by the columns in the normal c...

What is the proper way to handle multiple datagrids in a tab control so that cells leave edit mode when the tabs are changed?

In wpf I setup a tab control that binds to a collection of objects each object has a data template with a data grid presenting the data. If I select a particular cell and put it into edit mode, leaving the grid by going to another tab this will cause the exception below to be thrown on returning the datagrid: 'DeferRefresh' is not allo...