datagrid

Custom paging in ASP.net datagrid

Hey, I was wondering if it is possible to create a new page in the databind process. I need pages that a different sizes. A new page should be created each time a particular object is bound. If not, I would def be open to some suggestions on a way to attack this issue. Thanks! Edit: I am trying to add paging to my datagrid. This datagr...

Lookup Edit Column for DataGrid in Silverlight/Wpf?

Hi In windows app and also any data-Grid's Component, released for windows app, kind of column exist. That "Column-type" use for tables have relation(foreign_key) with another table and load one column from master table (have primary_key) Instead of itself (foreign_key)! So I want do same thing for data-grid in the silver-light and wpf.....

Bind a Silverlight Datagrid to Excel XML FIle

Hi, I am trying to pull the data from an Excel File that has been saved as XML and bind it to a Silverlight DataGrid. I am following a tutorial that I found on the web, but I cannot get the desired results. using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using...

asp.net datagrid custom paging with pages of various sizes.

I am trying to add paging to my datagrid. This datagrid stores hierarchical data. So the top row has several children rows that need to go beneath it. When a new top row type is going to be added I want to make a new page. This way all related rows will be displayed on the same page. So, I think the tricky part might be making pages with...

wordWrap="true" does not work in Flex Datagrid

in Flex Datagrid, I need to support line wrap function in one column. In theory I need to set wordWrap="true" and variableRowHeight="true". It works well. But the problem is that if in the cloumn I set itemRenderer="lc.monitoring.logviewer.components.CustomColumnRenderer" properties, then the line wrap funciton does not take effect. It...

Winforms DataGrid with bound ComboBox column - How to sort by DisplayMember?

Scenario: Winforms DataGrid control in which one of the columns is a comboBox control (NB: not datagridview). The DataSource for the DataGrid is a dataView, with essentially two ID fields, lets say OrderID, CurrencyID; i show the CurrencyName in the combo and grid, but store the CurrencyID. So, the DisplayMember for the combobox is Curr...

Multiple update of values in a row in a Flex DataGrid or AdvancedDatagrid

How can i update multiple cells of the same row changing the value of a single cell of the same row ?? Example: id, height, weight, fat percentage, corporal mass. When i change one of the values in a row (except id of course) the corporal mass cell value must change using a formula like: (height/weight2)*fat percentage*100. Is this pos...

How to group checkboxes to restrict selection to a single option?

I'm trying to set up two check box's in a DataGrid so that only one can be checked at any one time. At the moment, the following renders the existing state of the choice on screen: <asp:TemplateColumn HeaderText="Choice One"> <ItemTemplate> <asp:CheckBox ID="CheckBoxChoiceOne" CommandArgument='<%# Dat...

How to get orginal data back after it has been databound?

I've databound some data to a datagrid and I'm wanting to be able to get the original data back. I've databound the data as follows in one section of my code. IEnumerable<MyClass> myClasses = GetMyClassesFromDatabase(); DataGridForMyClass.DataSource = myClasses; DataGridForMyClass.DataBind(); When I've clicked a button, I want to be ...

C# Winforms Dictionary DataGrid Binding Auto-Refresh Without Losing Focus

Setup C# WinForms Application. Summary Binding a dictionary to a datagridview. Updating the dictionary automatically updates the datagrid. The datagrid does not lose focus when the update happens. The binding works both ways (editing values in the grid updates the dictionary. Scenario I have a class that calculates values based...

Silverlight DataGrid with grouping - row leading space

I've a simple Silverlight DataGrid bound to a PagedCollectionView that has a group description. Grouping works fine. What I want to do is remove the leading space on each grid row that is blank and have the actual cell content (it's just a one column grid) fill the entire row. I can't for the life of me find out how to do that. Just to...

WPF4 DataGridComboBoxColumn doesn't work

Look how odd is the following scenario: <DataGrid.Columns> <!--Doesn't work--> <DataGridComboBoxColumn Header="Vendor" ItemsSource="{Binding Vendors}" SelectedItemBinding="{Binding Vendor, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="Contact.Title"/> <!--Works--> <DataGridTemplateColumn Header=...

How to make a Wpf datagrid cell numeric only ...

Is there an easy way in the xaml for a form (e.g. like a xaml attribute that I can place on a DataGridTextColumn) to force a datagrid cell to be numeric only? ...

Silverlight Datagrid - image in template cell shown only after scroll out/in view

Hi, I have a SL4 DataGrid with one template column. The column template contains an image (source points to an resource inside the xap) and a textblock. The image source is set using a binding to the view-model + a value converter that converts to a valid path to the image. For most rows it works, however for one row the image is not v...

Binding the ItemsSource for a WPF DataGridComboBox Column

Question: Most code samples on the DataGridComboBox seem to use a static resource as the ItemsSource. In my use case, I'd like to provide different ItemsSources with each bound object. Can this be done? Background: I'm trying to bind a collection of Question class objects to a WPF DataGrid, using a DataGridComboBoxColumn control. The...

Flex DataGrid itemrollover doesn't fire

Hey all, I am using a datagrid with some custom itemrenderers. I am trying to save the last cell (row and column index) the mouse was over when the context menu was opened. I am trying do this with the itemrollover but it doesn't seem to fire when I roll over my custom itemrenderers when I enter them from within the datagrid region. ...

Make cells in datagridTextColumn text columns appear as hyperlinks

I'm looking for the simplest way to make text in the cells of a dataGridTextColumn appear as hyperlinks, ie; blue, underlined. Any ideas? ...

WPF DataGrid Row add in codebehind

Hi I am from VB.Net WinForms comming. Now I wanted to write a small app in WPF, listing some files in a datagridview. I used WPF's DataGrid, created some Columns. And then failed to add my rows. Please, can you help me to select the right way to get my filenames, state-text and thumbnails added to the DataGrid Row? In VB.Net WinForms...

WPF Data-Bound Datagrid Filtering / Searching

Hi guys, I have a WPF application which uses a (currently) local database to act as a binding source. Using the Visual Studio 2010 tools I have a LINQ-SQL model which acts as the Datacontext for most forms. What I have is a UserControl with a TextBox and Datagrid. The datagrid ItemSource is set upon the UserControl.Loaded event with a ...

DataGrid to Excel. Saving entire page instead

Ok so I am trying to export the contents of DataGrid control to an excel file. Here is my code: Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/ms-excel"; Response.AppendHeader("content-disposition", "inline; filename=Report.csv"); Response.TransmitFile(Server.MapPath("~/GridData...