datagrid

WPF DataGrid Hide selected row ?

Hi, Is there a way to "hide" the SelectedItem of the DataGrid ? dataGrid.SelectedItem.Visibility = Visibility.Hidden ??? Regards, MadSeb ...

WPF SelectedItem and Scrolling

Hi, I have a WPF DataGrid. The DataGrid is bound to an IList. The list has many many items so the DataGrid MaxHeight is set to a predefined value and the DataGrid automatically displays a scroll bar. The selection mode and unit are set to "single full row". The form has a button called "New" that adds an item to the list that the data...

easiest way to make only one column sortable

I have a datagrid with sorting. I set enable sorting to true, but that makes every column sortable. Is there a simple way to make it so that only one column header can be clicked for sorting? I feel like there should be a simple and quick fix for this, but who knows. some code: <asp:GridView ID="ProductsGrid" runat="server" ...

Binding to DataContext outside current ItemsSource context

Hello, I have a DataSet bound to the Window.DataContext; I also have a DataGrid <DataGrid ItemsSource={Binding Tables[Items]}> <DataGrid.Columns> <DataGridTextBoxColumn Header={Binding Path=DataContext.Tables[Names]/Test, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}} /> </DataGrid.Columns> <...

How to access DataTemplate in ResouceDictionary of UserControl

I have a resource dictionary as follows defined in my UserControl: <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="../ParameterEditorResourceDictionary.xaml"></ResourceDictionary> <ResourceDictionary> <DataTemplate x:Key...

How do i embed a flex grid control in an asp page and pass parameters to the gridcontrol?

I have done a datagrid in flex and would like to embed it in an asp page. How do i go about that?Thank you. ...

Silverlight 4 Parent Child Info in dataGrid and RowDetailsTemplate

Hi All, I have three tables in my db, One Parent (Product) and two childs(ProductStyles, ProductSizes) which means that a Product can have multiple Styles and Sizes. Now What I want to do is:- 1) Shows the Products in dataGrid with having the columns Styles and Sizes and these columns should only display the Total Counts (ie how many st...

datagrid is larger than usercontrol

Hi, My Mainpage has a menu that loads usercontrols into a Stackpannel. I've got several usercontrols and some of them have a datagrid. But when I bind a large collection to the datagrid, the datagrid gets much larger than the usercontrol. How can I set the max width/height of the grid to the size of the usercontrol. It seems that the us...

How can I define DataGrid's rows declaratively in XAML?

I have this code and I need to bind second and third cells in rows to different properties. Sorry for my bad english. <DataGrid AutoGenerateColumns="False" HorizontalAlignment="Stretch" Name="measureDataGrid" VerticalAlignment="Stretch"> <DataGrid.Columns> ...

How to add data to DataGridView

I'm having a Structure like X={ID="1", Name="XX", ID="2", Name="YY" }; How to dump this data to a DataGridView of two columns The gridView is like ID | Name Can we use LINQ to do this. I'm new to DataGridView Pleaese help me to do this.. Thanks in advance ...

Filtering data at datagrid wpf

I bind a dataset to a datagrid wpf like this DataSet d = Database.getBabies(); babies = d.Tables[0].DefaultView; dataGridBabies.ItemsSource=babies; Which is the best way to filter the data?(without running database query) ...

How do you show a tooltip for a DataGridComboBoxColumn?

I want to show a tool tip for the element style (the non-editing mode) of a DataGridComboBoxColumn. I have not been able to figure out a good way of doing this. In the example below I can either show a tooltip, or allow edits to the cell by changing the IsHitTestVisible property to true or false. I have been unable to both show the to...

Do a Master-Detail scenario with a DataGrid and TextBox`s beside, how to bind to multiple selections?

My user can Select multiple Orders in a OrderDataGrid from a selected customer. When the user selected the OrderId + Ordername in the DataGrid all Order details must be filled in the TextBoxes righthand of the Order datagrid. The problem I have is how can I bind always to the first element of the selected orders? At the moment the Text...

WPF validation 'before' setting value or issuing command

Greetings, I am relatively new to WPF and have an issue relating to validation with DataGrid control. I have read this article (http://msdn.microsoft.com/en-us/magazine/ff714593.aspx) which covers three different ways to validate, but none of them seem to address how to prevent setting a value or calling a undo/redo command before all v...

Unable to get DataGrid working with ObservableCollection

Everything compiles, but at run time a blank row is displayed. If I try to edit an entry, it says "No XPath set". What am I doing wrong? I tried a ton of variations, not having the INotifyPropertyChanged interface etc. The base class is: public class Variable : INotifyPropertyChanged { public string Name; public st...

Copy one datagrid 2 columns to another datagrid

Copy one datagrid 2 columns to another datagrid in C# ...

How do I use a WPF DataGrid with multiple types with different properties?

Hi, I can easily get the official DataGrid for WPF to work using an ObservableCollection of objects defined like this: public class Customer : INotifyPropertyChanged { public Customer(int ID, String name) { this.ID = ID; this.name = name; } public string name { get; set; } public int ID { get; se...

Silverlight, Caliburn, Actions and DataGrids

Anyone know of good code examples of the Caliburn or Caliburn Micro framework example that illustrate routing Actions with DataGrid items? ...

Flex 4 Drag-n-Drop with custom DragProxy

Hi, I'm doing the drag an drop of an ItemRenderer manually (DataGrid) and want to know how to generate a custom DragProxy of a component that hasn't been added to the display list. I tried something like this but didn't work: private function doDrag(event:MouseEvent):void { var dragSource:DragSource = new DragSource(); d...

Is there any live mxml mx:datagrid full text search example\tutorial?

So I have in my RIA a mx:DataGrid connected to some web service from which it obtains data (Dataprovider). I have a simple text fild. I want to on text in text field change to see in my table only lines containing inputed text in some part of any word in any column. how to do such thing? ...