Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Databinding With View
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00791177
Message ID:
00792633
Views:
21
Hi Mufi,

To databind to a DataView, do the following:
Dim IsoKiwi As New SqlConnection(ConnectionString)
Dim EmployeeView as DataView
Dim ProductAdapter As New SqlDataAdapter("select * from employee", IsoKiwi)
ProductAdapter.Fill(DsEmployee,"Employee")
EmployeeView = New DataView(DsEmployee.Tables("Employee")

TxtNo.DataBindings.Add("Text", EmployeeView, "Empno")
TxtName.DataBindings.Add("Text",EmployeeView, "Empname")
TxtAddress.DataBindings.Add("Text", EmployeeView, "address")
TxtCity.DataBindings.Add("Text", EmployeeView, "city")
TxtPhone.DataBindings.Add("Text", EmployeeView, "ph")
TxtState.DataBindings.Add("Text", EmployeeView, "state")
TxtCountry.DataBindings.Add("Text", EmployeeView, "country")
>Hi Everybody,
>
>I am using DataView for binding to navigation data. I don't ,is't possible .
>
>Dim IsoKiwi As New SqlConnection(ConnectionString)
>Dim View as String
>View = "EmployeeView"
>
> Dim ProductAdapter As New SqlDataAdapter(View, IsoKiwi)
> ProductAdapter.Fill(DsEmployee.EmployeeView)
>TxtNo.DataBindings.Add("Text", DsEmployee, "Employeeview.Empno")
>TxtName.DataBindings.Add("Text",DsEmployee, "EmployeeView.Empname")
>TxtAddress.DataBindings.Add("Text", DsEmployee, "EmployeeView.address")
>TxtCity.DataBindings.Add("Text", DsEmployee, "EmployeeView.city")
>TxtPhone.DataBindings.Add("Text", DsEmployee, "EmployeeView.ph")
>TxtState.DataBindings.Add("Text", DsEmployee, "EmployeeView.state")
>TxtCountry.DataBindings.Add("Text", DsEmployee, "EmployeeView.country")
>
>...
>......
>....
> AddHandler Me
> AddressOf
>
>Thanks
>Pls Advice Me
>
>Thanks
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform