|
Just call the second service after the first one returns - as simple as that.
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
Hi
In DatePicker accept only date with "dd/mm/yyyy" and these formats "dmmyy" or "ddmmyy" are not accepted.
i would like to know if there is a way to make the Datepicker to accept also other input format(above).
As it is more easy and quickly for the user to input dates.
Thanks
|
|
|
|
|
Just read you question more closely. If you do not use delimiters then it is not possible to parse the data into a valid date format. If it is an internal convention then I suppose you could trap the editend event and do the parsing there.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi thanks for the answer.
I tried with the LostFocus event but when it is fired, the DisplayedDate is already set to Today's date.
For example, if i type "101010" in datepicker, when it loastfocus, as this format is not accepted the selected dae is today date, and therefore the LostFocus event is raised.
Any other idea ??
|
|
|
|
|
use the DateValidationError event and then parse the string
|
|
|
|
|
I don't know why you want the DateTime Picker to accept other input format since what you will need at the end is the selected date. If you want to store the selected date in other format then you can try string formatting to convert the resulting string into the desired format.
|
|
|
|
|
I solved using the DateValidationError event.
Thanks bye
|
|
|
|
|
|
Here have some google foo[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hello guys... I wrote this code to scroll down to bottom automatically in a list whenever a new item is added to it. But it points to second last item not the last one. Here is the code
private void AutoScrollToBottom()
{
if (lstName.Items.Count > 0)
{
lstName.SelectedIndex = lstName.Items.Count - 1;
lstName.UpdateLayout();
lstName.ScrollIntoView(lstName.SelectedIndex);
}
}
Whats wrong with it .... thnx
|
|
|
|
|
I'm surprised that anything happens for you actually, as ScrollIntoView takes and object and not an index. This should work:
object objectToShow = lstName.Items[lstName.Items.Count - 1];
lstName.ScrollIntoView(objectToShow);
|
|
|
|
|
No, this did not work even though I appended lstName.UpdateLayout(); to your answer just b4 ScrollIntoView();.
|
|
|
|
|
Of course it doesn't work . And I bet I know why...
I'm guessing your code looks something like:
private void SomeMethod()
{
AddItem();
AutoScrollToBottom();
}
right?? .
This is one of the things that annoys me about WPF and always throws newbies (sorry if you are not, just this is well known to experienced WPF guys) for a loop.
When you have an item based control (ListBox, ListView, TreeView, etc), items are not really inserted into the control right away. They are inserted at some random point in the future. So what happens is exactly what you are seeing... your code says insert item #10, then it says "scroll to the last item" which still happens to be item #9. Then item #10 happens to be inserted. So you are scrolling to the second to last item because that was really the last item when your code executed.
What you need to do is subscribe to the ItemContainerGenerator.StatusChanged event and wait for the status to be ContainerGenerated on the item you want. Only then can you scroll it into view.
|
|
|
|
|
HI,
I am migrating from RadShceduler control from RadScheduleView for some performance problem. The requirement is to invoke the appointment create event in single click. In scheduler we have the TimeSloteItem which is not in RadScheduleView. I created a control template for timeslotitem and had the inputbindings to invoke the radscheduler appointment create event. I dont know how to achieve this in RadScheduleView. Plz Help... I used the following style..
<br />
<Style x:Key="AllDayTimeSlotStyle" TargetType="{x:Type telerik1:TimeSlotItem}"><br />
<br />
<Setter Property="Template"><br />
<Setter.Value><br />
<ControlTemplate TargetType="{x:Type telerik1:TimeSlotItem}"><br />
<Grid x:Name="LayoutRoot"><br />
<Grid.InputBindings><br />
<MouseBinding MouseAction="LeftClick" Command="commands:SchedulerCustomCommands.CreateAppointment" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}}" /><br />
</Grid.InputBindings><br />
.<br />
.<br />
.<br />
.<br />
.<br />
</ControlTemplate><br />
</Setter.Value><br />
</Setter><br />
</Style><br />
|
|
|
|
|
I find telerik support absolutely excellent for their controls, generally a sample app appears to solve most issues. Have you tried their forums.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi Jeyakumarbics1,
You don't need to create new template for TimeSlotItem. You need to attach function to MouseLeftButtonUp of RadScheduleView and in body of this function you need to create and execute CreateAppointment command.
private void ScheduleView_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
System.Windows.Input.RoutedUICommand createAppointment = RadScheduleViewCommands.CreateAppointment;
createAppointment.Execute(null, this.ScheduleView);
}
|
|
|
|
|
Hi,
I want to invoke the appointment create event in RadScheduleView with mouse single click instead of double click. By default it is invoked in mouse double click. How to get this done?
Plz Help? Urgent...
|
|
|
|
|
if (true == ((List<Author>)DG.ItemsSource).Any(el =>; el.Name == CurrentInput))
{
MessageBox.Show("Looking in column: " + ????? );
}
I don' t want to be always in the column Name, but in which is current. DG is the DataGrid. How?
|
|
|
|
|
I don't understand the question.
The columns are generally bound to some property in the data object for the row (the collection of these data items is the datagrid's ItemsSource). The datagrid's SelectedItem property will give you that object.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
1) You don't need "true =="
2) You don't need a semicolon after the => in your anonymous function
Anyway... You should be using FirstOrDefault() instead of Any(). That'll return the item that satisfied the condition, instead of just letting you know that such an item exists.
For example:
Person p = lstPeople.FirstOrDefault(a => a.Age > 18);
if (p != null)
{
}
|
|
|
|
|
I have a number of combo boxes on a datagrid, which are linked together using binding. So, if you select an item in the first combo then the user is presented with a list of values in the second based upon their selection in the first.
However, the problem I have is when the user changes their selected item in the first combo box, the list of values in the second is not updating to reflect the new selected item from the first.
My mark up in the combobox is
<ComboBox ItemSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type toolkit:DataGrid}}, Path=DataContext.Cars.SelectedCar}"
DisplayMemberPath="Car"
SelectedValuePath="Car"
SelectedItem="{Binding Path=SelectedCar, Mode=TwoWay, UpdateSourceTrigger}"
IsSynchronizedWithCurrentItem="True"/>
Can only please help??????????????????
|
|
|
|
|
I would guess that your path is wrong Path=DataContext.Cars.SelectedCar, SelectedCar doesn't sound like a list of objects.
If your path is not wrong, you should post a description of your source your binding against and the xaml for your datagrid with the comboboxes.
|
|
|
|
|
Hai!!!!!
How to update datas in silverlight Data grid. I used Following code But Getting Error in Linq query in service like .....
Argument Null Exception unhandle by user ...:
Value cannot be null.
Parameter name: entity
in this line : Dbcls.Bill_Applications.Attach(objBill,true);
This is my COde :
bill.xaml.cs
==============
public Bill()
{
InitializeComponent();
dgSilverlight.BeginningEdit +=new EventHandler<DataGridBeginningEditEventArgs>(dgSilverlight_BeginningEdit);
dgSilverlight.RowEditEnded +=new EventHandler<DataGridRowEditEndedEventArgs>(dgSilverlight_RowEditEnded);
}
void dgSilverlight_RowEditEnded(object sender, DataGridRowEditEndedEventArgs e)
{
MyBill_Application.ServiceReference1.Bill_Application objData = e.Row.DataContext as MyBill_Application.ServiceReference1.Bill_Application;
MyBill_Application.ServiceReference1.BILL_WCFServiceClient webservice = new MyBill_Application.ServiceReference1.BILL_WCFServiceClient();
webservice.Edit_User_Bill_InformationCompleted +=new EventHandler<Edit_User_Bill_InformationCompletedEventArgs>(webservice_Edit_User_Bill_InformationCompleted);
webservice.Edit_User_Bill_InformationAsync(objData);
}
protected void webservice_Edit_User_Bill_InformationCompleted(object sender, MyBill_Application.ServiceReference1.Edit_User_Bill_InformationCompletedEventArgs e)
{
bool result = Convert.ToBoolean(e.Result);
if (result)
{
}
}
void dgSilverlight_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
{
}
And Service Page
Service.srv.cs
=====================
[OperationContract]
public bool Edit_User_Bill_Information(Bill_Application objBill)
{
Dbcls.Log = new Vandermotten.Diagnostics.DebuggerWriter();
Dbcls.Bill_Applications.Attach(objBill,true); ***Error*** :doh:
Dbcls.SubmitChanges();
return true;
}
Can you please Help me out ?
Thanks and Regards,
Sanjay
|
|
|
|
|
From the error, it looks like you have no data.
Make sure you have data for the query that you are using.
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
I have code to add my tab items to the control and it works, however in the Microsoft Visual C# 2010 editor my tab shows up as a big gray box with no controls. When I run the program the tabs have there controls. Here is my TabItem
<br />
<br />
<TabItem xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="ThisMyTab" x:Class="GoCenter.MyTab" mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800"><br />
<br />
<Grid><br />
My Controls here<br />
</Grid><br />
<br />
</TabItem >
David W Wright
|
|
|
|