|
bt ftp also needs client system username and password
|
|
|
|
|
Then you need to write your own client agent that allows you to connect without it.
Also please use the correct forum in future, this is not a WPF/Silverlight issue.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
if you do use Socket Programming, there no need to credential of Remote server just use ip address.
mohit Saxena
|
|
|
|
|
thnks mohit i really appreciate ur help.
|
|
|
|
|
But remember, you will still need a program on the remote system that will listen for and accept socket connect requests.
Veni, vidi, abiit domum
|
|
|
|
|
Hi... So I'm creating a column collection for a data grid in the code behind because I don't know the number of columns needed until run time. I need to bind the background color to a converter but i'm not sure how to do it. The background property is typed as a Brush, but of course the converter is a binding... so how do I get this working? In the code below, the "DataMemberBinding" works because that property is a binding type... So I just need to get the background working.
Thanks,
Sam.
Dim c = New Telerik.Windows.Controls.GridViewDataColumn With {.Header = sched.ShipName,
.IsReadOnly = True,
.IsFilterable = True,
.IsSortable = True,
.Background = New System.Windows.Data.Binding With {.Converter = New BackgroundColorConverter(),
.ConverterParameter = (s + 1).ToString},
.IsGroupable = False,
.ShowFieldFilters = True,
.ShowDistinctFilters = False,
.DataMemberBinding = New System.Windows.Data.Binding With {.Converter = New ColumnConverter(),
.ConverterParameter = (s + 1).ToString}
}
columnCollection.Add(c)
|
|
|
|
|
Try something like this:
Dim column As New GridViewDataColumn With
{
.Header = sched.ShipName,
.IsReadOnly = True,
.IsFilterable = True,
.IsSortable = True,
.IsGroupable = False,
.ShowFieldFilters = True,
.ShowDistinctFilters = False,
.DataMemberBinding = New Binding With
{
.Converter = New ColumnConverter(),
.ConverterParameter = (s + 1).ToString
}
}
Dim backgroundBinding As New Binding With
{
.Converter = New BackgroundColorConverter(),
.ConverterParameter = (s + 1).ToString},
}
column.SetBinding(GridViewDataColumn.BackgroundProperty, backgroundBinding)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for the reply. SetBinding doesn't exist on the GridViewDataColumn type though... I did figure it out, however:
Dim c = New Telerik.Windows.Controls.GridViewDataColumn With {.Header = sched.ShipName,
.IsReadOnly = True,
.IsFilterable = True,
.IsSortable = True,
.IsGroupable = False,
.ShowFieldFilters = True,
.ShowDistinctFilters = False,
.DataMemberBinding = New System.Windows.Data.Binding With {.Converter = New ColumnConverter(),
.ConverterParameter = (s + 1).ToString}
}
Dim backgroundBinding As New System.Windows.Data.Binding With {.Converter = New BackgroundColorConverter,
.ConverterParameter = (s + 1).ToString}
backgroundBinding.Source = c
System.Windows.Data.BindingOperations.SetBinding(c, Telerik.Windows.Controls.GridViewDataColumn.BackgroundProperty, backgroundBinding)
columnCollection.Add(c)
|
|
|
|
|
USAFHokie80 wrote: SetBinding doesn't exist on the GridViewDataColumn type
The BindingOperations.SetBinding method is an extension method. If you import the System.Windows.Data namespace, you'll be able to call it as c.SetBinding(...) .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
You can use DataGrid_AutoGeneratedColumns() event and set the datagrid.ColumnHeaderStyle,
can set background color ,fore-color etc,with help ColumnHeaderStyle Property.
I hope that it is useful for you.
Thanks
Mohit Saxena
mohit Saxena
|
|
|
|
|
Hi.
I have 2 DatePicker control in WPF Windows (start date and end date).
Where User should be able to select start date and end date.
End date should be lass then and not equal to end date.
I want to give validation when user leave the end date(DatePicker control) at that time.
|
|
|
|
|
|
I have a SL/WPF application that populates a datagrid. The button contains this code:
MyDomainContext context = new MyDomainContext();
dataGrid1.ItemsSource = context.DBTables;
context.Load(context.GetTwoDataBasesQuery());
The DomainServices.cs contains:
public IQueryable<DBTable>GetTwoDataBases()
{
return this.ObjectContext.DBTables;
}
This code works fine but returns all columns in the context
I need to return only two columns so changed is as follows
public IQueryable<DBTable>GetTwoDataBases()
{
return GetDBTables().Select(m => new { m.col1, m.col2 });
}
But code has errors, does not accept the "return" .
how do I get col1 and col2?
Many thanX
|
|
|
|
|
Can any one help me to write style for 2 textbox which should take input like Latitude , Longitude. with validation
|
|
|
|
|
|
And which format will be used - degrees, minutes, seconds, ...?
|
|
|
|
|
|
|
psst - Yogi say thank you properly and give him an up vote (little arrows beside the title)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
We can expose a button as ActiveX contol method. Also we can expose a button as MEF plug-in. My question is can use MEF logic for exposing the button instead of exposing the button using ActiveX control. Please let me know the effectiveness of using the button in both ways. The usabilty of that button is for testing purpose.
|
|
|
|
|
I have a Radgridview contains some rows i need to preview the telerik radgridview items first then i need to print the specified document (if i have 5 radgridview items i need to display each row in each page with radgridview header.
|
|
|
|
|
Try this[^] - it may provide some insight.
Posting this on the Telerik forum might give you some solution.
|
|
|
|
|
My previous post about detecting property changes in the VM wasn't in depth enough, so I'm posting this
I have a grid of Jobs. Each job can have one or more employees.
The DataGrid's RowDetailsTemplate contains another grid to show the employees. So to parent grid is bound to a list of Jobs. The inner grid is bound to a list of Employees that is on the Job model.
The Job Model:
public class Job : _Base
{
private string _JobName = string.Empty;
public string JobName
{
get { return _JobName; }
set
{
if (_JobName != value)
{
_JobName = value;
RaisePropertyChanged("JobName");
}
}
}
private string _JobNumber = string.Empty;
public string JobNumber
{
get { return _JobNumber; }
set
{
if (_JobNumber != value)
{
_JobNumber = value;
RaisePropertyChanged("JobNumber");
}
}
}
private ObservableCollection<Employee> _Employees;
public ObservableCollection<Employee> Employees
{
get { return _Employees; }
set
{
if (_Employees != value)
{
if (_Employees != value)
{
_Employees = value;
RaisePropertyChanged("Employees");
}
}
}
}
private Employee _SelectedEmployee;
public Employee SelectedEmployee
{
get { return _SelectedEmployee; }
set
{
if (_SelectedEmployee != value)
{
if (_SelectedEmployee != value)
{
_SelectedEmployee = value;
RaisePropertyChanged("SelectedEmployee");
}
}
}
}
public Job()
{
Employees = new ObservableCollection<Employee>();
}
}
The Employee model
public class Employee : _Base
{
private string _EmployeeName = string.Empty;
public string EmployeeName
{
get { return _EmployeeName; }
set
{
if (_EmployeeName != value)
{
_EmployeeName = value;
RaisePropertyChanged("EmployeeName");
}
}
}
private bool _IsChecked = false;
public bool IsChecked
{
get { return _IsChecked; }
set
{
if (_IsChecked != value)
{
_IsChecked = value;
RaisePropertyChanged("IsChecked");
}
}
}
}
The XAML
<DataGrid ItemsSource="{Binding Jobs}"
SelectedItem="{Binding SelectedJob}"
AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Job Name" Binding="{Binding JobName}" />
<DataGridTextColumn Header="Job Number" Binding="{Binding JobNumber}" />
</DataGrid.Columns>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<DataGrid ItemsSource="{Binding Employees}"
SelectedItem="{Binding SelectedEmployee}"
AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridCheckBoxColumn Binding="{Binding IsChecked}"/>
<DataGridTextColumn Binding="{Binding EmployeeName}"/>
</DataGrid.Columns>
</DataGrid>
<Button Margin="5"
Height="23"
Width="75"
HorizontalAlignment="Left"
Content="Remove"/>
</StackPanel>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
The MainWindowViewModel
public class MainWindowViewModel : _Base
{
private ObservableCollection<Job> _Jobs;
public ObservableCollection<Job> Jobs
{
get { return _Jobs; }
set
{
if (_Jobs != value)
{
if (_Jobs != value)
{
_Jobs = value;
RaisePropertyChanged("Jobs");
}
}
}
}
private Job _SelectedJob;
public Job SelectedJob
{
get { return _SelectedJob; }
set
{
if (_SelectedJob != value)
{
if (_SelectedJob != value)
{
_SelectedJob = value;
RaisePropertyChanged("SelectedJob");
}
}
}
}
public MainWindowViewModel()
{
this.PropertyChanged += new PropertyChangedEventHandler(MainWindowViewModel_PropertyChanged);
}
void MainWindowViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName.Trim().ToLower() == "ischecked")
{
int x = 1;
}
}
}
I have a couple of questions:
1) The SelectedEmployee property on the Job model does not fire when I click an employee in the inner grid.
2) The MainWindowViewModel_PropertyChanged does not fire when an employee is selected.
3) Notice the button below the inner grid. How do I bind its command to MainWindowVM?
If it's not broken, fix it until it is
|
|
|
|
|
I have a data grid bound to a list of Job Models. The Job Model has a Job Name property.
I can tell when a row is selected because the grid's SelectedItem is set. But when the user changes some data in the grid, I'd like to do some things in the view mdoel.
When the user changes the Job Name on the active row in the grid, how can the View Model know about it?
Thanks!
If it's not broken, fix it until it is
|
|
|
|
|
Make sure that you have two-way databinding set in the textbox, and editing name in the active row will update the name property (I'm also assuming that you are updating the name field via the standard PropertyChanged event here; hence 2-way binding).
|
|
|
|