|
Hey all,
I want to add the the template columns in my Winforms Datagrid
But know the concept behind this.(as new to vb.net)
I have add a Datetimepicker control in 2nd column of datagrid
& ComboBox(MultiColumn) in the 3rd Column of the datagrid
How to add the other Controls in datagrid Columns
Any COde Source , sample link about the Datagrid are welcome
Thanks a lot for this help
Hema Chaudhry
|
|
|
|
|
Hello,
How to add row and columns dynamically to table control and assign database data to the table control.plz help me inthis regard
Thnaks & Regards,
Nagalakshmi
|
|
|
|
|
If you assign a data source to a datagrid, it will generate the rows and columns from the source when you databind.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
My application assigns a datasource and datamember to a combobox in a datagridview based on the selection from another combobox in the grid. Everything is fine until the datasource is changed. If any previous selection is not in this datasource it disappears. It will become visible when a datsource has it as a member. My source is the new tableadapter which contains several differnt queries to choose from.
My question is how can I keep the selections visible when the datsource changes. Even if I save it to the base table it will not show up until the value is a meember in a datasource.
DavidM
|
|
|
|
|
how can I change Datagrid cell Color based on Value
that value is not visible for user
like:
in datagrid display name of staff and staff_id
and when is job ="manger"
the cell of name (only) is change color to red
and when job ="dector"
the cell of name (only) is change color to green
>>>>> when user look only name
understand job of staff
* staff_id is not change color
the datagrid is Windows Application DataGrid
and the languge is VB.Net
thank for all
|
|
|
|
|
Hi,
there is no direct way to do this. You will have to make it yourself:
1. Derive a new class from DataGridTextBoxColumn
2. Override the paint function (the one with the most parameters)
3. Get the value with function GetColumnValueAtRow
4. Choose a color depending on the value
5. Call the paint function in the base class with your choosen background color
6. Use this new column style in your table style instead of the normal DataGridTextBoxColumn (naturally only in those columns where you wish to change the color)
|
|
|
|
|
|
i cant use vb express, look:
Error
i never see anybody with this problem
i try many things to solve the problem:
uninstall eveything about framework (SDK 1.1, vb.net 2003, and others)
clean the registry after this, but no success
id like a help, tks
|
|
|
|
|
Ok this may sound stupid but do you have debug rights in windows. You can't start the debugger unless you are administrator or have been added to the 'Visual Studio Debuggers' group in the user management of windows.
|
|
|
|
|
|
|
Right-Click MyComputer on your desktop. Click on Manage. In the window that opens up, double-click Local Users and Groups on the left. Open the Groups folder. You should find the Visual Studio Debuggers group. Double-Click that. If you're Username is not in this list, you can't launch the debugger. Simply add yourself to this group to give yoursefl debuggin rights.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
no, its allright there, im becoming crazy with this ~~~~~
|
|
|
|
|
|
Well, you can start sifting through this[^] list of articles on MSDN to try an narrow down the problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
tks a lot for your help man =)
|
|
|
|
|
|
Hi,
I'm fairly new to VB.Net and Windows Forms in general, and I stumbled upon a problem I can't solve.
I have this datagrid that displays various customer information. When the user clicks on a certain cell in my datagrid, I want it to select the entire row instead of one cell. Even more important: It needs to retrieve the value of the first cell of that row, which is an ID number. (This, because I want to store this value in a variable and update it to a different table)
I already know how to get the value of a selected cell by using DataGrid1.Item(DataGrid1.CurrentCell), but how do I get the value of the first cell instead? And how do I select an entire row when the user clicks one cell?
Does anybody have any idea how to do this?
Thanks!
--Erwin
-- modified at 7:43 Thursday 22nd December, 2005
|
|
|
|
|
|
Hey Erwin,
You can Use the Datagrid MouseUp Event for capture the selected value
as follows:
Private Sub DGGuest_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DGGuest.MouseUp<br />
Dim mygrid As DataGrid = CType(sender, DataGrid)<br />
Dim htiUsers As DataGrid.HitTestInfo = mygrid.HitTest(e.X, e.Y)<br />
Dim strID As String<br />
Dim iSelectedRow As Integer<br />
<br />
Select Case htiUsers.Type<br />
Case DataGrid.HitTestType.RowHeader<br />
iSelectedRow = htiUsers.Row<br />
Me.DGGuest.Select(iSelectedRow)<br />
strID = Me.DGGuest.Item(iSelectedRow, 0)<br />
MsgBox(strID)<br />
End Select<br />
<br />
End Sub
This will give the value of the 0th column cell
In this case this GuestID
Hope This works
If any doubt then mail me.
Hema Chaudhry
|
|
|
|
|
Thank you, both! My problem has been solved.
--Erwin
|
|
|
|
|
hello sir,
we r developing a project in vb.net,here by kindly request you to give some examples in using some of the controls to convert text to speech using text-to-speech controls.
prakash
|
|
|
|
|
You can use AccessibleName and AccessibleDescription properties of a control to utilize Windows' text-to-speech engine to read a description of the control. But I'm not sure if this is what you asked for?
--Erwin
|
|
|
|
|
Very easy -> Click[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
that is really easy. I just tried it here. takes less than 5 minutes to start speaking input from a textbox...cool
now to figure out how to use this new hammer
/jason
|
|
|
|