datagrid

Resizing font in WPF list or grid to use space properly

I have an application that displays league tables for sporting leagues. These tables are basically grids with different columns representing statistics for each team such as matches played, won, lost, goals scored and concieved etc. As such, a league table has one interesting property: For a given competition, we always have the same amo...

WPF DataGrid Button Column Disable

Is it possible to disable a button in a DataGridTemplateColumn? I have a DataGridTemplate as follows: <toolkit:DataGridTemplateColumn Header="Timer" Width="50"> <toolkit:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Content="Start" Click="Button_Click...

NHibernate - 12 Months / 1 Year and DataBinding

What is the best way to handle this I have an application where I constantly have to "pivot" 12 month records into one year record/object to be able to display a single year per row in a DataGrid. I have been doing this work up until this point in DataSets with some ugly T-SQL to get the pivot to happen. I'm upgrading this application t...

ASP.NET DataGrid control disable - why doesn't this code work?

I have a DataGrid in ASP.NET 2.0 with the following column in it: <ASP:TEMPLATECOLUMN> <ItemStyle HorizontalAlign="Right"></ItemStyle> <ItemTemplate> <asp:HyperLink id="HyperLink1" runat="server" CssClass="DataGridCommand" Target="_blank" NavigateUrl='<%# GetPreviewURL(DataBinder.Eval(Containe...

flex: Save an editable datagrid via a cfc

Hi I have an editable datagrid which i need to be able to save with other form fields via a cfc in coldfusion. Basically the aim is that there are a number of locations retrieved via an RO which make up the first column the remaining columns are types of data i.e. demographics, client notes, appointments etc, the idea is that the user...

How to manually add data to a DataGrid in Silverlight

I have found that datagrid columns can be dynamically created and bound in Silverlight. However I can't find a way to bind data to those columns. If I try to bind any type of object with AutoGenerateColumns = true, then the names of each property of the object get added as columns and the object information is displayed in the grid in a...

Using WPFToolKit's DataGridHyperlinkColumn

I'm using WPFToolkit's Datagrid control. I can populate the datagrid, but I'm having trouble with the DataGridHyperlinkColumn. I would like it to visually display the link as the Person's name, but for the link to go to whatever UriLink's value is. How can I do this? What am I doing wrong? Xaml: <dg:DataGridHyperlinkColumn Header...

Display Data from an Access Database in WPF Datagrid

Right, this has been bugging me for a good few days now and I'm getting nowhere. I think I need ot start it again from the begining. Basically I'm doing a project at school which requires me to store and manipluate data in an Access database (Office 2007 format, accdb). I'm using WPF with VB to do this, and I'm using the datagrid from th...

Stop Scrolling Outside DataGrid

How can i stop the grid from scrolling while i am dragging outside the DataGrid component. ...

Wpf Toolkit. Bind DataGrid Column Header to DynamicResource

I'm trying to bind DataColumn Header to DynamicResource using following code. <Window.Resources> <sys:String x:Key="HeaderText">Header Text</sys:String> </Window.Resources> <Grid> <tk:DataGrid> <tk:DataGrid.Columns> <tk:DataGridTextColumn Header="{DynamicResource HeaderText}" Width="100"/> </tk:DataGr...

ColSpan for Silverlight Datagrid

Hello Experts I have a need to customize a Datagrid, for a TimeManagement system, using rowspawns. My desired look is something like: Customers| Projects | Tasks | Moanday | Tuesday | Wednesday | Thursday | Friday | | | Task 1 | 0 | 0 | 0 | 0 | 0 | Customer1| Project 1 | Task 2 | 0...

WPF Datagrid - Check Visible Rows

I have a wpf datagrid (the one from the wpf toolkit), which when there are too many rows to view on the screen it gets a vertical scroll bar. What I would like to know is if there is a way to know what the top visible row is when the user is scrolling. Ideally I would like to be able to wire up to an event to know when the user is scro...

SilverLight Datagrid

I am building a timemanagement system, where im using a Datagrid to list tasks / days, so you can register how much time you spend on a given task on a given day. What i would like, is to do a summary at the bottom of each day. | Tasks | Moanday | Tuesday | Wednesday | Thursday | Friday | | Task 1 | 1 | 1 | 0 | ...

ASP.NET DataGrid - DropDownLists in separate rows?

I have a Datagrid with 3 DropDownLists in it. Although it is a DataGrid it will really only have two rows. I am populating the BoundColumns using a DataTable in my code. Normally this is not a problem to setup and create the two rows, hold the two rows of values and retrieve them later. But as it turns out, I have to have different list...

C# Windows Mobile datagrid data

I have a datagrid that has two columns. The DataSource for the datagrid is "myTable" which is a DataTable. All I am trying to do is add a row to the DataTable and have the new row be displayed in the datagrid. Here is the simple code I wrote to add the item to the DataTable: DataRow dRow = myTable.NewRow(); dRow.ItemArray.SetValue("t...

Datagrid Paging : Invalid CurrentPageIndex value. It must be >= 0

I have a datagrid with paging enabled. I am displaying the results in datagrid based on a filtering condition. I have filtered the data and it has now 2 pages. when i go to 2 nd page. and i am doing the seacrhing function once again to narrow down the results. Then I am getting an error like "Invalid CurrentPageIndex value. It must be >=...

WPF Datagrid zoom issue

I'm working with the WPF DataGrid from the WPFToolkit and I'm having issues with trying to zoom the entire datagrid. My initial thought was that it was going to be really easy and I would just apply a scale transform to the grid and animate the ScaleX, ScaleY properties when the used clicked a button. This did not work however because ...

Reference Access database dataset.designer file in WPF?

Hey, I've included an MS Access database in my WPF VB app, and I'm trying to link the data to an XCEED Datagrid. I have the following code in my testerDataSet.Designer.vb file which I assume is the funcion I should be referencing Public ReadOnly Property Contact() As ContactDataTable Get Return Me.tableContact End Get En...

Why isn't my WPF Datagrid showing data?

This walkthrough says you can create a WPF datagrid in one line but doesn't give a full example. So I created an example using a generic list and connected it to the WPF datagrid, but it doesn't show any data. What do I need to change on the code below to get it to show data in the datagrid? ANSWER: This code works now: XAML: <Wind...

how can I enable scrollbars on the WPF Datagrid?

When I run the following Northwind WPF Toolkit Datagrid code from this article, I get a datagrid, but there are no scrollbars and hence the user can only see part of the datagrid. I am using the newest version March 2009. What do I need to specify so that the WPF Datagrid has scrollbars? I tried putting the datagrid in a ScrollViewer ...