Telerik Forums
UI for WPF Forum
5 answers
197 views
Hi,

I am using RadDataForm to insert/edit a new records.My main page has a radgrid bound to a QueryableDataServiceCollectionView<Document>, and a button for displaying a popup window for data insert.The poup window contains a RadDataForm with a DataTemplate.

<telerik:RadGridView  Name="RadGridView" ItemsSource="{Binding}"    CanUserFreezeColumns="False"
                            AutoGenerateColumns="False"  MouseDoubleClick="RadGridView_MouseDoubleClick">
  
                   <telerik:RadGridView.Columns>
                       <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ID}" />
                       <telerik:GridViewDataColumn Header="Driver Name" DataMemberBinding="{Binding DriverDocument.Driver.FullName}" />
                       <telerik:GridViewDataColumn Header="Document Number" DataMemberBinding="{Binding DocumentNo}" />
                       <telerik:GridViewDataColumn Header="Issue Date" DataMemberBinding="{Binding IssueDate}" />
                       <telerik:GridViewDataColumn Header="ExpiryDate" DataMemberBinding="{Binding ExpiryDate}" />
                       <telerik:GridViewDataColumn Header="Place Of Issue" DataMemberBinding="{Binding PlaceOfIssue.Text}" />
                       <telerik:GridViewDataColumn Header="Document Type" DataMemberBinding="{Binding DocumentType.Name}" />
                   </telerik:RadGridView.Columns>
               </telerik:RadGridView>
<Button Content="New Driver Document" Name="NewBTN" MinWidth="180" Click="NewBTN_Click" />

When clicking the button 'New Driver Document'
, the RadDataForm in the poup winodw is bound to the same QueryableDataServiceCollectionView<Document> that I use for biniding the RadGridView.I also call RadDataForm.AddNewItem to insert the new record and then show the popup window.The RadGridView successfully responds to this call and shows a new empty record row.I fill in the form, save and close the poup and everything works fine, but If click the button 'New Driver Document' again, fill in the form
,and click save ,the saving is not done without any errors.

private void NewBTN_Click(object sender, RoutedEventArgs e)
{
  DriverDocumentView view =
new DriverDocumentView();//popup window
  view.DataContext = dataContext;//this is the same as the radgrid itemssource
  view.ShowPopup();//this assigns the owner window and call show on the window
  view.RadDataForm.AddNewItem();
  view.RadDataForm.BeginEdit();
  view.Focus();
}

I Later switched to adding the item using QueryableDataServiceCollectionView<Document>.AddNewItem
 
instead of the RadDataForm.AddNewItem to see if that works.When I click the 'New Driver Document' for the first time
 the QueryableDataServiceCollectionView<Document>.AddNewItem will return a valid Document object, and the form will save the record.If click again on the 'New Driver Document', the QueryableDataServiceCollectionView<Document>.AddNewItem will return null and the saving will not be done and without any errors!!!

private void NewBTN_Click(object sender, RoutedEventArgs e)
{
  DriverDocumentView view =
new DriverDocumentView();
  view.DataContext = dataContext;// this is the same as the RadGridView ItemsSource
  Document doc = dataContext.AddNewItem(new Document());//this will return null if inserting the second record
  dataContext.MoveCurrentTo(doc);           
  view.ShowPopup();
  view.RadDataForm.BeginEdit();          
  view.Focus();
}

My custom save button on the popup window calls an extension method that simply calls SubmitChanges on QueryableDataServiceCollectionViewBase


MyRadDataForm.SubmitChanges();

public static void SubmitChanges(this RadDataForm form)
        {
            if (form.ItemsSource is QueryableDataServiceCollectionViewBase)
            {
                ((QueryableDataServiceCollectionViewBase)form.ItemsSource).SubmitChanges();
            }
 
        }

Thanks

Madani 
Ivan Ivanov
Telerik team
 answered on 05 Feb 2013
1 answer
123 views
HI,

i have a littel Problem. My application has to be very dynamic. On a Page I have a Grid with two ListBoxes an a Stackpanel
which loads a Usercontrol depending on SelectedItem in ListboxA. After Loading the Usercontrol i must drag an item from
ListboxB and drop it into the Grid in the UserControl!

How will i do this?

Thanks
Best Regards
Rene
Nick
Telerik team
 answered on 05 Feb 2013
14 answers
743 views
 Hi,

I need the scrollbars of the RadGridView enabled when the RadGridView itself is disabled.

Any ideas how to do that?

Thanks
Stacy
Top achievements
Rank 1
 answered on 05 Feb 2013
8 answers
434 views
I have drag/drop working when I drag items from a RadGridView to a RadTreeView using your examples of a separate Behavior class (setting the DependencyProperty IsEnabled=true). Now I am trying to drag items from Windows Explorer onto the same RadTreeView. But the cursor always shows the 'no' circle with a slash through it and it never calls any of the methods in my behavior class.

My xaml for the tree simply has the DP set on the RadTreeView.
<telerik:RadTreeView SelectionMode="Single" x:Name="foldersTree"
ItemsSource="{Binding Items}
ItemContainerStyle="{StaticResource ItemContainerStyle}"
IsLoadOnDemandEnabled="True"
uiExt:RadTreeViewDragDropBehavior.IsEnabled="True">


I see postings where people who are using the RadDragAndDropManager are able to do this. But how can I do it with the newer DragDropManager?
Thanks, Valerie

Tina Stancheva
Telerik team
 answered on 05 Feb 2013
1 answer
229 views
Telerik,

Our development team use your WPF controls, and we have a need to create a parent/child horizontal type grid with a timeline.  I've inserted two pictures to give you an idea of our requirement.  I've researched your example demos (Gantt, ScheduleView, Timeline, TimeBar) but could not find one that meets our exact needs.  Will your controls provide what we're looking for as described below without us having to write a custom control?

The pictures show the parent object on the far left where its child objects are on the same row to the right.  The parent (one object per row) will scroll vertically, and the child (many objects per parent) will scroll horizontally on the same row as its parent within a timeline.  The timeline is anchored at the top of the form.  As the timeline scrolls horizontally, we want the child objects to scroll horizontally with the timeline.

Picture #1:  This is our overall requirment.  You have the parent objects on the left which scroll vertically.  Each parent can have multiple child objects on the same row that should scroll horizontally when the timeline scrolls.

Picture #2:  This represents one child object.  We will break a child object into segments with different colors.  While the picture shows each segment a different height, that is not one of our requirements.  We do require the ability to have the different color segments for a single child object.
Yana
Telerik team
 answered on 05 Feb 2013
1 answer
133 views
Hello Telerik Team,
 
Can  RadAutoCompleteBox  control support multiple dimension source such as a DataTable ?
 
If it does, can you send us an example ?
 
Thanks in advance,
 
Avishay
Yana
Telerik team
 answered on 05 Feb 2013
3 answers
210 views
Hi guys,

is there a possibility to add more than 2 FieldFilters to a column?

I built up a DependencyProperty named Filters, when i add a filter in my viewmodel, the filter will be set to the column:

if (e.NewValue != null && e.NewValue.GetType() == typeof(FilterDescriptorCollection))
            {
                if (((FilterDescriptorCollection)e.NewValue).Count != 0)
                {
                    GridViewColumn gridColumn = this.Columns[((FilterDescriptor)((FilterDescriptorCollection)e.NewValue)[0]).Member];
                    IColumnFilterDescriptor columnFilter = gridColumn.ColumnFilterDescriptor;
 
                    columnFilter.FieldFilter.Clear();
                    columnFilter.SuspendNotifications();
 
                    foreach (FilterDescriptor filter in ((FilterDescriptorCollection)e.NewValue))
                    {
                        if (columnFilter.FieldFilter.Filter1.Value.ToString() != filter.Value.ToString() && columnFilter.FieldFilter.Filter2.Value.ToString() != filter.ToString())
                        {
                            if (columnFilter.FieldFilter.Filter1.Value.ToString() == "")
                            {
                                columnFilter.FieldFilter.Filter1.Operator = FilterOperator.Contains;
                                columnFilter.FieldFilter.Filter1.Value = filter.Value;
                            }
                            else
                            {
                                columnFilter.FieldFilter.Filter2.Operator = FilterOperator.Contains;
                                columnFilter.FieldFilter.Filter2.Value = filter.Value;
                            }
                        }
 
                    }
                    columnFilter.ResumeNotifications();
                }
            }


is there a possibility to add more than the two filters?

The problem is, that the filtering via viewmodel and rebind data is to slow. we noticed that the filtering via column is pretty much faster.
Now we got keys in a column like AEOKS... and we have to check wether the column is containing a key ("A")

Best wishes to you

David
Dimitrina
Telerik team
 answered on 05 Feb 2013
1 answer
166 views
Hello Telerik Team,

We're working on a project and we're using the scheduler viewer with a custom appointment.

The issue is that we need to show on the list of appointments other fields than subject.
Something like:

"Subject" - "Client"

"Subject" and "Client" are both filled on the form and and are being saved.
I didn't find any property to bind these values and the templates we tried didn't work.

Is there something we can do or the display name can't be changed? 
romulo~
Top achievements
Rank 1
 answered on 05 Feb 2013
5 answers
346 views
Hi,

Requirement:
To add a list of document variables inside the document editor and the fields should display the results, instead of variable name.

Example: from the below code, when a field is added, the result should be "Description" inside the text editor not {DOCVARIABLE 1001}.

Code:
based on http://www.telerik.com/help/wpf/radrichtextbox-features-document-variables.html

public MainWindow()
{
    InitializeComponent();
    DocumentVariableInfo documentInfo = new DocumentVariableInfo();
    documentInfo.Name = "1001";
    documentInfo.Value = "Description";
      
    radRichTextBox1.Document.DocumentVariableList.Add(documentInfo);
    DocumentVariableField docVariable1 = new DocumentVariableField() { DisplayMode = FieldDisplayMode.Result, VariableName = "1001" };
    this.radRichTextBox1.InsertField(docVariable1);
    this.radRichTextBox1.Document.ChangeAllFieldsDisplayMode(FieldDisplayMode.Result);
    this.radRichTextBox1.ChangeFieldDisplayMode(docVariable1.FieldStart, FieldDisplayMode.Result);
    this.radRichTextBox1.ChangeAllFieldsDisplayMode(FieldDisplayMode.Result);
}

Any help much appreciated.

Thanks,
Petya
Telerik team
 answered on 05 Feb 2013
1 answer
201 views
I have a node with one connector (custom named). When I create a connection from this connector, a number of things can happen:

1) If I quickly create a connection, RemoveItem() is called and the connection disappears. The event is not triggered!
2) If I slowly create a connection, the e.ManipulationStatus has value ManipulationStatus.Moved.

First of all, I would expect the same behavior no matter how fast I click and release the mouse button. Please fix this!
Secondly, if I click on a connector and start dragging a new connection, I would expect ManipulationStatus.Attaching. The target will be null, but a connection was still attached to the source, wasn't it?

Two important bugs in my opinion.
Tina Stancheva
Telerik team
 answered on 05 Feb 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?