Capturing the filename
-
I have a list view control. Say, if i drag a word document from windows and drop it on the list view control. can i get the file name with path. Is is possible to get the details? By what way i can acheive it?? thanks in advance..
-
I have a list view control. Say, if i drag a word document from windows and drop it on the list view control. can i get the file name with path. Is is possible to get the details? By what way i can acheive it?? thanks in advance..
Yes off-course. Handle the drag-drop event of the dropdown and use the following code if (e.Data.GetDataPresent(DataFormats.FileDrop)) { file = (string[])e.Data.GetData(DataFormats.FileDrop); } file is a string array that will be filled with the filenames with their paths. Regards,
Everyone is a genius at least once a year - Pramod
-
Yes off-course. Handle the drag-drop event of the dropdown and use the following code if (e.Data.GetDataPresent(DataFormats.FileDrop)) { file = (string[])e.Data.GetData(DataFormats.FileDrop); } file is a string array that will be filled with the filenames with their paths. Regards,
Everyone is a genius at least once a year - Pramod
thank you pramod. I am still facing some problems.... i enabled the allow drop property of that list view control. and when i drag an item from the desktop to that control nothing is happening. tht particular event is not firing... any idea what i have to do next.... plzz thanks again...:((
-
thank you pramod. I am still facing some problems.... i enabled the allow drop property of that list view control. and when i drag an item from the desktop to that control nothing is happening. tht particular event is not firing... any idea what i have to do next.... plzz thanks again...:((
-
one thing u need to do is handle the drag-enter event and write the following line e.Effect = DragDropEffects.Copy; Regards,
Everyone is a genius at least once a year - Pramod
thank u.... its perfect......... thank u.... on the track again.......:laugh::):rose: