|
First of all, what does this have to do with Silverlight or WPF? Secondly, you are looking to the validation at the wrong location - the only place you can effectively do this is at the database end, which will require the validation to be triggered from that side. You have to do it there because of timing issues - suppose you have two people who both enter the identifier Bob and submit it at the same time; they could both very well pass the validation, only to fail the insert because there is now a conflict.
Rakesh Gowda wrote: so shall i expect a answer with a sample..
Third - that's not the way this site works. We generally don't give full samples here - we help to correct code and to suggest things, not write the whole things ourselves.
|
|
|
|
|
Hi,,
Now i need to export the content(Actually map is the content) which is in the WindowsFormsHost using wpf, i need to export and save that pdf in the given path. So colud any one helf to export the map.
Note: i m using Arcgis server, and using mxd file format data for map.
Now i want to export the pdf file,in button click, and the map should come as it is in the WindowsFormsHost control.
Thanks & Regards
M.Asiq Raja
|
|
|
|
|
Hi experts,
can any one tell me how to generate a tree in silverlight based on the data from database.
My table structure is like this
1- Order table contains, partyCode and orderNo.
2- Item table contains, orderNo & ItemCode.
3- Stages table contains, orderNo, itemCode & stageCode
I want to display tree as below:
Tree display
ord1
Item1
stage1
stage2
Item2
stage1
stage2
stage3
Item3
Item4
Item5
Item6
Item7
Item8
Item9
ord2
……
ord3
…….
I am fetching the data from database from three tables.
|
|
|
|
|
This[^] might be useful to you.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Hi!
New to silverlight, i have a problem.
I have created a service to connect to a database and i want to call it many times, the problem is that
string a and string b is executed before the event is triggered?
in the event i have code that catches the result from the service and i want to save it to the string a and then call the same service again and save that result to string b.
but i can't do that if the event isn't triggered each time
any ideas on how to solve?
main(){
serviceclient x = new serviceclient
x.xxx_completed += the event
x.getdataAsync();
string a;
string b;
}
void event ()
{
code to get data
}
modified on Tuesday, January 4, 2011 6:09 AM
|
|
|
|
|
Implement all string saving logic inside the void event() method.
Call the service again after you obtain the result if you have to.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
I am doing some string operations in the event().
but the problem still is:
in the void event () i define 2 dynamic keys (in a property) depending on the input parameter to the service
after i have done this i use the keys in the other method before calling the service again to retrive two other keys.
but the methodcall_x(keys) is executed before the event is triggered
and keys = null so i can't call the service again.
class x {
MAIN{
Servicecall()
methodcall_x(keys)
}
viod the event(){save result to a property}
}
|
|
|
|
|
What you need to do is to use an Action to return to MAIN once event() method is executed.
Move the methodcall_X(keys) in this Action's handler.
For more info on Actions, check out MSDN.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Ok, thanks i will look in to it
|
|
|
|
|
Hi experts,
I have a small projects based on MVVM. I am using tree view control but I am unable to fire a command when a treeview node is selected. My command is declared in a ViewModel.cs file, command is defined in Command.cs file. the command is being called in XAML page. Codes from these three files are here for your ready reference. I searched web a lot, but did not overcome my problem.
XAML----------
<navigation:Page x:Class="WOManagement.Views.WOMeasurement2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns ="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:my="clr-namespace:EIPControls;assembly=EIPControls"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
xmlns:lc="clr-namespace:WOManagement.ViewModel"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:newcombo="clr-namespace:WOManagement.ViewModel"
Title="WOMeasurement2 Page" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
d:DesignHeight="659" d:DesignWidth="887">
<UserControl.Resources>
<lc:WOMeasViewModel x:Key="Measurement"></lc:WOMeasViewModel>
</UserControl.Resources>
<sdk:Page.Effect>
<DropShadowEffect/>
</sdk:Page.Effect>
<Grid x:Name="LayoutRoot" Width="888" Height="660" DataContext="{Binding Source={StaticResource Measurement}}" >
<sdk:TreeView Height="230" HorizontalAlignment="Left" Name="trvWOList" VerticalAlignment="Top" Width="315" Margin="5"
ItemsSource="{Binding Path=lstWODetails, Mode=TwoWay}">
<sdk:TreeView.ItemTemplate>
<sdk:HierarchicalDataTemplate ItemsSource="{Binding Path=lstItemCodesTree, Mode=TwoWay}">
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding strWOParent}">
</TextBlock>
<TextBlock Text="{Binding strItemCode}"></TextBlock>
<TextBlock Text="{Binding strstage}"></TextBlock>
</StackPanel>
</sdk:HierarchicalDataTemplate>
</sdk:TreeView.ItemTemplate>
</sdk:TreeView>
</Grid>
</navigation:Page>
viewModel.cs-----------------------
using System.Windows.Input;
using WOManagement.Model;
using WOManagement.Commands;
using System.Windows;
namespace WOManagement.ViewModel
{
public class WOMeasViewModel : WOMeasModel
{
public ICommand test { get { return new check(); } }
}
}
Command.cs---------------
using System;
using System.Windows;
using System.Windows.Input;
using WOManagement.ServiceReference1;
using WOManagement.ViewModel;
using System.Collections;
using System.Collections.ObjectModel;
namespace WOManagement.Commands
{
public class check : ICommand
{
public bool CanExecute(object parameter)
{
return true;
}
public event EventHandler CanExecuteChanged;
public void Execute(object parameter)
{
MessageBox.Show("hi");
}
}
}
please some one help me.
|
|
|
|
|
hi experts,
I myself sorted out this issue. I added following lines above item template. Hope this post will help others.
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectedItemChanged">
<i:InvokeCommandAction x:Name="abc" Command="{Binding Path=test, Mode=TwoWay}">
</i:InvokeCommandAction>
</i:EventTrigger>
</i:Interaction.Triggers>
|
|
|
|
|
Hi All,
I need to create the Captcha Option in Silverlight can anybody help me out.
|
|
|
|
|
Mayur Bheda wrote: Captcha Option
You might get some help
here[^].
There is a free tool here[^] that might help you do this as well.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Hi Abhinav,
I tried this but it did not worked for me. I need this to be incorporated as one of the grid row in an xaml file.
|
|
|
|
|
|
Hello,
I'd like to display my own WPF window at start up, which means I don't need standard splash screen. But, I'd like exactly the same behavior as splash screen. It means my own WPF window should appear right after the aplication started and stay visible until the main application window shows up.
Thank you in advance.
Regards,
Goran
|
|
|
|
|
|
|
Hi,
Due to business requirements, I have to have something like a process to run all the time to retrieve data and do processing with it...
My first guess is to create a windows service so that it can be started and be left running.
Question:
Is windows service the best choice for my requirement or can I have a wcf i.e. .svc file to do the same thing i.e. (get started and be left running all the time). ?
|
|
|
|
|
Yes - a windows service is what you need.
A WCF service is for communications between a two clients or a client and a server. You would use a WCF service *inside* your Windows service.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
A book is what he needs. He's been posting basic stuff in this forum for weeks now, and a good introductory text or two would serve him better.
|
|
|
|
|
Yeah, I know - I decided to take the chance that he would have gotten some form of a clue by now, but I guess not, based on his response to my answer.
In the end, all you can do is point and laugh...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Well, unfortunately, you keep answering his retarded questions. If you stopped, maybe he *would* get a clue. I think its time Arkiboy stepped up and became an Arkiman and quit depending on people to spoon feed him.
|
|
|
|
|
I'll give him answers to a certain degree, but he's gonna have to cowboy up and do most of the legwork himself.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Just you wait. He will start asking questions like "I went to the toilette, but there are no bathroom tissues. What do I do?"
|
|
|
|