datagrid

How can I determine if a DataGrid has been sorted or paged, prior to the events being triggered?

[亡魂溺海] 提交于 2020-01-17 04:16:09
问题 I have a DataGrid that has event handlers bound to SortCommand and PageIndexChanged. How can I determine if those event handlers are about to be called, say on page_load? These events will fire just fine after page_load, but I'd like to know at page_load if they are to be fired. 回答1: Request.Form["__EVENTTARGET"] and Request.Form["__EVENTARGUMENT"] will give the object causing the post back and the event argument. If the data grid does not cause the postback, then there is likely a value

How can I determine if a DataGrid has been sorted or paged, prior to the events being triggered?

此生再无相见时 提交于 2020-01-17 04:16:08
问题 I have a DataGrid that has event handlers bound to SortCommand and PageIndexChanged. How can I determine if those event handlers are about to be called, say on page_load? These events will fire just fine after page_load, but I'd like to know at page_load if they are to be fired. 回答1: Request.Form["__EVENTTARGET"] and Request.Form["__EVENTARGUMENT"] will give the object causing the post back and the event argument. If the data grid does not cause the postback, then there is likely a value

How to access ItemsSource property of a DataGrid defined in UserControl from main xaml file?

只谈情不闲聊 提交于 2020-01-17 00:37:17
问题 I have declared a DataGrid in UserControl. Now I have included the UserControl in my main xaml file. I am trying to set the ItemsSource property of DataGrid from main.xaml; but I am getting an error "The property ItemsSource doesnot exist in the namespace". I am able to set the other properties like Background,Foreground, etc. My UserControl has this : <wpfkit:DataGrid Name="DataGrid1" AutoGenerateColumns="True" Width="Auto"> </wpfkit:DataGrid> In main.xaml : <usercontrol:MultiStepProcessGrid

How to access ItemsSource property of a DataGrid defined in UserControl from main xaml file?

▼魔方 西西 提交于 2020-01-17 00:36:47
问题 I have declared a DataGrid in UserControl. Now I have included the UserControl in my main xaml file. I am trying to set the ItemsSource property of DataGrid from main.xaml; but I am getting an error "The property ItemsSource doesnot exist in the namespace". I am able to set the other properties like Background,Foreground, etc. My UserControl has this : <wpfkit:DataGrid Name="DataGrid1" AutoGenerateColumns="True" Width="Auto"> </wpfkit:DataGrid> In main.xaml : <usercontrol:MultiStepProcessGrid

ComboBox in my WPF DataGrid won't display any items

我只是一个虾纸丫 提交于 2020-01-16 19:59:28
问题 I have a WPF user control that contains a DataGrid. This DG contains several columns including a ComboBox for states. The list of states is populated and stored as a property in my ViewModel. I am trying to bind the StateList Property to the ItemsSource of my Combobox but when I run the form and try to edit the DG, the combobox does not contain any values, the combobox is empty. Here is the XAML for the usercontrol. <UserControl x:Class="myproject.View.ucContactView" xmlns="http://schemas

Getting to certain member using datapager and datagrid

孤人 提交于 2020-01-16 19:12:31
问题 Greetings, I have a DataGrid showing a PagedCollectionView which has the total amount of records included. In total we have about 4220 records, with 20 records showing per page we have about 210 pages. Now I've been trying to implement this: When I search for a person I want to have this person show on top of the page AND have the page set to anything that is near the page it would be on. I managed to get the person on top using the example given in Linq Get items higher then lastname however

display and navigate a web page from a flex tab

烈酒焚心 提交于 2020-01-16 18:12:47
问题 i have a flex project that runs in using flash player 11. What i am trying to achive is to have a tab of my project which, when loaded displays a web page within the tab. I do not want to naviagate away from my project but display it within my tab layout. Is this possible? i have found plenty of info on how to do this using air but nothing with regards to my flex project not using air. thanks 回答1: No, this isn't directly possible. The HTML and StageWebView components would do the trick, but

All DataGrid headers must have unique names - how to work around it

拟墨画扇 提交于 2020-01-16 14:39:13
问题 I am using a DataGrid with AutogenerateColumns set to true . I'm binding it to a weakly-typed DataTable via its DataContext property. The problem I've run into is that all the headers must have unique names, because myGrid.Columns[x].Header value is tied directly to the column name of the underlying DataTable (where, obviously, no duplicate column names are allowed). Is there any sensible workaround? 回答1: Following code is untested... For DataGridHeaders to be changed, you would have to

Deep Nested XML

无人久伴 提交于 2020-01-16 08:26:43
问题 I am trying to display a list of items in a datagrid from an XMLList. <Series no="1"> <file> <filenum>1</epnum> <prodnum>4V01</prodnum> <title>Series #1 - File #1</title> </file> <file> <filenum>2</epnum> <prodnum>4V02</prodnum> <title>Series #1 - File #2</title> </file> </Series> <Series no="2"> <file> <filenum>1</epnum> <prodnum>4V01</prodnum> <title>Series #2 - File #1</title> </file> <file> <filenum>2</epnum> <prodnum>4V02</prodnum> <title>Series #2 - File #2</title> </file> </Series> My

Windows Mobile: how to highlight row in datagrid and compilation delays

杀马特。学长 韩版系。学妹 提交于 2020-01-16 06:09:06
问题 I have two Windows mobile questions: how to Highlight row in datagrid (after i run any query) ? why after 20-30 compilation, it takes for 6-7 minutes to compile (the first time takes 1 minute)? Thanks in advance! 回答1: For #1, take a look at Ilya Tumanov's example of custom formatting data in the DataGrid. He does custom painting of cells in it. THis is how you'd "highlight" a row. For #2, there's something wrong with your environment. I've not seen this or heard it reported and I've been