|
hello dear,
you can add one column in country table and one coulmn in city table the name of column may be "ExamineId" in both ethe tables then in country table put integer value(1,2,3,4,5.....) for every country in "ExamineId" column.and put the corresponding number for cities in city table.
like in country table
ExamineId country
1 country1
2 country2
in city table
ExamineId city country
1 abc country1
1 xyz country1
1 wpg country1
2 ghf country2
2 yhk country2
2 poi country2
select ExaminId from country table for selectes country and take it in one string type variable say "EId".
then make query for combobox2 as
select * from city where ExamineId = EId
and put all the data in combobox2.
hope it'll help u....
sandy
|
|
|
|
|
thank you
|
|
|
|
|
This seems a ridiculous idea to solve this kind of problem- "Changing backend to render UI" !! Crazy!!!
This should be very simple one...You better do a "Google" with the search keyword- "IsSynchronizeCurrentItem in WPF" rather changing the database schema.
sdixit110 wrote: you can add one column in country table and one coulmn in city table the name of column may be "ExamineId" in both
I am wondering how people find solutions like this...BAD SOLUTIONS!!!
Moim Hossain
R&D Project Manager
BlueCielo ECM Solutions BV
|
|
|
|
|
|
This is the general logic:
<StackPanel Orientation="Horizontal" DataContext="{Binding Source={StaticResource mySource}}">
<ComboBox ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True" />
<ComboBox ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True" />
</StackPanel> Obviously, you need to put your binding source into the context, and the paths you want to work with (plus any item templates you see fit), but this should get you started.
|
|
|
|
|
how can i resolve this problem in xaml file when ever i try to add
<grid> --- error (element expected...)
umerumerumer
|
|
|
|
|
Provide the expected element!
Seriously, a code sample would really help us help you.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Please post your XAML code.
|
|
|
|
|
Binding a property to a setting worked:
<Window x:Class="test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prop="clr-namespace:GTOWPF"
Height="{Binding Source={x:Static prop:Settings.Default}, Path=Win1H}"
Width="300">
Binding a property inside a datatemplate:
<Window x:Class="test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prop="clr-namespace:GTOWPF"
Height="100"
Width="300">
<Window.Resources>
<DataTemplate x:Key="Test">
<Grid Height="{Binding Source={x:Static prop:Settings.Default}, Path=Win1H}">
</Grid>
</DataTemplate>
</Window.Resources>
</Window>
Doesn't work,
Only public classes can be used in markup. 'Settings' type is not public.
Any sugestions?
modified on Wednesday, January 14, 2009 11:15 AM
|
|
|
|
|
|
Thanks,
Default Access Modifier was set to Friend.
|
|
|
|
|
When i pass large amount of data through wcf it gives error of max data
Please tell how to solve this
|
|
|
|
|
Increase the maxReceivedMessageSize on the binding.
|
|
|
|
|
I keep getting the following message:
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='#FF646464'; ResourceKey.HashCode='47980820'; ResourceKey.Type='System.Windows.Media.SolidColorBrush'
How do I find out what is causing that?
|
|
|
|
|
Did you figure this out yet?
Just a wild guess, but that "ResourceKey='#FF646464'" looks like
an ARGB color associated with a ResourceKey somehow - maybe some
malformed XAML defining a brush somewhere...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
While working on a WPF app, I thought I should try and be proper, and honour the color scheme on the host system, rather than inflicting my idea of colors on to the user, and I got this error too.
I was making a ListView control template that adds a border, and hence I started to add "IsSelected" triggers to highlight focused items. The color values I used were things like:
{DynamicResource {x:Static SystemColors.HighlightColor}}
{DynamicResource {x:Static SystemColors.HighlightTextColor}}
{DynamicResource {x:Static SystemColors.ControlDarkColor}}
If I now run my app, I get a bunch of debug message like
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='#FF000000'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='#FFB2B4BF'
Reverting to hard coded colours removes the problem.
|
|
|
|
|
Hi,
In my WPF application I need to return a collection as return type using a PageFunction. Is it possible? If yes how do I do it?
Thanks & Regards,
Deepak.
|
|
|
|
|
In response to a recent blog entry[^] by Josh Smith where he talks about the default scope of XAML variables, and how to change them to private, I've updated MoXAML PowerToys[^] to automatically search for elements in your XAML with the x:Name attribute set (and without the FieldModifier set). Any matches automatically get x:FieldModifier="private" added to them.
|
|
|
|
|
Yay Pete!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello All!
I'm trying to test a WPF application which displays most of the information using DataTemplates. The problem that I'm facing right now is that data in the template is not visible neither by the UI Automation framework nor by the UISpy tool.
Has anyone seen this behavior?
Suggestions are appreciated.
dimaj
|
|
|
|
|
I am also facing the same problem. Seems 'Project white' or UI Automation framework for WPF is not stabilized. Seems some IBM automation test tool captures events of WPF which UISpy cannot.
|
|
|
|
|
Is it possible to assign a resource to another resource? For example, if I have a SolidColorBrush named MyBursh01, can I make a MyBrush02 that has the same values as MyBrush01, or can I make a Rectangle named Rect2 and make it = Rect1?
I am referring to making it in XAML not C#
Thanks
|
|
|
|
|
You could always use BasedOn to do this when it comes to using one style as a basis for another.
|
|
|
|
|
Hello All,
How can I use the DataGridCell Template with WPF Toolkit Datagrid. I like to create a Cell Template and like to apply that template for all cells.
For example:
<Style or something x:Key="myDGCellTemplate">
<DataTemplate>
<StackPanel>
<Button Content="AA" />
<Textbox Text={Binding .} />
</StackPanel>
</DataTemplate>
</Style or something>
<toolkit:DataGrid x:Name="myDataGrid" ItemSource="{Binding myDataSource}"
CellTempleteORSomething={StaticResource myDGCellTemplate}" AutoGenerateColumns=True>
</toolkit:DataGrid>
#2.
Can I use "." in Binding? As the column will be generated dynamically based on the Data Source, I don't know the column name. So, I want to set whatever column that I got to the textbox.
Thanks in advance.
<Textbox Text={Binding .} />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
|
|
|
|
|
Is it just me or is anyone else very much dismayed at the lack of real line of business capabilities of WPF?
I am producing a line of business app, which early on was decided to use WPF. Admitedly this was partly my decision, because the client needed a windows solution; my background was ASP.Net development so I thought the nearest thing would be to use WPF. Having been around for a few years I never dreamt that it would be so poor.
I have hit so many stumbling blocks along the way. Working for a small client, in the middle of a recesion, they do not have the budget to purchase every third party tool and utility, so I have had to work with what Microsoft makes available in .Net.
Firstly, I got hit with the Datagrid. Not being released until late October, i still get an error trying to add a combobox to it. I am waiting for version 2. the (free) Xceed grid is not much better, with its own (different) set of inadequecies.
Now, I thought that any line of business application would require some sort of output. I need to produce invloices. The requirement is that one or more invoice is printed at one time; each one consists of a customer, seller brand, page header, items, and sub totals, etc. (typical invoice stuff). There seems to be no reporting mechnism in WPF. I have tried Crystal, but apart from hating their run-time deployment issues, and the fact that it doesnt seem to work with LINQ, I am at a stumbling block there. I have tried RDLC in VS 2008. Fortunatly that works with LINQ, but the designer seems very weak, and the functionality of the whole thing is not a patch on Crystal (I hate to say). I have considered building XAML but I need to export to Excel, and have page headers. I am at a loss and the sh-- it about to hit the fan.
Is this just me being stupid? Because WPF seems great at funky, good looking demo applications; but not true line of business apps?
Cheers
|
|
|
|