|
thank you very much for your help !!!
really thanks a lot !!!
Bryan
|
|
|
|
|
Sample Grid Image[^]
I'm looking to create the above sample using a datagridview. I'll be creating the grid at run-time and will have different time increaments for each grid. The row header with the (times) will be frozen and need to scroll with the grid. I'm thinking I'll need to us 2 grids side-by-side and link the scrolling events. But I'd like the forums input on it and if anyone has any differnet solutions. Thanks!
|
|
|
|
|
Can anybody help me? I am filling a datagrid with a file. one on the columns is currency (dollar and cents). I fcan convert the column to always create the cents (preferred) and the access DB shows ($1.00), but when I fill the datagrid is shows (1) and (7.93). I want to show ($1.00 and $7.93)
Thanks
silver-gray
|
|
|
|
|
FormatCurrency(columnVariable, 2)
FormatCurrency("1", 2) = $1.00
FormatCurrency("7.93", 2) = $7.93
|
|
|
|
|
I'm new to VB.NET and I'm trying to validate the input from a Textbox control to ensure no text is entered in the control.
How can I test the values entered are numerical instead of everything else (ie: string)?
|
|
|
|
|
The following will test to see if a textBox contains a non-numeric value:
If Not IsNumeric(txtTextBox.Text) Then
'do whatever you want to do after an invalid type is entered
End IF
Nate Lindley, .NET Aficionado
|
|
|
|
|
Thank you so much!
|
|
|
|
|
Hi - We have an interface which call a stored proc, sends in input parameters which in turn then inserts into the table.
This sp by itself, exec "sp name", runs for 6 minutes, don't ask, it is a huge dB!! I have set a command timeout of 400 seconds and my interface still comes back with a timeout issue.
Is there anything else we could set?
Thanks!
|
|
|
|
|
I'm sure you've already tried but I would suggest putting it at 500; maybe it takes a little more than 6 minutes? Otherwise it shouldn't time out... let me know if you've tried that, and i'll look into it a little more.
Nate Lindley, .NET Aficionado
|
|
|
|
|
Yes - I have tried that as well, setting it to 500.
Exact Error Message: system.data.sqlclient.sqlexception: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Right now only changing the Command timeout property - should we change the commandtimeout for connection object as well?
thanks.
|
|
|
|
|
Yes, you can do that. But, 6 minutes is a LONG time to wait for a command. I would recommend seting this up and running the SP without waiting for any return values. You can use SQL Server's Notification Services if you want something returned.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
What do you mean - like a task?
I have a message - after the user clicks submit button to upload the data, it comes back with "successful" message.
You mean something that runs in the background? How would they know if it was successful?
Thanks.
|
|
|
|
|
SQL Server support sending COM-based notifications back to registered clients. For SQL Server 2000, you have to install Notification Services seperately. For 2005, SQL Server comes with it.
Notification Services[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi - solved this by setting the command timeout to 0 - this implies unlimited - the customer doesn't mind waiting how ever long it takes - as long as it is done successfully.
Thanks.
|
|
|
|
|
6 minutes?? Wait until there's more data in there. 6 minutes will be an eternity to wait. I would have long since thought the app failed by then.
But, I'm not bashing you at all!! Sometimes the customer just doesn't know what they're getting into...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey,
My question, if you couldn't already guess, has to deal with the .NET BindingNavigator. I'm using it to sort through some records and thats all fine and dandy. But my question is, when I am trying to search for a record based on its PK, is there an easy way to do it via the BindingNavigator? Or do I have to open a connection, fill a new dataset, and search for the pk via data table/data row access? Anyone who has used the BN for this purpose, or anyone who just wants to comment on the situation, let me know what you think and it will be much appreciated.
Thanks!
Nate Lindley, .NET Aficionado
|
|
|
|
|
The BindingNavigator doens't expose any method of searching, so no, it's really not cut out for this. You're best method is to get the PK, open a new connection and fill a dataset with a query specific for returning records with that PK.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I am facing a problem in key event handler for datagrid textbox cells. The event is fired for all the function key presses except for F2 and F5 keys. Any ideas or pointers are welcome.
Thanks,
Neo
|
|
|
|
|
F2 is reserved by the DataGridView to trigger editing whichever cell is currently selected. Change the DGV's EditMode property if you want to use this key for something else.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks...
But we are using dotnet 1.1. I guess this editmode feature is not available in 1.1... Is there any other alternative to make this work?
|
|
|
|
|
Not as far as I can tell. F2 is still reserved for the DataGrid. Keyboard shortcuts for DataGrid[^].
The keys are being handled by the DataGrid control before they're getting to the grid's TextBox. That's why you can't see them in that handler.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir,
can i find out whether the database sqlserver is installed on the machine before making the connection.
Thanks
|
|
|
|
|
On which machine? The local machine you application is running on, or on the remote server you're trying to connect to?
In either case, there's alot that can go wrong, other than not being installed, with trying to connect to an SQL Server, so I fail to see what the advantage of seeing if it's installed gives you.
Sure, it can be installed, but is it running? Is there a network path to the server? Is there a firewall in the way, blocking access? Is the database you're trying to connect to available? ...?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
kindly help in fixing the code below
Dim dprinters As Printer<br />
For Each dprinters In Printers<br />
Printer.Print dprinters.DeviceName; " on "; dprinters.Port<br />
Next dprinters<br />
Dim a As Integer<br />
Dim b As Integer<br />
a = 5<br />
b = 7<br />
Dim s As String<br />
s = "are figures"<br />
Printer.Print a; Spc(1); b; Spc(1); s
when the code was placed in form_load it printed but when moved to the cmdprint_click it did not load.
how can I print from clicking a command button
Also how can I specify the size of the paper I want to use because i want to use a custom paper to print.
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
The code should work just fine. It doesn't matter which event handler you put it in.
To change the paper size, all you have to do is set the Height and Width propeties of the Printer object:
Printer.Height = paper height in twips
Printer.Width = paper width in twips
where 1" = 1440 twips.
Printer and Printers documentation[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|