Answer Questions
flash.tato How can I make a default value for my DataGridViewCombobox
Hi guys, Greetings! I setup a datagridviewcombobox programmatically, my problem is how to set a default value for my combo box, how will I do this Thanks, Hi guys, I'm using this code, please help where should I include the SelectedIndex // Inventory - Inventory IN private void btnInventoryInventoryIn_Click( object sender, EventArgs e) { // call function to populate the suppliers name PopulateSupplierName(); // show the Inventory In panel this .panelInventoryIn.Visible = true ; } private void initializeInventoryInDataGridView() { // quantity column, textbox DataGridViewTextBoxColumn textboxColumn = new DataGridViewTextBo ...Show All
Uwe Keim Draw round border?
Is there any way to create a rectangle with a round border Thanks, Hi Evan Not with one call... You'll need to draw lines and arcs. Something like this: g.DrawArc(Pens.Black , 34, 34, 30, 30, -180, 104); // Upper Left Corner g.DrawLine(Pens.Black , 51f, 33.5f, 253f, 33.5f); // Across the top g.DrawArc(Pens.Black , 237, 33, 30, 30, 260, 105); // Upper Right Corner g.DrawLine(Pens.Black , 267, 50, 267, 256); // Down the right side g.DrawArc(Pens.Black , 237, 237, 30, 30, 0, 105); // Lower Right Corner g.DrawLine(Pens.Black , 48, 267, 253, 267); // Bottom g.DrawArc(Pens.Black , 33, 237, 30, 30, -270, 105); // Lower Left Corner g.DrawLine(Pens.Black , 33, 48, 33, 250); // Back to the top ...Show All
PremZ Compiling Problems!
Hey, I'm an old-school Visual Basic 6er, recently openng up Visual Studio 2005 for the first time (using Enterprise for now). I've made a simple application, however when I come to 'publish' it, I'm completely lost. The directory I choose to send it to gives me a lot of files (File.exe, File.application, File.exe.manifest, File.pdb and FIle.xml) - I just want the executable file like the olden days :( Am I doing this wrong What is the correct way to compile a VB Studio 2005 Enterprise project Sorry for sounding ignorant, but I do wish to continue with this. ...Show All
ramyaVijay Disappearing Menus
I've got a MenuStrip and a ToolStrip where some of the items in them have graphics from the resource file. I have deleted one of the graphics from the resource file that wasn't used in any of the menus. But now all the items from the MenuStrip and ToolStrip have disappeared. I have looked at the form.Designer.cs code and the code is still in there for the menus. Can anyone help Hi,grnr_r This case has been discussed in the following topic,please have a look at it: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=916035&SiteID=1 Hope this can be help you.Regards. Ye ...Show All
Indinfer AxtiveX control in mixed assembly
I have a COM dll - written in C++ - that implements a large number of complex objects, some of which are controls. I want to be able to offer this as a "native" .Net assembly. I have therefore built a mixed assembly containing new managed wrappers around the old unmanaged objects. This has gone well, and I'm now able to use the assembly from a managed app exactly as I would any other .Net assembly. The ability to debug from one to the other is truly astounding. I noticed that my controls were not repainting as they should, and traced this to the fact that the container/control OLE interfaces were not geting wired up correctly. The faint sound of a large can of worms opening becomes slightly louder... Currently, my manage ...Show All
Andreia How can I add OleDbDataReader Object to DataSource ??
hi, when I retrieve data from remote DB as the following // //.... OleDbDataReader reader; //Executing The Command. reader = command.ExecuteReader(); //Reading if (reader.Read()) { MyBindingSource.AddNew(); MyBindingSource.Add(reader); // It doesnt work, whith error.., } //... So how can I add the reader object to MyBindingSource Try loading a datatable from the datareader. DataTable dt= new DataTable(); dt.Load(reader); MyBindingSource.DataSource=dt; Thanks Ken Tuker, I found other solution, is creat a new DataSet (NewDS) to retrieve any data from the RemoteDB, then merge the NewDS with the OldDS. OldDS.Merge(NewDS); ...Show All
djshades2004 simple question about cell parsing
Hi all :) i have a table in database with a column of data "double" for example: 10.00 I have no problem to write data in this table from the datagridview. I have problem when read them :( It means that when i select that data and bound them to the datagridview, (to update, delete or whatever) i read them like : "10,00" or "13,25" If i try to change their value from 13,25 to 13.25, my value become: 1325. I've already managed the cell formatting and the cell parsing events. Any suggest Really thx :) It looks like you are running into internationalization problems when you are converting a string to a number. Maybe this will work for you. string strNum = " ...Show All
DallasSteve What did I do wrong?!?! - New Controls not showing when ran in debug
-------------------------------------------------------------------------------------------------------------- Development Environment: Visual Studio 2005 Language: Visual Basic Issue Summary: Add new controls to form, run in debug, controls do not show ------------------------------------------------------------------------------------------------------------- DEATILS: Okay, so a strange thing happened to me when building my application. I created a 3-form application. I deployed the project using a setup project. I found that there was one dropdownlist I needed to add to the form. So, I went in and added the control and corrected the code behind to work with it. I had to shorten a textbox control in order to fit t ...Show All
csi_hugh Hide Splitter line when adjusting DataGridView column width
Hi all, When I adjust the DGV column width by pressing/moving the header divider, I want to hide or change the splittering dashed line.Any body can give me hint Additionally, the DGV does not provide the ColumnWidthChanging event( only a ColumnWidthChanged event available), how do I check whether column width is changing Judge if the Cursor is SizeWE Thanks for any help. seamus ...Show All
woeter Graduation Project
hi all, i'm student in the last year in computer science faculty in egypt , i need badly for Graduation Project ideas to make , i need new ideas that can be new trend in the computer science , please any one who has any good idea for the graduation project , give it to me , don't hesitate to give the idea even it's difficult. please help me... i'm waiting for your ideas... best Regards john nabil Hi, It's hard to tell the new trend in the computer science. It's a rather wide area. If you prefer the software engineering thing, then there are lots of those management system out there. If you like the academic thing, then you may write a paper on ,say, computer graphics, architecture design ...etc. design and ...Show All
rfsmason popup and wait
i've been using MessageBox.show("something"); as a popup box to display a message. I'd like to pop up a new form instead, to give me more control over how the box is layed out. THe problem is, when i pop this window up, the program continues to run. Is there a way to get the program to wait until a button is pressed in the new popup form, then continue on This is just how the MessageBox works. Thanks! heres a section of code: [code = "csharp"] login LoginWindow = new login(); LoginWindow.show(); //wait until OK button is pushed [/code] Use ShowDialog() instead of Show() to make the new form modal and block returning to the caller of it until it has closed. your the man, thanks ...Show All
happer Generated DataBinding and ComboBox Problem
Hi, I make use of the automatic databinding in VB 2005. I have got two tables. One is called customers and the other is called WorkingStations. Every Customer is assigned to one WorkingStation. I have created the dataset that displays thw rows from both tables. The customer table contains a column called WorkingStationID that is related to the primary WorkingStation key. Now I created a form that allows me to edit a customers data. I load one single customer by his ID. The basic editing works without any troubles. Now I added a combobox that has following attributes: Source: WorkingStationBindingSource Member: WorkingStationName Valuemember: WorkingStationID Value: Customers.WorkingStationID I load both tableAdapters(the one for the custom ...Show All
Sabrecat Find row in dataset after datagridview sort
I set the datasource of my DataGridView to the defaultView of a table in my dataset. I then click on a column header in the gridview and the grid rows are sorted, as well as the rows in the defaultview. How can i grab the correct row in my original dataset using a row index from the grid My original dataset is not sorted, only its defaultview. I'm using a typed dataset here so grabbing the row object from the DataRowView doesn't work. Another issue: Once the DataGridView is sorted by clicking on a column header, how can I undo the sort int iRowNumber = -8; for (int i = 0; i < dv.Count; i++) { if (grd.IsSelected(i)) { iRowNumber = i; } } after that get ...Show All
ash141vsp2003 Answer
private void button1_Click( object sender, EventArgs e) { string s, p; s = textBox1.Text; listBox1.Items.Clear(); listBox1.DisplayMember = "FileAttribute" ; foreach ( string p in System.IO. Directory .GetFiles(s)) listBox1.Items.Add(p); } I can have a list of the file names in adress of string s.(folder of string s) But I want to have a list of files whose folders are in string s's folder. Sounds like you were trying to do this: System.IO.DirectoryInfo info = new System.IO.DirectoryInfo(@"c:\windows"); listBox1.DisplayMember = "Name"; listBox1.DataSource = info.GetFiles(); I have to list files which's folder is under current folder ...Show All
Jack Hoxley DataGridView Control replacing certain values with a string
I have a datagridview control which uses an array of class objects as its data source. Is it someway possible to set it up so that certain values in the data are shown differenty in the control. What I actually want to do is when the value is -1 show either nothing or a dash. Cheers, Gareth Thanks. Being natrualy lazy I was hoping there was some little known property or method I could use, but failing that I shall give your approach a bash. Cheers, Gareth absolutely. One way would be to iterate through each row and each column and then set the cell value or for each row, get the specific column you are after in the cell property, check its v ...Show All
