|
Hi,
First, after the user selects a folder, you know its path. You can GetDirectories from that Directory object. Then iterate through the collection, filling each folder name in the list box. I think that there will be a better way of doing this, but i dont know about it. This solution will surely work in your case. But this is not a good practice, I guess.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Use Directory.GetFolders and Directory.GetFiles, merge those arrays together and make them the datasource on your listview.
How new is 'new' ? Have you taken the time to learn C# before learning Winforms ? Have you worked through any books ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
New is about 6 months experience and still learning through CDI college.
Thank you for the reply.
|
|
|
|
|
hi,
In my application I am using a DataGridView with 4 columns.
now I want to validate the data entry from user.
like in First column user should enter only Numbers, and in second column I want a default cell fromat like xx.xx.xx.xx
How to do this.
Pls help me
With Regards
prasad
|
|
|
|
|
Did you try with DataGridView.ColumnDividerWidthChanged Event.
Regards,
Satips.
|
|
|
|
|
hi,
wht i have to do with this event
i am not getting can u hekp me pls..
dataGridView1_ColumnDividerWidthChanged()
with regards
prasad
|
|
|
|
|
Hi,
From your question, it seems that your are providing the Edit facility in the grid itself. If this is the case, you can place all the validators in the EditTemplate of the column. These will automatically fired when user clciks 'Update'.
I hope you got my point.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
hi,
actually iam not getting u canu brief pls.
|
|
|
|
|
I wanted to say that, you can place validators in the EditItemTemplate of a GridView. For this you will have to convert that column in template comlumn.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
|
hi,
wht u have given is customized datagrid.
But i want it in the C# DataGridView .
can u help me pls
with Regards
prasad
|
|
|
|
|
In VS 2005, C# setup project contains information of exe. But I can't find app's [ProductCode] in setup project to make an uninstall file.
If you help me show how to find [ProductCode], I am appreciated with you and unintallation of app is easier.
Thanks in advance
It seem to be a solution or an answer.
|
|
|
|
|
An app doesn't automagically have a product code, you need to provide one.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How should I provide [ProductCode] so that Window can identify this [Productcode] as a key to remove ????
It seem to be a solution or an answer.
|
|
|
|
|
My understanding is that the point is entirely that you provide whatever you like, and windows will use it when you run your uninstaller.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi everyone,
I've got a problem with my application and i need some help.
I use a DataGridView to display the data.Data is being read from a db.I want to get the Sum of each cell under a column.For example:
|Bills |Salary |PriceOfAPen
-----------------------------------------------------
|500,00$ |300,00$ |50,00$
|400,00$ |300,00$ |50,00$
-----------------------------------------------------
Total: 900,00$ 600,00$ 100,00$
But my output looks like this:
|Bills |Salary |PriceOfAPen
-----------------------------------------------------
|500,00$ |300,00$ |50,00$
|400,00$ |300,00$ |50,00$
-----------------------------------------------------
Total: 1600,00$
Users can change or add tables so i have to do it when the data is called.Can someone please help me?
Thanks already.
Sorry for my English by the way as it is not my native language
|
|
|
|
|
Hi,
You can use the RowCreated event to keep all the columns values in separate variables, and go on adding new values. then set these to the Footer labels. So simple.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
You could use some variables for particular cell/row accordingly that maintains the total and at the end display the result accordingly.
Keshav Kamat
India
|
|
|
|
|
Does anyone know how to use the .net2 (c#) DeflateStream to compress content for a pdf?
I have the PDF stuff written and working fine including text, images etc with the page contents in plain unicode.
Example
5 0 obj<<<br />
/Length 278<br />
>>stream<br />
<br />
[commands to write to PDF page in unicode]<br />
<br />
endstream
When I try to compress the [commands to write to PDF page in unicode] part and add the /Filter /FlateDecode into the pdf object header, Acrobat seems not to recognise the compression and just returns a blank page.
I found a Microsoft article http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=97064[^] which seems to indicate the the MS version of flate compression does not follow the original spec for zlib and needs two additional characters before the stream. I have used byte[0] = 88 and also 120 and byte[1] = 0 followed by the byte stream of the compressed page, but still doesn't work.
Has anyone managed to use the DeflateStream successfully and if so, could you point me in the right direction please.
|
|
|
|
|
Does any one know how to get the file "property-value" pairs for a particular file. The property-value pairs appears in Windows Explorer when you select a file and view properties, and then select the summary tab. My camera puts additional information (such as shutter speed and aperature settings) in this collection. I cannot view them in the "detail view" in Windows Explorer (i.e. you cannot add them to the view). I thought I would write a quick app to display these values next to each picture.
I found the DSOFile object but this only works with Ole file (excell, word, powerpoint,...)
Any ideas if it can be done with the .Net libraries?
Tom K
|
|
|
|
|
You need a EXIF extractor. Look at this one:
http://www.codeproject.com/csharp/exifextractor.asp
|
|
|
|
|
Thanks. Just what I needed.
Tom K.
|
|
|
|
|
Hello,
I have a listview control with bunch of entries. When the user
right-clicks on the item, I want a context menu to come up. So I
created a ContextMenu instance and assigned it to ListView.ContextMenu
property.
The problem is that the context menu comes up regardless of whether I
right-click on the item or the empty space or the column header. I want
it only to come up when the user right-clicks on an item. How can I
control the ContextMenu better?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
On the mousedown event for the listview place the following code:
if (ListView1.GetItemAt(new Point(e.X, e.Y)) != null)
ListView1.ContextMenu = yourContextMenu;
else
ListView1.ContextMenu = null;
|
|
|
|
|