|
I posted a question a little while ago about how to link a treeview to a list view.
What i actuli was trying to say is "How Do you Binding a ListView to a TreeView"
|
|
|
|
|
Will you not do this. Post one question about a topic and then stick with it. Don't spam the boards.
|
|
|
|
|
Try keeping to one set of posts and put a useful topic. As far as I can remember, you have been asking this for the last 2 days and have been given loads of useful hints, so your best bet is either get a few books on programming in general and C# in particular, or try another career.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi
I am new to c# and im trying to link a treeview to a list view.
Thanks in Advance
|
|
|
|
|
And do what? One of the first things you need to learn as a developer is how to lay out your requirements. From your question, I have no idea what actions you expect.
|
|
|
|
|
Oh Sorry.
Im trying to make it so that when click on a node in the treeview it will display in the treeview.
|
|
|
|
|
One way to do this is to use the Tag to store the row in the TreeNode, and then find the same item in the ListView where you will also have stored the object in the Tag. This isn't a particularly elegant way, but will work for small solutions.
|
|
|
|
|
Hi,
what do you mean exactly by "link a treeview to a list view"? If you mean updating the listview when you click at the treeview, than you have to register for the SelectedIndexChanged (or something similar) event of the treeview and update you listview within the event handler.
Regards
Sebastian
|
|
|
|
|
Yes that what i meant
Thank You
|
|
|
|
|
You actually have to write code to do it (I know, that may be too close to being an actual programmer). There is no such thing as "linking" a view to another view. You can attach the same data source to both views.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
Is WPF is feasible enough to develop very complex games like motogp .
?
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Lol, no. Those are written in native C++ and use DirectX.
|
|
|
|
|
You should look at DirectX (or OpenGL) for this - possibly you might want to look at XNA.
|
|
|
|
|
SO IT IS ONLY FOR CREATING NEW INTERFACE LIKE COLORFULL BUTTONS LIKE THAT
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Please don't shout - and no it's not. Well not quite. It is about creating new interfaces, but it's a lot more than just colourful buttons.
|
|
|
|
|
WPF does use directx to render it's 3d graphics, so does use hardware acceleration, but it is not intended as a games platform. It does not support all the 3d operations you will need to build a decent 3d engine.
If you are looking to write games you should look at XNA[^] (XNA Creators club[^]). It's a framework specifically intended for games. Your other options are DirectX[^] or OpenGL[^]. Both are high end hardware accelerated graphics/media libraries. Both are generally used with c++ rather than .net though. Alternatively, there are plenty of other free/open source 3d engines that you can google for - some are specifically designed for use with C#.
Simon
|
|
|
|
|
Sorry... WPF is only for powering presentation layer of biz apps... not "motogp" type games
You should rather choose an existing game engine... that in turn depends on the type of games you wanna write... for instance, for FPS games you might wanna use Unreal engine or Quake3 engine.
Read this article to know more!
http://en.wikipedia.org/wiki/Game_engine[^]
Usually these engines take care of rendering the texture and adding effects and to some extent, the AI coding also. But for defining your own texture, you might either use a software (like Maya) but for most scenarios, you can search for textures online and use them in your game.
|
|
|
|
|
Hi
I am using Visual Studion 2005 and C# to create a Windows application.
I used the designer to bind a DataGridView to a MS Access database using a BindingSource. In the designer the correct column headers are displayed now on the DataGridView. When I run the application the correct column headers are still displayed, but there is no data displayed. When I preview the data on the smart tag of the DataGridView within the designer it shows me that there is data in the relevant table inthe database.
When I have the DataGridView directly on the Windows Form then it displays the data, but I would like the DataGridView on a UserControl that I then add to the Form at runtime. On the UserControl the DataGridView does not display the data.
Any ideas?
Thanks.
Kobus
modified on Thursday, October 16, 2008 3:30 AM
|
|
|
|
|
Why don't you post the runtime code that you used?
Anyway, did you call the DataBind() method on the grid view
this.[gridViewName].DataSource = [dataSourceName];
this.[gridViewName].DataBind();
|
|
|
|
|
what do you got there? meaning code!!!
DataGridView is a gentleman, accepts allmost everthing, doesn´t need a 100% fit dataset.
Try to put DGV inside the form (not inside usercontrol) just to check if is about delegates, if doesn´t works either your code is wrong
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
"Allow Service to interact with Desktop" in Services property.
How can i set this property programmatically.
Thanks ........
|
|
|
|
|
Setting this property at all is not generally advisable. Services aren't meant to provide UI or allow any other type of user interaction.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] 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
|
|
|
|
|
You should ask yourself if you should be doing this. The reason I used this code was I had a windows service that logged into a DB2 database via an ODBC driver. They routinely changed their passwords and sometimes would forget to tell us. When we tried to login in after a password had been changed the ODBC driver would pop up (attempt to pop up) a dialog allowing you to enter the new password which of course never showed up as it didn't have permissions. We didn't realize any problem until the client called telling us that they hadn't received any new data.
Anyways the following code worked for me.
Reference System.Management
protected override void OnStart(string[] args)
{
ServiceDesktopPermission();
}
static public void ServiceDesktopPermission()
{
try
{
ConnectionOptions coOptions = new ConnectionOptions();
coOptions.Impersonation = ImpersonationLevel.Impersonate;
ManagementScope mgmtScope = new ManagementScope(@"root\CIMV2", coOptions);
mgmtScope.Connect();
ManagementObject wmiService;
wmiService = new ManagementObject("Win32_Service.Name='" + "My Service Name" + "'");
ManagementBaseObject InParam = wmiService.GetMethodParameters("Change");
InParam["DesktopInteract"] = true;
wmiService.InvokeMethod("Change", InParam, null);
}
catch(Exception ex)
{
}
}
|
|
|
|
|
it worked for me; thanks a lot
|
|
|
|
|
Excellent, thank you. Just what I was looking for. I only have one suggestion: do it in the service installer after service installation is completed, before the service starts up. This way the first time the service starts, it's already able to interract with the desktop:
private void serviceInstaller1_AfterInstall(object sender, InstallEventArgs e)
{
ServiceDesktopPermission();
var controller = new ServiceController("SERVICE_NAME");
controller.Start();
}
|
|
|
|