For my WPF Toolkit DataGrid I use the following custom column header style:
<Style x:Name="ColumnStyle" x:Key="ColumnHeaderStyle" TargetType="my:DataGridColumnHeader">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"...
Perhaps it would be better if I explained why I need to do this.
This is not the true example, but in my working solution, the user will start with a relation group like this:
Apple -> Red
Banana -> Yellow
In the app, in different screens (e.g. Add fruit and add color) they have the power to add new fruits/colors. They then need to li...
Hi,
I'm something of a WPF noob so please take it easy on me ;-)
I am trying to create a grouped DataGrid (WPF toolkit version).
I have successfully created the data source, the DataGrid itself, the required CollectionViewSource and the Style for the group header (which uses an expander).
I want to group by a property called 'Assign...
Hi,
Please help me, Im trying to get the value of Cell[0] from the selected row in a SelectionChangedEvent.
I am only managing to get lots of different Microsoft.Windows.Controls and am hoping im missing something daft.
Hoping I can get some help from here...
private void datagrid_SelectionChanged(object sender, SelectionChangedE...
Here is my scenario... I am prototyping in SketchFlow so I create an Xml file for my dummy data and then databind that to a data grid. I then want to setup some things like widths and header text instead of using all autogenerated details.
So here is the question... Is there an easy way to convert the Autogenerated columns into Xaml so...
Hi everybody,
I have a question I came up with 3 days ago about how to do the blue underlining of a datagrid row programmatically. I thought to have found the solution, with just adding the column and row Indexes to the datagrids editedItemPosition Property.
It turned out, that this is just practical if you want to be able to edit the ...
I am trying to extend the flex datagrid component so that I can have an "add new row" row like MS Access but I can't get it to work. I have tried a few different methods but I can't get anything to actually work.
By extend I really mean alter the Adobe code as some of the private vars I needed to do something else but I should be able t...
I have a question about data binding DataGrid in WPF. I am using the VS 2010 Beta 2 which has its own DataGrid, not the Toolkit one, although I think it is pretty much the same.
I want to bind to a dataset which has 52 columns, one for every week of the year. For this reason I want to bind the data dynamically rather than specifying eac...
Hello,
I want to use LoadingRowGroup event in SilverLight DataGrid to display a group summary.
I have an event:
void dataGrid1_LoadingRowGroup(object sender, DataGridRowGroupHeaderEventArgs e)
{
// e.RowGroupHeader
}
but I don't know how to use e.RowGroupHeader to set group header value. Maybe I should us...
I have an AJAX accordion from the ajax control toolkit on a page with a datagrid inside on of the panels. I have a custom itemtemplate for the one column to create a multiline textbox when I click edit on the row. When I click update on the row, the original content of the textbox gets rendered into the textbox. It is supposed to upda...
I have a simple datagrid that is importing an xml file. I have an edit button at the end of each row, when clicked it brings up an editable form with that rows information in it. I am using event listeners to pass the information back to the main datagrid. The only think i don't understand is, how do you update the datafield values in t...
I have simple mxml code
<mx:DataGrid id="DGG"
editable="true">
<mx:dataProvider>
<mx:Object scheduledDate="4/1/2006"/>
</mx:dataProvider>
</mx:DataGrid>
<mx:Button id="SetBut"
label="Set Array as Data Provider"
click="SetDP(); AddBut.visible = true;"
x="100.5"
y="1...
I am trying to use a DataGrid with hidden group row headers (so that there is a sort boundary). My style simply sets the visibility to collapsed (and I also am setting the SublevelIndent to 0 during the LoadingGroup event). Initial display is exactly what I want, but the data grid is sorted the appearance is unstyled, and the default ...
Is it possible to scroll to a particular row (by object identity) in a Silverlight DataGrid that has an ItemsSource which is a PagedCollectionView.
I am loading a list of orders that are grouped by day/status etc. I need to be able to scroll to a particular order.
var pcv = new PagedCollectionView(e.Result.Orders);
gridOrders.ItemsSo...
I have a datagrid that is bound to some data fetched via a webservice request.
Is possible to autofit the column widths to the data within them?
...
I have a datagrid in my c# windows application and my code is
private void BindGrid(SmsPdu pdu)
{
DataRow dr=dt.NewRow();
SmsDeliverPdu data = (SmsDeliverPdu)pdu;
dr[0]=data.OriginatingAddress.ToString();
dr[1]=data.SCTimestamp.ToString();
dr[2]=data.UserDataText;
dt.Rows.Add(dr);
dataGrid1.DataSource=dt;
}
An...
I ve created columns of my datagrid using this,
private void Receive_Load(object sender, System.EventArgs e)
{
dt.Columns.Add("Sender",typeof(string));
dt.Columns.Add("Time",typeof(string));
dt.Columns.Add("Message",typeof(string));
}
How can i dynamically assign a column width to a winforms datagri...
hai
how can we Adjust the column widths based on the displayed values in a datagrid in c# windows application?.
...
MSDN says, The DataGridView control is a new control that replaces the DataGrid control in .NET Framework 3.5.
In any project in VS2008, there is no datagrid control listed in the tool box and only gridview control is present. The MSDN page also describes all the features that gridview provides and datagrid doesnt - Can anyone tell me i...
I have a application where user can set the datagrid header background color in runtime. How can I do this? I tried the same through the following code but it is throwing exception.I have used binding and but it's not working.
var style = this.Resources["DataGridHeaderStyle"] as Style;
style.Setters.SetValue(DataGridColumnHeader.Backgro...