|
Hi abhinav your answer was good.
but what did you mean with "use ADO.net to get the column names"???
thanks
|
|
|
|
|
jadughar wrote: use ADO.net to get the column names"???
You will need to write a query and execute it(probably using a data adapter) to fetch the column list on the server. You will then pass this back to the client via the WCF service.
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
Visit the Hindi forum here.
|
|
|
|
|
Hi Abhinav I would like to thank you for your patience with me.
You'll now understand that i am a beginner, and i'm not very good to talk in english.
Do you have some article or tutorial, about creating a Service, which explain the topic easily???
|
|
|
|
|
You could start with this[^].
MSDN will[^] always be your best friend.
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
Visit the Hindi forum here.
|
|
|
|
|
Hello
I want to display hierarchical data in Silverlight 4. E.g. Invoices at the top and Invoice Lines under each invoice header. How can I do that?
Regards,
|
|
|
|
|
|
I don't want to pay for it. I am sure I can do it without paying for a third party control.
|
|
|
|
|
Use a ListBox with DataTemplates - show the invoices in the ListBox then in the datatemplate for the invoice have another listbox showing invoice lines (again use a datatemplate) - if you wrap each invoice in an expander and do some styling you can make it look very funky indeed.
|
|
|
|
|
I am sure this something really simple and I have been looking at it for too long but why doesn't this show anything?
public partial class Window1 : Window
{
public XmlDataProvider Provider { get; set; }
public Window1()
{
InitializeComponent();
Provider = new XmlDataProvider();
Provider.Document = new XmlDocument();
Provider.Document.LoadXml(TestXml.Test.Test());
Provider.XPath = "Halloumi";
}
}
<Window x:Class="HalloumiDesigner.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Window.Resources>
<HierarchicalDataTemplate DataType="Database" ItemsSource="{Binding XPath=Databases/Database}">
<Border BorderBrush="SteelBlue"
BorderThickness="2"
Background="AliceBlue">
<TextBlock Text="{Binding XPath=@Name}" />
</Border>
</HierarchicalDataTemplate>
</Window.Resources>
<Grid>
<TreeView Name="TreeView" ItemsSource="{Binding Provider}" Margin="10" />
</Grid>
</Window>
XML is:
<Halloumi>
<Databases>
<Database Name="A"/>
<Database Name="B"/>
</Databases>
</Halloumi>
|
|
|
|
|
|
Your treeview needs to be bound to an ObservableCollection
Everything makes sense in someone's mind
|
|
|
|
|
It doesn't but thanks for answering. I have abandoned the TreeView and gone for a ListBox and Data Templates - far better.
|
|
|
|
|
Hi ,
i wish build a control(wpf) that the Eye(Ellipse) follow the cursor of the mouse.
here is a snippet code that i am developing :
<Window Height="480" Title="Window2" Width="640" x:Class="WpfApplication5.Window2"
x:Name="Window" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<Storyboard x:Key="OnLoaded1">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ctrCircle"
Storyboard.TargetProperty="(UIElement.RenderTransform).( TransformGroup.Children)[3].(TranslateTransform.X)">
<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<ExponentialEase EasingMode="EaseOut" />
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ctrCircle"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<ExponentialEase EasingMode="EaseOut" />
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Style TargetType="Ellipse">
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="1"/>
</Setter.Value>
</Setter>
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
</Style>
</Window.Resources>
<Canvas MouseMove="mov" x:Name="LayoutRoot">
<Border ackground="Black" B="" Canvas.Left="178" Canvas.Top="103"
CornerRadius="250" Height="255.5" Width="290" x:Name="border_eye">
<Ellipse Fill="#FFFFC600" Height="12" HorizontalAlignment="Left"
Margin="0" RenderTransformOrigin="0.5,0.5" Stroke="{x:Null}"
VerticalAlignment="Center" Visibility="Visible" Width="12" x:Name="ctrCircle">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform />
<TranslateTransform />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
</Border>
</Canvas>
</Window>
and in the code behind :
private void mov(object sender, MouseEventArgs e)
{
System.Windows.Point pt = e.GetPosition((Canvas)sender);
Storyboard invokeStoryboard = this.Resources["OnLoaded1"] as Storyboard;
((DoubleAnimationUsingKeyFrames)invokeStoryboard.Children[0]).KeyFrames[0].Value = pt.X;
((DoubleAnimationUsingKeyFrames)invokeStoryboard.Children[1]).KeyFrames[0].Value = pt.Y;
invokeStoryboard.Begin();
}
now my purpose is when i move the mouse in the Canvas area(LayoutRoot) the Ellipse(ctrCircle) move only inside the Border(border_eye) and don't overcome the area of the "border_eye" this effect is similar an eye.
Do you have any idea how to perform this step?
Thanks so much for your attention
Have a nice day.
|
|
|
|
|
Nearly all, no ALL the upload demos place the uploaded files in the folder of the web service, or a sub folder.
I am building a site that has 2 distinct web sites, Admin and User sites, admin uploads the files and user consumes them. I would like to use the separate WCF to write to the server file system but keep running into permission issues. This will be exacerbated when I want a common folder for the uploads that is a peer of the root folders. Something like
AdminWeb
PublicWeb
Uploads
Documents
Images
OR
To make it simpler should I just stick admin and uploads under the user web site
PublicWeb
AdminWeb
Uploads
Documents
Images
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I usually store uploads in a database. Any reason you can't do that?
|
|
|
|
|
And yet it is not the recommended storage method.
The DB is rapidly looking like the best option for this. Mind you it means I have yo reload hundreds of documents/images
Do you store the data in a separate table with a FK to the data eg Document table has the synopsis and details and store the actual file in Upload. If I want a list of documents I don't get all the file data in the List<> or just limit the select to exclude the binary data field.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I just store it in the same table and my SELECT statements are tailored to select only the columns they need. In these applications, the data is usually lazy loaded or loaded on demand (and then discarded) so as to avoid taking up too much memory. Just need to make sure your database is capable of storing large amounts of data (e.g., I'm pretty sure Microsoft imposed some artificial limit -- say, 10GB -- on the express edition of SQL Server).
|
|
|
|
|
Projected size of database with documents and images is about 500mb so DB limits should not be relevant. Paying DASP for DB storage may be!
Which uploader did you base yours on, I stumbled across Sasha's yesterday and left in despair, I need a very light weight and simle one.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mine was actually in an XBAP (WPF) with the proper security permissions to access the local file system. I assume you are working with Silverlight, in which case I can't offer any suggestions, other than what my google-fu produced.
|
|
|
|
|
Can't you write/buy some folder synching software that runs as a service that watches one or more folders and automatically copies new files to another specified folder?
We use SureSync at work, but I've started my own project to do pretty much the same thing.
.45 ACP - because shooting twice is just silly ----- "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 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I think it will be easier to either restructure the web site or store the uploads in the database. As this is a small non commercial app over which I have complete control I don't want to get into any elaborate structures.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
More of a broad question than a specific code question:
What is a good approach to record / (datagrid)row level validation vs. field validation. I have implemented the IDataErrorInfo interface into my model, but that seems really geared towards field level validation, which is great aside from when the user doesn't interact with the specific field.
I have a datagrid that contains a property address, which is broken up into parts. Some of the fields are required, some are not. The fields that are not required might or might not require a certain format if they do have value. I implemented all of this in my model using all the IDataError info interface.
What would be ideal is preventing the user from leaving the row in the datagrid without resolving errors.
Thoughts / Directions?
Cheers, --EA
|
|
|
|
|
if I have XAML:
<Button Width=75 />
by default, it comes out to 21px high. This is fine on Aero, but everything other scheme has a default button height of 23px. Is there a generic way to do this? Surely littering my code with:
if (Aero)
button.Height = 21;
can't be the solution?
|
|
|
|
|
You can apply a global style for buttons that sets the height.
|
|
|
|
|
Is IStyleDispenser's extension GetStylesWithTargetType still a part of System.Windows.Controls.DataVisualization? I'm getting a missing reference or assembly error when I try to use it. Has it been renamed or dropped in favor of another method? Thank you in advance.
|
|
|
|