foreach (DataGridViewColumn col in dgRptSpdList.Columns) col.Width = 120; Greetings Kaine
KaineDunno
Posts
-
How to set Column size to DataGrid Column? -
Problems with opening Child Window in MDItry resizing your forms in design time. think that could help... i dont see anything wrong in the posted code. Greetings
-
Deleting words from stringDo you mean something like this? Regex.Replace(statementString, @"\[|dbo].|\]", ""); instead of the function Greetings Kaine
-
Single instance over a local area networki think the easyest way is to create a dummy file somewhere on the network (accessable to everybody) when your app starts. and delete when app closes. in startup of your app, check for existens of that file (File.Exists) Hope this helps Kaine
-
Deleting words from stringwhat you could do is keep it simple :) use string.Replace. ex: string x = "This is a test,test"; string y = x.Replace("test",""); Console.WriteLine(y); output should look like "This is a , " have fun Kaine
-
Locking windows desktopjust catch the keydown events greetings
-
Frames in HTMLHi, Try this hope this helps. Greetings Kaine
-
MSBuild unable to compile a project in a solution file, if project name contain dot "."Didnt know that last part... Thanks for the update Greetings, Kaine
-
DataGridViewHi, You could code the following
private void dataGridView1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) e.Handled = true; }
Hopes this helps... Greetings Kaine -
MSBuild unable to compile a project in a solution file, if project name contain dot "."hi, It should read smth like /t:Rebuild or /t:Compile or /t:Rebuild;Compile. Greetings Kaine
-
events and remotingHi, Just happened to see that same error yesterday... check out this link http://www.codeproject.com/useritems/RemotingEvent.asp Section solution 2. When you implement a wrapper class which can be accessed from both client and server side you app should work Greetings Kaine
-
open a file from web server in windows applicationHi, import system.Diagnostics and try with Process.Start("Applicationlocation fileToOpen") Greetings Kaine
-
HourglassSomthing like this maybe?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' save the old cursor Cursor oldCursor = Me.Cursor; ' change the cursor to the one you want Me.Cursor = Cursors.WaitCursor ' do your work here ' restore the old cursor or else you may never get it back Me.Cursor = oldCursor End Sub
-
SQL: getting and storing dataGlen, You only get the first table because you're using the executeScalar method. To get what you want you need to use the executeReader. Your code would thus be smth like: SqlConnection connection = new SqlConnection(connectionString); string command = "Select name From sysobjects where type ='U'"; SqlCommand getTableList = new SqlCommand(command, connection); myConnection.Open(); SqlDataReader reader = getTableList.ExecuteReader(CommandBehavior.CloseConnection); List tables=new List(); while(reader.Read()) { tables.Add(reader.GetString(0)); } reader.Close(); //Implicitly closes the connection because CommandBehavior.CloseConnection was specified. This should get you the list. Greeting Kaine