|
thank u Christian Graus, but what i want that the combobox outside the datagrid, it is a kind of filter.
select a value from comboBox for its details to be viewed in the datagrid
srour_costavo@hotmail.com
|
|
|
|
|
Oh, OK. That's even easier. You just handle the index changed event on the combo, and run fresh SQL to fill the grid based on the selection. The combobox lets you store a value that's associated with each string entry, so you can hide the Id you need in there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
ok man but the real problem is in the syntax, the concept is understood,
the help I need is syntax help would u do that
srour_costavo@hotmail.com
|
|
|
|
|
To be honest, I can't. How are you accessing your database ? What sort of database is it ? What value do you want to use to select your values ? What is your database schema ? I can't provide more direct help without all of that info, and if you can't do it, I'm wondering which bit you're stuck on ? Can you access your database at all ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
''The SQL select Command
Private Sub conn()
dt = ProfileDAO.ExecuteStrDt("SELECT [ComputerName], [Comming], [Leaving], [TotalTime], [IncludeTotalTime], [OverTime],[overtimeckh] FROM [HR].[dbo].[WorkingHours] )
DGtimeS.DataSource = dt
End Sub
' I am Accessing the db without problems
' the comboBox is also connected to db and retriving data without problems
Private Sub ttt1()
Dim FullName1 As String
Dim i As Integer
dt = ProfileDAO.ExecuteStrDt("Select EmployeeID, FirstName, fatherName, LastName from Employees order by FirstName")
Me.CmbEmployees.Items.Clear()
With CmbEmployees
For i = 0 To dt.Rows.Count - 1
FullName1 = dt.Rows(i)(1) & " " & dt.Rows(i)(2) & " " & dt.Rows(i)(3)
.Items.Add(New Mylist(FullName1, dt.Rows(i)(0)))
Next
End With
End Sub
'what i want is to connect the combo box and the data grid
'vb 2003 & sql 2000
is that possible
& if u give me ur email i may send u code of the app
|
|
|
|
|
OK, so you have the employee Id in your combobox item. Now, pull it out of there when a selection is made, and write your SQL with a where clause that uses this Id to get only the data you need, and bind it to your grid.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I know that i am disturbing a lot, and i understood the concept very well but the real problem is that I DONT KNOW THE SYSNTAX to do what u are saying.
my demand is the sentax bro.
is that possible?
srour_costavo@hotmail.com
|
|
|
|
|
TWo things
1 - no way do I give out my email address
2 - I cannot give you exact syntax. Like I told you, unless I see the schema of the DB, I don't know what it is. Why can't you work out the syntax ? Is it the SQL that you have trouble with ? b/c the data access code doesn't really change.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
please move my posts to vb.net forum if this is not the vb.net forum
|
|
|
|
|
I can't insert row in excel,who can use vb.net realize!Please tell
me,If any one have time can more about poeration Excel,Thanx!
jeam
|
|
|
|
|
Microsoft have an Office toolkit you can install to control later versions of Office with .NET code. Your code will only work on machines that have office installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanx,but I want to know how vb.net to do it not with office toolkit?
|
|
|
|
|
OK, then the answer is you really can't, not unless you write a program that is fully able to read the XLS file format. Unless you work only with the new Office 2007 format, which is just a zip full of XML, I'm sure that's easy to add to.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i need a way to deal with a number that is 320 digits long. Whats more, it needs to be an integer, not a decimal. how would i go about working with such large numbers, dividing, adding subtracting, etc. I have tried Long, Decimal and Double but none of them are long enough.
Posted by The ANZAC
|
|
|
|
|
There is no type that handles numbers remotely that long. You'd have to write your own class, to handle a type like this, or look for one online. Do you need all 320 digits to be accurate ? If you only need accuracy to a certain number of digits, you can always assume the rest are 0s.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hi, Could ayone give me the simple sample code for datagrid.
I need to fill the datagrid dynamically, also thers syould also be able to have chekbox.
Be simple and Be sample.
|
|
|
|
|
Just add a checkbox in a column definition. There are heaps of samples here and elsewhere on the web.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi,
in my project i want to display report on a btn click.
i did it as
cryRpt1.connect=(connection string)
i am getting an error incorrect log on parameters.
please tell me the correct syntex for this connection. my server is sql server and database is sql server datebase and both r on same machine.
|
|
|
|
|
hi,
there are two tables
table name PROJECT_CATEGORY
fields PROJECT_CAT VARCHAR(3) PRIMARY KEY
CAT_ACTIVE VARCHAR(1)
table name PROJECT_DETAILS
PROJECT_CODE VARCHAR(6) PRIMARY KEY
PROJECT_CAT VARCHAR(3) REFERENCE PROJECT_CATEGORY(PROJECT_CAT)
In a form to fill project details i have used DATAGRID. to fill project category i want categories from table PROJECT_CATEGORY to be listed in datagrid cell with button (dropdown).
PLEASE HELP. thanks.
-- modified at 0:13 Saturday 10th February, 2007
|
|
|
|
|
Hello guys
I am reading values from a table from a DB
what i want is to color the BackColor of the row for specific values
exemple :
if row1 at column("columname") ="xxx" --- color row1 in blue
if row1 at column("columnname") ="yyy" --- color row1 in yellow
and dont change the color of the other row
Regards
Ramy
|
|
|
|
|
Hello,
Try the DataGridView_CellFormatting method.
You can specify some rowdetails like ForeColor, BackColor, etc. depending on the value of the cell.
Good luck!
Jan
|
|
|
|
|
Hello!
I am using VB.Net 2005 and I would like to know if there is way to define an array for a single label or picturebox object at design time.
Thanks!
Bedri
|
|
|
|
|
What do you want ? What sort of array do you mean ? An array of pixels ? Of letters ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My aim is to store the letters in two dimensional array. The array must be a label object so I can easily place pictures behind of these labels also. I have 10 rows and 8 columns in each row. It is a simple matrix but must be made by label objects.
If I do this internally (nor at design time), How I could write AdHandlers for each specific label object to check if it is selected or clicked.
Thanks a lot!
|
|
|
|