datagrid

How to Query and count an Employees table and Project table in one linq query in silverlight?

I have two tables an employee table and a project table and I am looking to bring back a count of the number of employees assigned to each project. In the employee table I have employeeIDs and projectIDs, and in the projects table I have projectID, name, department, notes, etc. I am looking to bring back the following information and d...

How to refresh a WPF DataGrid?

I have a WPF DataGrid with some data. You can add rows through a separate window. The DataContext is the same, a LINQ-to-SQL object. Binding is also the same, I bind the "ItemsSource" property to a table. In the other window, when the user clicks on "Save", I create a row programatically and add it using "InsertOnSubmit". After that I u...

Does anyone have code examples of the WPF Datagrid working in a MVVM pattern?

I got the following example of a WPF DataGrid bound to a ViewModel in a MVVM pattern, but it is read-only: MVVM example which has buttons that switch the data in the ViewModel I tried to extend it so that the DataGrid was bound to an observable collection of ViewModels so that editing cells would fire OnPropertyChanged events on the ap...

Ultragrid/Winforms Grid Hierarchy problem

I need to create a winforms grid with 3 levels, using infragistics ultragrid. Level 1 has 2 columns (Fixed) ---> Level 2 has 3 columns (Fixed) --------> Level 3 has Infinite no of columns (Dynamic based on type of level 2 item) example Level 1 Item 1 --> 3 Columns (Fixed) Level 1 Item 1 --> Level 2 item 1 --> 3 Columns (Fixed) Lev...

Encapsulating and customizing a third party WPF control

I'm interested in customizing a 3rd party control, such as Telerik's RadGridView, as a standalone control, for example adding New Row and Delete Row buttons above the grid, yet still supporting XAML manipulation of the internals of the control by the window upon which my control exists (i.e. for the window to add its own style to a colum...

C# Removing rows from a datagrid where a cell value is not NULL using LIKE

Hi all, My code is below, the code works fine when the strFilterText has a value but if the string is empty then it filters the rows that have no value which are the ones I want to show, for example if strFilterText contains "shoes" then the datagrid shows all the rows that contain "shoes" but if I want to find rows that have no categor...

Flex(DataGrid), How to change the visible state of certain cell while mouse over the row

I have three columns and the default visible state of last column is false.My problem is how can I change the visible state of the certain cell while the mouse over any part of the row. English is not my native language,so if I didn't make my question clearly enough ,Please keep read. ------------------------------------------------ |...

How to break page and repeat header after 20 records while printing data grid data in asp.net

i want to print a web page using datagrid to show data. i prints data but does not repeat header in next page . i want to get header repeated in each page . how can i do it in datagrid . i can it using style break in table head but cann't in datagrid. plz help ...

Why does DataGrid call Linq query when scrolling?

I am just getting started with Linq, WPF and Silverlight. I am trying to display data which originates from a XML document in a DataGrid. I use a Linq query to select the objects I want and link the result to the DataGrid. XDocument doc = GedView.GedcomConverter.ConvertToXml(new StreamReader(e.Result)); var query = from person in doc.D...

C# Why is this loop so slow?

I have inherited some code that applies a filter to a datagrid, the filter works for but is incredibly slow when there are 500+ rows in the datagrid (it hangs with over 500, works fine with 100 rows), the filter basically says "show me everyone who has paid" or "show me everyone in X country" etc. The list of rows that match the filter ...

datagridview refresh

hello to all here is my question i have a win app withe two forms -form1 shows a datagridciew which shows tha data of a tabvle -Form2 has some textboxes and a save buttton that save the data in the table (insert, update) so,i want when i click tha save button of form2 ,the datagrid of form1 to be refreshed with the the new datas th...

WPF DataGrid sort by ComboBox field

I have WPF datagrid with combox column (ID is real value, Desc is displayed value) and when I click on header of that column automatically sorts by real value (ID). I want to sort by displayed value. My WPF datagrid has 4 columns: IdPerson, DescSchool, IdSchool and School. Column "School" is comboBox with this values:ItemSource = schoo...

display images in datagrid with Compact Framework

is it possible to display an image in a datagrid cell? i'm currently working with compact framework 3.5. any tips on that? ...

What are the recommended datagrids for asp.net mvc?

I have looked at a few data grids for an asp.net mvc app I am developing. I would like to get some opinions on the different datagrids for asp.net mvc. I would like to know the pros/cons with the data grid, if you care to share. ...

Rebinding to WPF Datagrid's Datacontext

I can't believe I am stumped with this fairly straightforward thing. I originally posted this in the WPF datagrid codeplex discussions but got no response. So I am trying here: I can't seem to find a way to do this. I create a datagrid whose datacontext is initially filled with rows from a table. I have implemented a search function...

Inserting a new entry to Datagrid (WPFToolkit) with Linq-Query doesn't work

I am filtering the list of entries from my DataContext with a Linq-statement. After that I assign them to the the ItemsSource-property of the DataGrid available in the WPFToolkit. The available entries are being shown, but for some reason I am not able to insert a new row into the Datagrid. Surprisingly it all works fine if do not use t...

Silverlight DataGridTextColumn Binding Visibility

Following my earlier post I am now trying now to bind the visibility of DataGridColumns to a VM notification property. MSDN suggests I should be able to do this with ease. I already have a value convertor and VM notification property that I know works (I have tested these on another element on my page: <CheckBox x:Name="chkAllTeams" Vi...

Checkin Related Checkbox In The Nested Datagrid

I have a nested datagrid seen below. When I click lnkSec, I want checkboxes of dgrIslem datagrid to be checked. How can I do it with javascript or Jquery? <asp:datagrid id="dgrMenu" runat="server" Width="100%" GridLines="Horizontal" ShowHeader="False" Height="8px" BorderWidth="1px" BorderColor="Gainsboro" CellPadding="0" AutoGenerateC...

Using Datagrid within RowDetailsTemplate of another Datagrid

I would like to use a DataGrid within the RowDetailsTempalte of another Datagrid. This inner Datagrid should have its columns bound to a property of the current object in the outer Datagrid. For example, if the outer Datagrid is displaying all contacts by first name and last name, if I select a row I should be able to see another Datag...

Adding rows to wpf datagrid

Hi all, I need to select a set of rows from one wpf toolkit datagrid and want to add it in another wpf toolkit datagrid. The code I used is as follows: foreach(DataRowView row in MyFirstDataGrid.SelectedItems) { MySecondDataGrid.Items.Add(row); } But the problem here is, it just adds empty rows in the second datagrid without any co...