Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapping tablestyle's mappingname onto a dataview
Message
From
24/05/2005 10:11:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/05/2005 08:38:56
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01017016
Message ID:
01017056
Views:
17
>Hi all,
>
>How do you get a tablestyle to show the data from a dataview? I can show the data in datagrid by mapping the dataview directly on the datagrid but I cannot figure out how to get a tablestyle to map onto this dataview.
>
>Thanks in advance,
>
>Andrew

Andrew,
To my understanding they don't have a direct relation. One formats 'style' while other 'filters' the data.
IOW you create a DataGridTableStyle for style and a DataView for filter. ie:
//...
DataGridTableStyle tableStyle = new DataGridTableStyle();
tableStyle.MappingName = "customers";
//...
// make the dataGrid use new tablestyle and bind
dataGrid1.TableStyles.Clear();
dataGrid1.TableStyles.Add(tableStyle);

//Add a DataView
DataView dv = new DataView(_dataSet.Tables["customers"]);
dv.RowFilter = "country = 'USA'";
dataGrid1.DataSource = dv;
//...
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform