|
i have problem in dataGridView1
Problem is When i select a record in dataGridView1 Combo Box "Medicine Category" then it show Name of Category in dataGridView1 Combo Box "Medicine Name" First,
When i Select 2nd Row Record"Medicine Category" then it fill Medicine Name problem
e.g:
Ist row Select Syrup then show Medicine Name(Cough)
2nd row Select Tablets then show Medicine Name (Panadole)
but it change Records Ist Rows
the code is :
string query = "select * from item_detail where m_type = '" + GridView_Purchase.Rows[e.RowIndex].Cells[0].Value.ToString() + "'";
cbName.DataSource = dbSelect.selectRecords(query).Tables[0];
cbName.DisplayMember = "m_name";
|
|
|
|
|
I hav a datagridviewview in windows application whose column names are set from the fron end i setted their propertyname also cause i wanna to bind it with database, just like as
Name Address
Admin Delhi
so m wanna tht as i will click on address cell of any row there is one combobox will show who is binded with database
and as i will click on another row, the previous row will be show normally as a textboxcolumn and currentcell with show as a combobox column who will also binded with database
|
|
|
|
|
I've read your post a couple of times, but I can't find a question or find at which point you got stuck. Can you explain what behaviour you were expecting, and the actual results? With a part of the code to demonstrate the problem?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello Sir,
Look i have a datagridview who is binded with database and shows those values
Name Address
admin Delhi
adam India
as i'm going to click on delhi my datagridview will show a combobox on click of it and shows a list of cities from database
and after selecting any value from combobox i'm moving toward next row so as i'm going to next row m wanna tht combox will convert into textboxcolumn again thts the problem happening with me.
Hope so tht now u can understand my problem...
|
|
|
|
|
Arun kumar Gautam wrote: Hope so tht now u can understand my problem... Sounds more like a specification than a problem.
You can add a DataGridViewComboBoxColumn[^] to the DataGridView s "Columns" collection. Also note;With the DataGridViewComboBoxColumn, you can display a column of cells that contain drop-down list boxes. This is useful for data entry in fields that can only contain particular values, such as the Category column of the Products table in the Northwind sample database. [...] Combo box columns are not generated automatically when data-binding a DataGridView control. To use combo box columns, you must create them manually and add them to the collection returned by the Columns property. Samples are here[^], walktroughs and howto's over here[^].
Hope that helps to get you started
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
hie,code team members
currently i make a project on school management team,i use .net framework 4.0 and linq for coding.
i want to put single sign on using active directory concept in web-application.
so my question is that how i implement in it my project.
give me tips for that
Thanks in advance....
Regards !
ketan
|
|
|
|
|
ketan italiya wrote: give me tips for that I've got something better than a tip; documentation[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
thanks Eddy....it will helpful for me...
|
|
|
|
|
You're welcome
|
|
|
|
|
|
I'm developing a C# windows program that, among other things opens up a configuration file and reads in the data and responds appropriately. I currently have the path to this configuration file hardcoded. It's located in the installation directory "C:\Program Files\... but I was wondering if there's a shortcut of some kind to get the location of the program that's running, and use that to grab the configuration file, so I don't have to hardcode it. Thanks.
|
|
|
|
|
Application.StartupPath (in the System.Windows.Forms namespace)
-NP
Never underestimate the creativity of the end-user.
|
|
|
|
|
Thanks. I appreciate you taking the time to respond.
|
|
|
|
|
Application.StartupPath if you have a WinForms application. Otherwise you can use the methods located in the System.Reflection.Assembly class to get the location of the executing assembly.
|
|
|
|
|
Thanks that helps. I appreciate you taking the time to answer.
|
|
|
|
|
Hello,
I wrote a small program that deletes files from a PC.
When I run it uses 3 gb or sometimes more than that.
I cannot find the reason of this.
Any ideas are welkcome.
In the program I use nested
foreach (string mDirectories in Directory.GetDirectories(i)
foreach (string mBestand in Directory.GetDirectories(mBestanden + mLocalie)
and iseems that this is the problem. Will try to solve this another way.
modified 25-Jul-13 5:55am.
|
|
|
|
|
It might maybe possibly be somewhere in your code. But since I can't see your computer I can't tell you where.
Not sure how we can give advice on fixing a problem when you aren't showing us any of the simple program to go by?
|
|
|
|
|
Ron,
Where can I upload the source?
|
|
|
|
|
If its small you can just copy/paste and post relevant parts of your code directly in the forum, otherwise you need to use a service like DropBox.
|
|
|
|
|
Dekkie wrote: When I run it uses 3 gb or sometimes more than that. 3 Gigabytes? You must be allocating some enormous memory buffers.
Use the best guess
|
|
|
|
|
have you thought about the changing how you do the looping?
i.e.
string[] directories = Directory.GetDirectories(i);
foreach(string mDirectories in directories)
{
}
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
How could I convert a PNG image to a SVG using C# with asp.net?
I want to convert the png image format to SVG(Scalable Vector Graphics).Is there any for such conversion. Please Reply.
|
|
|
|
|
|
But I need a vice versa conversion i.e. PNG image to SVG file. You provided the svg file to png image.
|
|
|
|
|
SVG means Scalable Vector Graphics, which is not an image in the way a .PNG or .JPG is. Rather than storing an array of pixels, it stores a list of mathematical shapes and designs. The intent of an SVG is to create an 'image' that retains quality regardless of how far you zoom in or out.
There is no benefit to converting .PNG to .SVG - in fact, it loses quite a bit of quality because you can't literally "convert" it, you can only trace it (IE, draw a new SVG that looks like the PNG.)
|
|
|
|