|
You say you have tried all the events on the tree view but no luck?! What have you actually tried?
This all depends on how your application is designed. I'm not really sure from your post exactly what you have tried but here is the overall steps.
1. Set AllowDrop = true for both the treeview and gridview
2. Connect to the treeview drag drop events i.e. so the user can drag an item from the treeview. (plenty of examples on this site)
3. Connect to the grids drag drop events i.e. so the user can drop items into the grid. (plenty of examples on this site)
4. On the grids DragDrop event get the item being dropped i.e. the tree view item.
5. Depending on how your application is designed, populate your grid using the data stored within the dropping node object OR get the data you need from a data set\data source and populate the grid that way. This step all depends on your design.
I cant see any real problems with implementing what you are asking, thats if i have understood what you have asked correctly.
|
|
|
|
|
Thanks lot S_Richie.
Now i m able to do this.
Thanks lot bro.
|
|
|
|
|
Hello, I am not certain that it should be behaving this way but I will explain and hopefully someboday will have some insight/help which would be great.
I will throw together a rough example below, We have a transaction contain multiple saves:
Try
{
Save1.Update(dt.Select(null, null, DataViewRowState.Added));
Save2.Update(dt.Select(null, null, DataViewRowState.Added));
Save3.Update(dt.Select(null, null, DataViewRowState.Added));
}
Catch
{
Trans.Rollback();
}
We have logic in the sprocs to ensure that no invalid data is saved, if Save1 completes the RowState is changed from added to unchanged. However if Save2 then throws an exception the try..catch rolls the transaction back however the Row in Save1 remains with a RowState of unchanged and so that row will not be persisted to the database once the invalid data is corrected and save is called again.
I would have expected the RowState to return to Added if the transaction is rolled back. Has anybody experienced this before? Is this what you would expect?
Thank you for any help or insight, it will be greatly appreciated.
|
|
|
|
|
i m having a datagridview which shows the appointment detail.....user can modify it from another form....so i want to know how can i refresh my datagridview on closing of another form so that it shows the updated record...please help me
|
|
|
|
|
i did the same thing a week or two back, you have to use a dialogResult.
follow my messages in this forum "forms issue" Here[^]
good luck!
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
|
Not a problem
good luck
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
using System.Threading;
Thread myThread = new Thread(new ThreadStart(_listener.Prepare));
myThread.Start(); The Start call on myThread is quite important. Without it, the thread doesn't start, and no amount of debug code in the 'Prepare' method will get called and you look a complete arse when you ask a colleague for help. If you call Start on your thread, your thread starts and everything is really good.
It's gonna be one of those weeks.
Knowledge is hereditary, it will find its way up or down. - Luc Pattyn
so you answer don't be scared of failure
The only failure is never to try
Things You've Never Done - Passenger -2008
|
|
|
|
|
I want to load an assembly from a file, change a method body and save it to a file using reflection. I do not want lot of for loops to traverse through the entire assembly and do all things manually. I just want to change one method in one module in the assembly.
Thanks.
|
|
|
|
|
Sounds nasty.
I think you're going to need a recursive method to do this. Reflection wasn't designed to help you hijack someone else's dll and inject your code into it. That's a scary thought.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your reply. I can do it really with some iteration or recursion easily- when I know that there is no other way.
I am trying to implement AOP like feature without defining a new class. Some classes do use reflection and my AOP proxy is bypassed in that case. If I could inject some IL at the method beginning it'd be nice. I do not have access to the source but can define which dll is going to be used with the application.
I know its nasty. I really prefer to walk with my girlfriend to write code- but still some people does not like my idea of walking. Joking
Thanks.
|
|
|
|
|
Have a search on this site for the LinFu articles by Philip Laureano. They sound like just the ticket for you.
|
|
|
|
|
Hello Everybody
I am developing an application and i want that when user click on copy button the the content of that of that control get copied and when paste to MS word then it comes as it is on the document.
|
|
|
|
|
Hello,
You may use the Clipboard to copy the data/text and then paste it to your destination.
For example the code below will copy the text in the textbox to the clipboard and then you may paste it to your destination:
//Copy
Clipboard.SetText(this.textBox1.Text);
//Paste
this.textBox2.Text = Clipboard.GetText();
Regards,
Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
Thanks for solution
Regards
Dikshant
|
|
|
|
|
Please use 'Clipboard', u can use the following relevant functions :-
Clipboard.GetData().
Clipboard.SetDataObject()
etc.
Thanking u.
PalSubrata
|
|
|
|
|
hello everybody
how change axe x in excel graph in c# ?
thanks
jere
|
|
|
|
|
hi,
im doing a project now.In that i used plenty of variables like
datasets,arraylist and other things.It takes lot of memory while using
these objects.eventhough i disposed that objects(using dataset.dispose(),clear(),reset(),similiarly for arraylist and others ) it still not releasing the memory.we tried GC collect also.but unable to solve the
problem
thanx in advance
|
|
|
|
|
karthikeyan1983 wrote: i disposed that objects(using dataset.dispose(),clear(),reset(),similiarly for arraylist and others ) it still not releasing the memory
Are you getting any error ? Make sure all instances which has a Dispose() method is called once you finish using it. Put the class instances which are disposable in a using statement. This ensures the disposal of objects.
|
|
|
|
|
I have disposed memory like this for dataset and arraylist etc.....
but initally it will take 13,000 K amount of memory but after finish the program it is taking 80,000 k amount of memory even if dispose like this......
for dataset......
F_Info_set.Dispose();
T_Info_set.Dispose();
F_Cnt_DB.Dispose();
T_Cnt_DB.Dispose(); T_update_set.Clear();
F_update_set.Clear();
Distinct_date_set.Dispose();
for arraylist.......
Date_List.Clear();
ls_Item.Remove();
Chk_item.Remove();
rec_Item.Remove();
sorted_Mdb.Clear();
temp_Sort.Clear();
D_info.Clear();
Change_date.Clear();
for DBconnection....
db_con.Dispose(); for DBcommand....
db_com.Dispose();
dd_com.Dispose();
F_insert_cmd = null;
T_insert_cmd = null;
del_integ_mdb = null;
for DBadapter.....
db_adap.Dispose();
dd_adap = null;
F_info = null;
drrow = null;
|
|
|
|
|
Hello,
Apart from Disposing, you have to make sure, that there are no references to your objects "alive".
I would recommend the usage of a memory profiler!
All the best,
Martin
|
|
|
|
|
Odds are very high that you're fine. The objects you refer to are not very big, and the task manager is a poor way to work out how much memory your app is using.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
starting from 16000 it reaches nearly 80000k.and never it came back to the normal range
|
|
|
|
|
It sounds like you are using TaskManager to look at your memory usage. You should use PerfMon instead since TaskManager is obly reporting the total amount of memory allocated to the runtime process not how much memory you are actually using.
You shouldn't make direct calls to GC.Collect as that will end up hurting your performance in the long run.
As long as you are properly disposing of your objects (make sure you are using a try..finally block or the using statement) you should be fine. If you really want to see what is going on, you will need to use a memory profiler like the CLR Profiler.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
any body help me to calculate the factorial value of any inputed number.
Note: Be sure bcz no. of code available but all are calculated only <100.
ashutosh kumar jha
|
|
|
|