|
Perhaps you want the FolderBrowserDialog ?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
thank you for your answer, so it havn't a propriety Filename, i would to get the path of directory chosen by FolderBrowserDialog, thank you.
|
|
|
|
|
SelectedPath property will have it.
Why can't you use object browser to get these kind of information? It would have been lot quicker.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
Doesn't this code just work fine?
OpenFileDialog ofd = new OpenFileDialog();
if(ofd.ShowDialog() == DialogResult.OK)
{
String fileName = ofd.FileName;
}
|
|
|
|
|
im working on my IT graduation project for developers,the idea is to make a program that monitors,traces,controls other applications.
what are the concerns of the developers while developing their programs and how can we help in this area? if you can suggest some links or books that may help me...
|
|
|
|
|
|
|
Hi,
I have a datagrid bound to a previously created datatable in code and now I'm looping through the datagrid columns to change a certain column's type to a combobox, how can I do that??
Thanks guys!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
are you working with a Win control (from System.Windows.Forms) or Web (from System.Web.UI.WebControls)?
Calin
|
|
|
|
|
you may use DataGrid.Columns property to access/control the columns.
Calin
|
|
|
|
|
Ok, I found it:
private void ConvertToCombo(DataGridViewColumn tc,string[] values)
{
try
{
if (MyDataGridView.Columns.Contains(tc.Name))
{
DataGridViewComboBoxColumn cc = new DataGridViewComboBoxColumn();
cc.DataPropertyName = tc.Name;
cc.Name = tc.Name;
cc.HeaderText = tc.HeaderText;
cc.Items.AddRange(values);
MyDataGridView.Columns.Remove(tc);
MyDataGridView.Columns.Add(cc);
}
}
catch (NullReferenceException) { }
}
ConvertToCombo(MyDataGridView.Columns["GRADE"], " ;A;B;C".Split(';'));
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi All,
I'm making my first Custom Control in WPF at the moment and have created a Custom Control Library to keep them all in. As part of this first control I'm getting a lot of infrastructure set up at the same time.
Currently there are many ways to get data into the control in various formats such as single objects, lists of objects, DataTables and raw data (strings, ints etc ...) In addition to this one of the things I've included in the library is a DAL that can connect to databases to retrieve data for the controls.
Is this a good idea or not? Should I be merely allowing consumers of the library to retrieve the data externally and pump it into the controls? Or is this a nice to have that can remain a feature of the library?
Cheers,
|
|
|
|
|
Jammer wrote: Is this a good idea or not? Should I be merely allowing consumers of the library to retrieve the data externally and pump it into the controls? Or is this a nice to have that can remain a feature of the library?
That depends on your specifications. But, normally, you leave the database stuff to the consumer of the control and just support databinding to whatever source is acceptable.
|
|
|
|
|
For sure ... I think I might move this out into a general utility library.
|
|
|
|
|
Is there a way to create Comment Templates that will automatically be placed at the top of each and every newly created code file?
I'm using VS2008.
|
|
|
|
|
Tools->Options->Coding->Edit Standard Headers
you have something like that?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
musefan wrote: Tools->Options->Coding->Edit Standard Headers
you have something like that?
No, I don't, do you?
|
|
|
|
|
Sorry i use SharpDevelop[^] and as it is very similar to VisualStudio i assumed would be similar options
I have Visual C# 2008 express edition and that does not have many options at all. Are you using an express version? maybe its a limit of that
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
No, that little option only applies to SharpDevelop.
You'd have to edit the "Item Template" files in Visual Studio to do this. I think you'd find them under "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\...".
|
|
|
|
|
|
how to set the border Line of the winForm in C#?
and set the border line color ?
Thanks !
|
|
|
|
|
do you mean the border of the whole form, or just a specific control?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
I want to set the border of the whole form.
|
|
|
|
|
well as far as im aware there is no property for that so you will have to do it some other way, here is a couple of options:
Option 1:
Handle the paintEvent (or override OnPaint)for the form and add some code such as -
e.Graphics.DrawRectangle(...);
Be aware that controls maybe be drawn ontop of the border depending on placement
Option 2:
Create a panel, which will be your 'Main Panel' place this on the form but slightly offset its size and position so the mainForm background color can be set to the desired border color and you should only see a border effect, of course you set the 'Main Panel' backColor to be what ever you want your main backColor to be
Hope these make sense
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Thanks musefan, I'll attempt to handle with your suggestion
|
|
|
|