|
Hey i have been advised to use a datagrid and have now managed to get the data displaying which im very happy with. Two questions though, is there a way to change the appearance of the datagrid as it looks pretty ugly compared to the listview also i am trying to get all data to display on a seperate form when a client is highlighted and i m confused as whether i can use the current dataset or have to create a new one. I have created a thread:
http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2861198[^]
Would really appreciate the advice
C~Rose
|
|
|
|
|
Check the properties of the DataGridView for appearance changing, they are not very fancy though. If you want something extraordinary, you'll need to implement it yourself or get a third party gridview control.
For the master-detail see this link[^], and try to google around, you'll get a lot of examples.
Regards,
Lev
|
|
|
|
|
I need to create simple application wich is Web Browser that opens new windows in existent browser.
For example I open website that have some link wich should open in new window. (a href="..." target="_new")
When i click on this link, new page will open in the same window.
Server mast see that i clicked on the link and over to link's site.
|
|
|
|
|
use
<a href="a.html" target="_blank">Link</a>
Use "_blank" instead of "_new"
|
|
|
|
|
I think this question has nothing to do with C#...
Regards,
Lev
|
|
|
|
|
No...
I need that all new windows(include pop-ups) will open in existing web browser.
|
|
|
|
|
good day people
so i created a mainMenu in my windows form and i wanted icons in the menuItems, i found my solution here
http://www.codeproject.com/KB/menus/cs_menus.aspx[^]
problem is it sets the OwnerDraw property to true and then i cant set my shortcut keys to show that way
i go menuItem1.Shortcut = Shortcut.CtrlV;
menuItem1.ShowShortcut = true;
and it keeps showing me this in menuItems --> "&Menuitem1"
when it should be ---> "MenuItem1 Ctrl + V "
how can i have icons in my menuItems AND have Shortcut keys too? (im using Visual studio 2003)
thanks in advance
|
|
|
|
|
When you use OwnerDraw, then you have to draw everything you want to see yourself,
including shortcuts.
Obviously you would still want to set the Shortcut property itself so it remains operational.
|
|
|
|
|
yeah i thought id have to but how can i do that?
after i draw the menuitem i did this
menuItem3.Shortcut = Shortcut.CtrlV;
menuItem3.ShowShortcut = true;
obviously that wasnt enough
so how can i do it???
thanks in advance
|
|
|
|
|
Hi,
use the same way you do the menu text itself, call Graphics.DrawString using a font, a color and a position of your choice.
|
|
|
|
|
and that would make it operational too? because the other problem is that it doesnt work when i do Crtl + S, it doesnt do anything
thanks i will give it a try hopefully i dont return here in a few minutes
modified on Friday, December 26, 2008 11:06 AM
|
|
|
|
|
well i still cant make my shortcut functional
now the text is correct "MenuItem3 Ctrl+S"
but when i set the Shortcut property Shortcut.CrtlS;
the menu starts blinking and still it doesnt work when i press the shortcut keys i set
|
|
|
|
|
hi,
i have a small question..
How can i add and access a ComboBox in dataGridView..
i means,how can i add new Lines in these ComboBoxes and check which line is selected?
thank you
G.
|
|
|
|
|
Admin887 wrote: how can i add new Lines in these ComboBoxes
You find the correct column from the datagridview's columns[^] collection (which is an instance of DataGridViewComboBoxColumn). Then on DataGridViewComboBoxColumn you have Items[^] collection or DataSource[^].
Admin887 wrote: check which line is selected
Through the Value[^] property.
|
|
|
|
|
Thank you!!
i am very appreciate your help
thank you again!
|
|
|
|
|
You're welcome
|
|
|
|
|
Ok, So I made Dlls in C# in the past but whenever I wanted to use those in another project it has to be in the same place as the .exe, I was wondering if I could story all my dll's in a separate folder from the .exe and still have the program work?
Thanks.
|
|
|
|
|
You need to subscribe to AssemblyResolve event of Appdomain class.
|
|
|
|
|
If you have strong-named assemblies (strong name consists of assembly name, version number, culture information, as well as, a public key and a digital signature) you can register them in GAC.
A couple of links to start from:
Global Assembly Cache[^]
Strong-Named Assemblies[^]
Regards,
Lev
|
|
|
|
|
Hello everyone,
I am not sure whether it is possible to setup a security policy like this with store procedure. The user account foo could only access database through store procedure, not possible to do other operations, like select/update on the tables of the database directly without using the store procedure.
My store procedure is doing some select/update job. My confusion is, as the user needs to use the store procedure and the store procedure is doing select/update job, then I have to grant the user to have select/update privilege of the database tables? Then the user could skip using the store procedure and select/update database tables directly which causes a security hole. My purpose is to let user use store procedure all the time, no walk around to access database without using store procedure.
Any advice to solve my probleme?
thanks in advance,
George
|
|
|
|
|
As long as security concerned a application users sql account should only have the execute permission on stored procedures and should not have any permission on tables. İf you gave the user execute permission there is no need to give specific permission on objects(tabkes views ets) that sp uses.
|
|
|
|
|
Thanks Tamer!
I have tested your idea. But met with a issue.
I created a new user which is using SQL Server authentication type. The user default database is AdventureWorks. I grant the user rights of execute one store procedure of AdventureWorks (the store procedure is used to query some specific table) and denied the select rights of the user to select the specific table directly (using table, permission, deny select permission in management sonsole).
But when I tried to use the user to login the management console (in order to test with execution of the store procedure and the select statement), I met with the following error when click login from management console. Do you have any ideas why?
TITLE: Connect to Server
------------------------------
Cannot connect to ..
------------------------------
ADDITIONAL INFORMATION:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
regards,
George
|
|
|
|
|
i would like to be able to use multiple components in one place like tabs allow you to layer things and show when u click the tab open. i would like to do this without tabs instead using buttons. i have tried using usercontrol but i couldnt get it to go. if someone could lead me to an example of help me out in some way it would be greatly appreciated. thanks. callum
|
|
|
|
|
The natural way to do is it via the TabControl.
If you want to use buttons however, then one idea is putting buttons where you want your tabs to be, and use them to show or hide panels that are the different components you need...
|
|
|
|
|
is there any way to have a base panel in my main form then somehow import seperately made panels with all the components as everytime i have tried to use panels i end up droping them within each other. or to simply remove all the border and tabs from tab control?. btw thanks for the fast reply
got it (finally)
UserControl g = new UserControl1();
panel1.Controls.Clear();
panel1.Controls.Add(g);
g.Dock = DockStyle.Fill;
it always ends up being bugger all code -.-
modified on Friday, December 26, 2008 8:25 AM
|
|
|
|