开发者

multilingual autosuggestion using vb.net

开发者 https://www.devze.com 2023-02-02 02:20 出处:网络
I\'m doing project in vb.net which has multilingual facility.in which one form contain textbox have autosuggestion facility,if i select language marathi at the time of login then the autosuggetsion wa

I'm doing project in vb.net which has multilingual facility.in which one form contain textbox have autosuggestion facility,if i select language marathi at the time of login then the autosuggetsion want to work in marathi for this perticular t开发者_开发问答xtbox. I'm using following code. Then What Code I write for autosuggestion then the dropdown autosuggestion list will disply in marathi language

Public Sub bindCastType()
    ' Me.txtSearchValue.AutoCompleteMode = AutoCompleteMode.Suggest
    Dim objDs As New DataSet
    Dim Cast As New AutoCompleteStringCollection
    Dim objcast As CastManager = New CastManager
    objDs = objcast.GetCastInfoByQuery("", "")

    If Not objDs.Tables(0) Is Nothing Then
        If objDs.Tables(0).Rows.Count > 0 Then
            For Each row As DataRow In objDs.Tables(0).Rows
                Cast.Add(row.Item(1))
            Next
        End If
    End If

    txtCastID.AutoCompleteMode = AutoCompleteMode.Suggest

    txtCastID.AutoCompleteSource = AutoCompleteSource.CustomSource

    txtCastID.AutoCompleteCustomSource = Cast
End Sub

MY Question is: What Code I write for autosuggestion then the dropdown autosuggestion list will disply in marathi language


You add a language-id parameter to your query:

objDs = objcast.GetCastInfoByQuery("", "",LanguageID) 

so it only select rows for the selected language.

0

精彩评论

暂无评论...
验证码 换一张
取 消