datagrid

Silverlight datagrid row edit mode

I have a silverlight datagrid with a single editable column. This column has a combo box. To open the combo i have to click on the cell three times. Once to select the row, once to enter edit mode, and once to open the combo. IMHO this is really bad UX so I would like the row to enter edit mode when the user does a row click or mouse...

On what events does headerRenderer in a DataGrid get called?

I want to know on what events does headerRenderer in a DataGrid get called? I have created one component for headerRenderer of one DataGrid column. It seems that it gets called at least 3-4 times before the dataGrid is shown. After it is shown it also gets called quite often...so what can I do to make it be called just once for example. ...

Set the dataGridColumn's ItemRenderer dynamically

I have this DataGrid: <mx:DataGrid id="myDataGrid"> <mx:columns> <mx:DataGridColumn dataField="colA" headerText="Column A:" width="40" headerRenderer="path.customComponents.VerticalHeader" itemRenderer="path.customComponents.CustomDataGridItemRenderer" /> </mx:Columns> </mx:DataGrid> Only I don'...

How to data bind DataGrid component without scrolling up?

I have a DataGrid component that I would like to update every 5 seconds. As rows are being added to this DataGrid I noticed that every update causes it to reset the scroll bar position to the top. How can I manage to keep the scroll bar at its previous position? ...

xamDataGrid and Combobox (how to access cbx?)

Hello Experts, I am using a xamDataGrid (Infragistics), one Column has to contain a combobox. The items in the combobox are computed, based on the data entered in teh cells before. How can I access the combox in the ActiveRow ? Thats the XAML: ...

Flex: Scrolling in datagrids

Hi! I have 2 questions about flex datagrids: How can I scroll it automatically to the bottom when new portion of data arrived to it (e.g. I added new items) Strange, but seems it doesn't scroll when I use scrolling wheel, is there any trick about it (especially for mac Users) Thanks in advance Some changes: public function scro...

Binding a WPFToolkit DataGrid's event to a ModelView's Command (MVVM)

Hello, In particular I would like to know how to bind the 'SelectionChanged' event of the dataGrid to a Command on my Viewmodel. Since DataGrid doesnt have a Command property, how do I call a modelView command as in MVVM fashion? I dont mind using a delegate on the code behind XAML, if I knew how to do that... Since I am new to WPF I ...

How to export a DataGridView to Excel format in VB.NET

I'm using OLE to connect to a database using VB.NET, and show the results in a DataGridView. I want to export the data that is in the DataGridView to an Excel format file, i.e., the user can save the content of the DataGridView as MS Excel file. ...

Flex: Datagrid, break line in case of very long string

Hi, I am trying to implement simple chat application using flex. In it all my chat messages are stored as array collection items, where each item is a string (correspondent to one chat message). I am using datagrid to display all messages. One message goes to one cell of datagrid. Here how it looks: http://img.skitch.com/20091129-qt3g...

changing children of dynamic created states

I'm building an Xml-driven application. I create new states in a seperate actionscript-class. These states all contain a DataGrid. I can switch the states in the Main.mxml. But now I would like to access certain children of the DataGrid. In this case I would like to toggle the visibility of GridItems, from a Button in the Main.mxml. ...

Is it possible to display a message or default row in a Silverlight 3 Datagrid

I have a DataGrid which is bound to a PagedCollectionView and the underlying collection may contain no items. When this occurs the DataGrid does not render at all, no column headers or anything, and when the DataGrid is then re-bound to another PagedCollectionView that does contain some items it causes a system error System.ArgumentE...

Defining XML fields to be displayed in a datagrid through a dataset

The following code: DataSet ds = new DataSet; ds.ReadXml("c:\output\" + nome); GridView1.DataSource = ds; GridView1.DataBind(); succeeds in getting the fields from the XML, but as default it only displays the three first fields (this XML specially may have about 60 fields, of which i wish to gather 3 or 4 of them) how do i take off t...

Setting Silverlight DataGrid to just throw an exception when binding field does not exist

I just wasted invested a good chunk of time trying to determine why a specific datagrid among many was showing shrunken rows with no text. After many trial and errors attempts to figure out what made this grid special, I finally found that the class used for the row items was marked private. That is a perfectly good reason, but I would...

Putting dataset fields in textboxes

i have loaded an xml file to a dataset successfully (i can display it in a datagrid), i'd like to load it in several textboxes (about 10 or 12). the xml has about 60 fields, and i'm not that familiar with getting their names (though i know which ones i want). that's what i have: Dim ds As New DataSet ds.ReadXml(<PATH>) a glim...

wpf datagrid information (tips & tricks)

Hello Has anyone got any particular resources (links, books, whatever) that have helped them use the wpf DataGrid better? My goal is to wind up with a control that has two related but different data enterable DataGrids in it as well as a footer that totals the amounts of several columns. I'm encountering various challenges and am so fa...

wpf DataGridTextColumn refactoring

Hello I am using a DataGrid in a WPF app that has several (literally one for each day of the week) columns which differ only in their data index. A sample of the xaml is below. How can I refactor this into something more DRY? Cheers, Berryl SAMPLE XAML (two of seven columns): <dg:DataGridTextColumn Header="{Binding Source={Stat...

Datatable update in different thread (WPF)

Hi, I have a Datatable assigned to a DataGrid in main thread. I am updating the same DataTable from two different thread classes. Although the rows gets updated successfully in DataGrid control, I get following execption: NotSupportedException thrown, with the message saying 'This type of CollectionView does not support chan...

SilverLight - MVVM binding viewmodel property to datagrid column

In my SilverLight application, I have a property in my ViewModel called 'vmProperty' and a list called 'dgSource'. I bind my dgSource to the datagrid as ItemsSource at which point each datagrid row's datacontext changes to each item in dgSource. One of the columns, say a checkbox column, needs to bind to vmProperty. But since the ViewM...

Is there a way to autosize columns in DataGrid .NET Compact Framework

I want to autofit columns to the content in cells. Also i want to add my headers to columns. Is there a way to achieve autosize?(i saw that column headers can be set with DataGridTableStyle) ...

Silverlight 3 - How to "refresh" a DataGrid content?

I have the following scenery: 1 using System; 2 using System.Windows; 3 using System.Windows.Controls; 4 using System.Windows.Documents; 5 using System.Windows.Ink; 6 using System.Windows.Input; 7 using System.Windows.Media; 8 using System.Windows.Media.Animation; 9 using System.Windows.Shapes; 10 using Sys...