|
|
Thanks Jason!
Kwab is not a solution for me. I need to have the full source code in VB.net. There are some written in C++ but I do not have any knowledge about C++ language.
If youcome cross it to somewhere would you please let me know because it has been over 5 days I couldn't find a sample code of it in VB.net
The life is an unknown cirle and we are the dot in it!
|
|
|
|
|
Hello
Eery one know the Address Bar for the internet explorer, it's like a combobox but with additional features(if the address is writen before, it shows you down,the scrollbar didn't appear only if the choice is more than 5), so how can i do the sam in VB.Net 2003.
With my best regard;)
Assaf
|
|
|
|
|
Not sure if this is what you're after, but this[^] is a good article on shell autocompletion (its C#, but a class library, so shouldn't matter). Maybe that will help.
Cheers,
Will H
|
|
|
|
|
I'm using the DataAdapter & the DataSet without using the wizard, but the problem that occured with me that i can't display the content of the Database in the appropriate textbox and combobox.
knowing that i verify if the connection is well established and the dataset contain the right data.
with my best regard;)
Assaf
|
|
|
|
|
Hey, If you are using the dataset then you can access individual field of the dataset using the row and column no. Please explain that exact problem that you are having.
With Best Regards,
Mayur
|
|
|
|
|
My problem is that i can't display the data in the appropriate textbox & combobox in the forme
Notice that the data is in the dataset.
Assaf
|
|
|
|
|
To set a textbox to have a value from a dataset use:
TextBox1.Text = dsData.Tables(0).Rows(0).Item("ColumnName").ToString
This is to get a specific value out of the dataset. You can also use the textbox.databinding property
To set values in a combobox:
<br />
ComboBox1.DataSource = dsData.Tables(0)<br />
ComboBox1.DisplayMember = "Name of Column to DISPLAY"<br />
ComboBox1.ValueMember = "VALUE of the Column"<br />
You would then have to set the selected item of the combobox to be the current record's.
Is this the information you were after?
/jason
|
|
|
|
|
I try this code before but it didn't show the data either in textbox or in combobox?
Assaf
|
|
|
|
|
show me the code you tried, and I will try and help you work out what is going wrong, or someone else will :->
/jason
|
|
|
|
|
Is your code running in a separate thread?
-Jason
|
|
|
|
|
Private Sub Mouch_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Querry As String
Querry = "select * from mouchtarayat"
'the trial function take commandText, this function contain all the needed value to establish the connection.
trial(Querry)
'Dataset=ds
ds.Clear()
'DataAdapter=daM
daM.SelectCommand = cmd
Try
cnn.Open()
Catch ex As Exception
Finally
MessageBox.Show(cnn.State)
End Try
'fill the data into the appropriate place
daM.Fill(ds, "Mouch")
End Sub
Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged
'TextBox5.Text = ds.Tables(0).Rows(0).Item("التاريخ").ToString
TextBox5.DataBindings.Add("text", ds, "Mouch.")
'the two way didn't work
End Sub
Private Sub cmbNaw_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Naw.SelectedIndexChanged
cmbNaw.DataSource = ds.Tables("Mouch")
cmbNaw.DisplayMember = "النوع"
'Me.cmbNaw.DataBindings.Add("text", ds, "Mouch.النوع")
'the two way didn't work
End Sub
Thanks a lot in advance
Assaf
|
|
|
|
|
Assaf82 wrote:
TextBox5.DataBindings.Add("text", ds, "Mouch.")
Try this...
TextBox5.Text = ds.Tables(0).Rows(0).Item("التاريخ").ToString
TextBox5.DataBindings.Add("Text", ds.Tables("Mouch"), "التاريخ")
I am assuming that "التاريخ" is an Item of the Table "Mouch"
-Jason
|
|
|
|
|
Yes "التاريخ" is an Item of The Table "Mouch"
but the statment you just give me didn't work.
and to be sure that the dataset contain the appropriate table with the appropriate column i put some message to give the data inside:
Dim dt As DataTable
For Each dt In ds.Tables
'msgbox(dt.tablename)
Next
Dim dc As DataColumn
For Each dc In ds.Tables("mouch").Columns
MsgBox(dc.ColumnName)
Next
Dim drw As DataRow
For Each drw In ds.Tables("mouch").Rows
MsgBox(drw(1))
MsgBox(drw(2))
MsgBox(drw(3))
Next()
and all give me the right data
with my best regards
Assaf
|
|
|
|
|
The code I posted should work for your databinding.
If not, the only other thing I can think of is it dont like the Characters التاريخ . Try replacing them characters with the actual integer index of the column if you know what that would be.
-Jason
|
|
|
|
|
I go far,and i change all the database to an English one but no satisfied result, (i think if it's not written in english it cause trouble).
also i put instead of the name of the field his number, nothing different.
The think that make me confused in this problem that there no one give a real example about using this features without using the wizard to create the adapter,connection and the dataset, and if you try this using the wizard it done well.
With my best regards
Assaf
|
|
|
|
|
I want to validate a text box, that it only accept the numeric characters on key press/key down event. I dont want message boxes when any alpha character press.
Muhammad Ali Ghauri
ABN AMRO Bank N.V. - Pakistan
|
|
|
|
|
you need to handle your textbox's keyboard events, either keydown , keyup or keypress . Then check the contents of the textbox and delete any characters you don't want.
make sure you set the maxlength property because otherwise this will take some time
/jason
|
|
|
|
|
Can you please specify how this can be done. Sample code will be very useful.
With Best Regards,
Mayur
|
|
|
|
|
you can handle as follows
add keypress event to the textbox and add following code
If Char.IsNumber(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
end if
happy programming
|
|
|
|
|
how i can change a default keyboard language input for specific column in a datagrid automatically??
|
|
|
|
|
Hello Friends,
Here i want to do mirror the contents in the group Box.As for arabic layuout all the contents must be right to left displayed.
Thanks in Advance.
Vipul Khandelwal
Some people dream of success while others wake up and work hard at it
|
|
|
|
|
I am affraid there isn't a single statement to solve this issue but probably as you know you can set the content's text alignment to right or to left one by one as follows:
Label1.textalign = contentalignment.middleleft
Never give up!
|
|
|
|
|
HI,
I am stuck with a problem that how to display an image in the datagridviewimagecolumn
As when i m trying it shows a X mark. Not the Image
My Code is:
Dim ArrowIcon As New Icon("..\Images\Icon1.ico")
Dim IconColumn1 As New DataGridViewImageColumn
Dim IconColumn2 As New DataGridViewImageColumn
IconColumn1.ImageLayout = DataGridViewImageCellLayout.Normal
IconColumn1.Image = ArrowIcon.ToBitmap
IconColumn2.ImageLayout = DataGridViewImageCellLayout.Normal
IconColumn2.Image = ArrowIcon.ToBitmap
Me.DataGridView1.Columns.Insert(0, IconColumn1)
Me.DataGridView1.Columns.Insert(1, IconColumn2)
I don't know why it is not showing the image
Plz help me
Thanks a lot in advance
Hema Chaudhry
|
|
|
|
|
Hello again,
Need help on this code. Im using Flexgrid control the .net version... dont know what to do about this one.. it produce an error stating "Index was outside the bounds of the array...
For intCount = 0 To 10
grid1.Cell(0, intCount).Text = "Hello"
Next
But when i tried it this way.. ( grid1.cell(0,1).text = "Hello" );).. this works... but if i used for next it produces error.. pls help...
your help is highly appreciated.............
tnx in advance..
|
|
|
|