|
What do you mean by Add in Silverlight Project? This isn't a combination I've come across before - perhaps you could explain what effect you're expecting.
|
|
|
|
|
Hello together,
I´m struggeling with connection of two table in a datagrid.
What is the situation. I have one table (tbl_customer)which stores details about a customer, also the categoryID for the customer_category. A second table has the detailled information about the customer category.
So the categoryID in tbl_Customer is the foreign key and links to the second table tbl_Category. oidCategory (PK), txtLabel (string)).
Setting the ItemsSource of the datagrid to tbl_Customer I get all the details of the tbl_Customer (and the categoryID as int). Now I would like to have the txtLabel from the tbl_Category presented in the datagrid as well.
I know how to bind the foreign datas with a ComboBox, but not with as a textbox.
I hope I could explain my problem in a more or less understandable way.Has someone an idea where I can find a tutorial or which tags to use searching for more information.
Thanks for help in advance!
BR Thomas
|
|
|
|
|
So build a Model that meets your requirements in the viewmodel and load it up from the 2 tables, not everything you need is going to come from a nice little black box!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I have to implement voice instruction to user in my WPF application.
Example: Please Enter Your Name.
Please suggest me any approach.
|
|
|
|
|
|
Hi,
I want to build my WPF project for Class Library Type/Windows Application Type. Its working for Windows application but not working for WPF application, kindly help me.
|
|
|
|
|
Eh? What? Do you mean that you want your application executable to reside inside a DLL and you want another piece of code kick off your application?
|
|
|
|
|
I have single project, When i set Project output type to class library it should generate DLL and when i set Project output type to Windows Application then it should generate exe.
|
|
|
|
|
Yes. That works for WPF as well. What exactly are you seeing?
|
|
|
|
|
Thanks for your reply.
I see this errors for WPF Application:
Error 1 Library project file cannot specify ApplicationDefinition element.
Error 2 The project file contains a property value that is not valid.
|
|
|
|
|
Remove the App.xaml and App.xaml.cs files. They are, effectively, the entry point for a WPF executable and they are not needed in a class library. The build type of App.xaml is ApplicationDefinition.
|
|
|
|
|
Oh thanks Pete O'Hanlon, its working fine.
One thing i want to put here: if I don't remove the App.xaml and App.xaml.cs file, and Change Build Action from ApplicationDefinition to Page then also it works.
Thanks
|
|
|
|
|
It does, but the App.xaml makes no sense inside the class library.
|
|
|
|
|
Yes you are correct, it doesn't make sense in class library. But my requirement is sometime I need DLL and sometime EXE, so I am not removing App.xaml file.
|
|
|
|
|
That's just really weird, and not a requirement, it sounds like a solution to another requirement.
The 'normal' way would be move the common bits to a class library, then you have an exe that references that library.
You don't switch an exe to dll just by changing the project setup or visa versa.
|
|
|
|
|
It's not weird, if I want reference the DLL in multiple exe other than the exe which is generated from by changing project output type Windows Application.
|
|
|
|
|
If you want to reference the dll from multiple exe's(or other dll's) then that's exactly what a class library is for.
Why do you think you now need to change that same class library to an exe? what is the exe going to do?
|
|
|
|
|
This library contains XAML file, if I make exe of it then doesnt required to add reference of DLL.
|
|
|
|
|
Not sure I get you... but if you want a class library to contain xaml (Windows, Pages, UserControls etc) then it can do, and yes you might need to manually add some references to the default 'class library' visual studio template.
If you create a WPF app then obviously the template already contains all the basic references you need.
You still don't need to switch a single project between a class lib and an application types.
|
|
|
|
|
I want to add a table to a DockPanel. Please see the table demo.
The text are all hardcoded or variables in the code. All the numbers are from code, say fields.
What should I select, datagrid or grid or table.
Thanks for code snippet.
|
|
|
|
|
You need to use a data table, bind the ItemSource to your collection and define the DataColumns with Header and Binding
<DataGrid Grid.Row="1"
Name="dgDB"
AutoGenerateColumns="False"
CanUserAddRows="False"
ItemsSource="{Binding DatabaseList}"
SelectedItem="{Binding SelectedDatabase, Mode=TwoWay}"
Margin="15"
IsReadOnly="True"
MouseDoubleClick="GridClick">
<DataGrid.Columns>
<DataGridTextColumn Header="Database"
Width="*"
Binding="{Binding DatabaseName}" />
</DataGrid.Columns>
</DataGrid>
Instead of Row="1" you would use DockPanel
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, the data is not from database. Just several values, say:
IVR-Success=50;
IVR-Fail=2;
PAYMENT-Success=30;
PAYMENT-Fail=0;
CALL-Success=100;
CALL-Fail=2;
The total can be calculated. Just 3x3 table, no more rows or columns. Is it too complicated by using datagrid?
|
|
|
|
|
zhshqzyc wrote: Is it too complicated by using datagrid
Yes, the content is not dynamic so just place the labels and textboxes where they look good and bind each one to a single property in the VM.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello
I have change the value in the web.config to connect my project silverlight to database but I have this problem on this line:
public Viaccess.Vite.AdministrationSL.SvcAdmin.WcfResultOfArrayOfPackageBOx8pdn48J EndGetAllPCKs(System.IAsyncResult result)
{
object[] _args = new object[0];
Viaccess.Vite.AdministrationSL.SvcAdmin.WcfResultOfArrayOfPackageBOx8pdn48J _result = ((Viaccess.Vite.AdministrationSL.SvcAdmin.WcfResultOfArrayOfPackageBOx8pdn48J)(base.EndInvoke("GetAllPCKs", _args, result)));
return _result;
}
And the message is "The remote server returned an error: NotFound".
The project use WCF.
Thanks
(Sorry I'm french and my English is not very good)
|
|
|
|
|
No one is going to be able to help you with so little information and setting up a WCF config is difficult. What I do is to split the project into 2, WCF and UI.
I then build the wcf and run it locally and test the connection using the Wcf Test Client and pull back the GetData.
I then change the web config and include the client access policy and cross domain xml files. Youwill need to find a couple of decent examples to work from, this is my config file
="1.0"="UTF-8"
<configuration>
<configSections>
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="40000"/>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicBinding"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="64"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="XXXPSsvcBehavior"
name="XXXPS.WCF.XXXPSsvc">
<endpoint address="XXXPSWCF"
bindingConfiguration="BasicBinding"
binding="basicHttpBinding"
contract="XXXPS.WCF.IXXXPSsvc" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="XXXPSsvcBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<directoryBrowse enabled="true" />
</system.webServer>
<appSettings>
<add key="DBServer" value="ServerName.arvixe.com" />
</appSettings>
</configuration>
Never underestimate the power of human stupidity
RAH
|
|
|
|