ivanw's Q&A profile
Visual Studio 2008 (Pre-release) Why ItemsControl.GroupStyle is ObservableCollection?
It tried. <ListBox.GroupStyle> <GroupStyle HeaderTemplate="{StaticResource groupingHeaderTemplate}"/> <x:Static Member="GroupStyle.Default"/> </ListBox.GroupStyle> The result seems to use only groupingHeaderTemplate. What is the reason why GroupStyle-Property is ObservableCollection I was not able to find the sample that seemed to become a reason. It is an ObservableCollection so that when you add a GroupStyle, the ListBox gets notified and recomputes the layout with the new GroupStyle taken into account. Many of the samples wouldn't work without this, because the ListBox would never know that there was a new GroupStyle. When you have two GroupStyles in the collection, t ...Show All
Visual C++ What is an MFC message map
Question:- A CFormView uses a dialog-template resource. What properties must the dialog-template resource have to work correctly with a CFormView Choice 1 WS_CHILD on WS_BORDER off WS_VISIBLE on WS_CAPTION off Choice 2 WS_CHILD off WS_BORDER off WS_VISIBLE off WS_CAPTION off Choice 3 WS_CHILD on WS_BORDER off WS_VISIBLE off WS_CAPTION off Choice 4 WS_CHILD off WS_BORDER off WS_VISIBLE on WS_CAPTION off Choice 5 WS_CHILD on WS_BORDER on WS_VISIBLE off WS_CAPTION off I've now merged a good 1 ...Show All
Windows Forms Context Menu In GridView
How can I have context menu in Gridview upon right clicking at any where in gridview.Can any one plz help me up... Thanks in adavance.... With regards, mahender Hai, Well Mine is Server side application.I am Using gridview.My VS is 2005.Context menu Displays Properly when I try to use textbox as a control.Context menu COme over the Control.AWhen i try to replace textbox with dropdownlist .The Context menu is display backside of Dropdownlist.i mean it looks like Context menu upon tht Dropdownlist occurs....I am using IE7.0 With regards, Mahender ...Show All
SQL Server Loading excel file(.xls) into sqlserver (ASP.net web application)(ASP.net framework 1.0)
I am using framework 1.0 to do the above tasks. Since there is no fileupload function in .net 1.0, i will be using the html control tools (file field) to do the upload option. i have totally no idea of how to start coding it...can anyone guide me through the steps thanks Hi, try the following links to get the code for loading excel information. http://www.codeproject.com/useritems/Excel_Application_in_C_.asp You will have to grap the information (whereever this is stored in your excel sheet and create new datarows of your table you want to update or compose your insert / update statements on the fly / or use a stroed procedure) if you need any assistance here, just raise a hand, ...Show All
Visual Studio Team System Accessing Global Lists From Reporting Services
I have created a global list to populate a new field on our work items. I am creating a custom report using reporting Services to query work items. I want to create a parameter within the report that is populated by the global list to help filter which work items are returned. Are global lists stored in the SQL database so I can automatically populate the report parameter with the available options The values of global lists will be placed in the data warehouse as the values are used by work items. For example, lets say you have a global list that contains "a","b" and "c", and that this list is associated with the field "myNewField". Let's further assume that in ...Show All
Windows Forms 2 DataGridView Questions
1. I am binding my data grid view to the results of a stored procedure. The user can then modify the data in the datagridview. (Add, remove, update). I want to display the updates in the data grid view as they are made but only commit the changes to the database when the user presses a save button. What is the best way to do this 2. My data is stored in the database in UTC time. How can I force the data to be displayed in the datagridview in local time. Thanks in advance. im not sure I understand im afraid. to refill the data, you simply call the Fill method of the dataAdapter as you are doing which will execute the SelectCommand you initially put in (the SqlCommand) and use that to fill the dataset ...Show All
SQL Server Very slow insert of an XML subtree into an XML column
Hello to all the MS SQL 2005 experts! I encounter a very slow performance when inserting a subtree to a typed XML column of a single table record. T he problem reproduces even with a simple example using an untyped XML variable: =========================================== DECLARE @doc XML SET @doc = '<root/>' SET @doc . modify ( 'insert <Key name="Test"> <Key name="SubTest"> <Entries> <TestEntry name="EmailList"></TestEntry> <TestEntry name="Id">3110d9b7-4fd0-43d7-a3fb-d3198330ad55</TestEntry> <TestEntry name="MonitoringLevel">2</TestEntry> <TestEntry name="Name">Monitoring Rule 0e058cd ...Show All
Smart Device Development PPC2003 connect SQL Server through WIFI, howto?
Please guys..I'm waaayyyy behind schedule here..Need Help! I have 2 applications, one is Windows Form app and the other is SmartDevice app (PPC2003) : the question I want to ask is, how to connect my PPC to SQL Server through WIFI.the problem is always error everytime I open a connection : " System.Data.sqlClient.SqlException: SqlException at System.Data.sqlClient.SqlConnection.OnError() at System.Data.SqlClient.SqlInternalConnection.OnError() ", but on my Windows Form works fine!here's my code: Dim connection As New SqlConnection(" Data Source=192.168.0.1;Initial Catalog=MyTable;Integrated Security=True ") connection.Open() Dim queryString As String = _ "SELECT name FROM Customer&quo ...Show All
Visual Basic Bound Data in Tab Pages
Hello All, I have a tab control with a number of tab pages in it. Each tab page has a number of text boxes on it. All the textboxes are bound to the same database table. The problem I have is that the data does not get updated into all the text boxes at the same time. For instance, I start the application and print the value of the text boxes to the debug window using the following code: Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim txt As New TextBox Debug.Print("Property Address") For Each ctl As Control In Me.tabPropertyAddress.Controls If ctl.GetType.Equals(txt.GetType) Then Debug.Print(ctl.Name.ToString & " - " & c ...Show All
Visual Basic Determine the if a field has focus on a non-vb form
I've used the findWindow/AppActivate commands to locate and set focus to a application written in Progress 4GL. Now I want to determine if the Progress form field that has focus is the correct one. Spy++ shows me that the field class is "button" and the caption is "shipped". Is this possible smartlinc, Please take a look at the following link that shows an article titled How to Extract a Windows Program Icon--Running or Not. http://support.microsoft.com/kb/142815 Hope that can help you with this question. If you have any VB6 question, please post your question in the following links in order to get the satisfied answer: Visual Basic Interop and Upgrade Visual Basic 6 Newgroups ...Show All
Commerce Server Extending catalog search, best practise?
I'm currently working on a project in cs2007 starter site where I need to extend the catalog search. What I need to accomplish is that when a catalog search has been performed I would like to present a number of filter dropdown-controls based on the searchible properties of the products in the search result, to give the user the ability to filter the search. It should work like the starter-site browse page but I want the filter controls to be generated based on the search result rather than on the selected category. What is the best way to tackle the problem How can I generate the dropdown-controls for the filter based on the search result Regards, Johan. Hello Colin, Thank you for your answer. I was thinking about using the guided ...Show All
Visual Studio Team System Installing TFS 180 Day trial - SQL schema doesn't match
I had a working Team Foundation Server Workgroup Edition with TFS SP1 installed. I uninstalled the entire workgroup edition, then tried to install the TFS (RTM) 180 Day trial (not workgroup edition). Now I get an error during install that the SQL database schema doesn't match what is expected ("TFS SQL Server databases exist and their schema does not match the version expected by Setup") and the setup cannot continue. How do I downgrade the database to match what is expected. Or should I try slipstreaming the SP1 install into the 180 RTM trial. I don't know what is causing the problem: 1) Is it because I'm trying to go from Workgroup to the normal edition 2) Or is it due to the fact that I installed SP1, it upgraded the ...Show All
Architecture Problems with Owner Draw Menus in an out of process ActiveX Document Server
My Document Server is written with C++ MFC and built using VS .NET 2003 and is targetted to WinXP and newer. I’ve now run out of ideas on how to resolve my owner draw problem when an OLE container attempts to render my shared menus. Everything is fine when the keyboard is used to activate the menubar items. This is because the container is using WM_NCPAINT etc to create a real screen drawing context. This context is then passed through to the in place frame of my server where it will succeed in drawing the menu items ( WM_DRAWITEM ) When the menu bar item is clicked on with the mouse, however, the container make use of WM_PRINT, WM_PRINTCLIENT to render to a memory HDC. When this HDC is passed to my out of process serve ...Show All
.NET Development WriteXML
Hello. I have a dataset that I filled with data and I want to write it to an xml file. I know how to use the dataset.writexml() command and it does not output the data exactly like I need. The xml output contains the xml declaration information and the dataset name as the root node. I do not need these. I found out how to remove the xml declaration with the following code: Dim xws As Xml.XmlWriterSettings = New Xml.XmlWriterSettings() xws.ConformanceLevel = Xml.ConformanceLevel.Fragment xws.Encoding = System.Text.Encoding.Default xws.Indent = True xws.IndentChars = " " xws.OmitXmlDeclaration = True Dim xw As Xml.XmlWriter = Xml.XmlWriter.Create( "c:\aa.xml" , xws) ds.WriteXml(xw) ...Show All
.NET Development XSD how to ensure the presence of one element ?
Hi, Let's say that I have a simple xml file with 3 elements <a/>, <b/> and <c/>. The xml file is valid for my application if it has the <b/> element. No matters if <a/> is there or not. No matters if <c/> is there or not. The problem is that I also have to allow any element in place of <a/> and <c/> . I could receive an xml file with the 3 following elements <aa/><b/><c/> and it would be valid for me. How do I have to write my .xsd Thanks. a valid xml sample file < xml version="1.0" encoding="utf-8" > <result> <a></a> <b></b> <c></c> </result> another valid xml sample file < xml version="1.0" encoding="utf-8" > & ...Show All
