Telerik Forums
UI for WPF Forum
1 answer
77 views
Why is it so hard to close a radWindow using a radButton? Both are Telerik controls and shouldn't it be simple?
It seems like the RadWindow couldn't be closed using conventional Javascript means like window.close(). I thought Telerik is supposed to make these things simple..

<script  type="text/javascript" language="javascript">
    function closeWindow() {
        window.close();
    }
</script>
<td align="right" width="10%">
    <telerik:RadButton ID="RadButton1" runat="server" Width="80px" Text="Cancel" AutoPostBack="false" OnClientClicked="closeWindow"></telerik:RadButton>
</td>
Yana
Telerik team
 answered on 06 Feb 2013
10 answers
338 views
I need to write a custom control for the RadGridView which would contain a button to export the records to an Excel.
Making use of the .ToHTML method this is possible. But since the same functionality is to be replicated across the application may be a custom control would be appropriate.
Does anyone has any sample to head start on creating a custom control for RadGridView.
Nedyalko Nikolov
Telerik team
 answered on 06 Feb 2013
4 answers
266 views
Hey,

I have a scenario where we do not know the column names or data types until run-time.

We would like to be able to use data virtualization in this scenario.  Basically we construct the sql statement at run-time once we query the table for its metadata (columns).  We could add an orderby, since the VirtualQueriableCollectionView needs one. 

The question is: without pre-loading everything from the table into the VirtualQueriableCollectionView (which would defeat the purpose of this view) how do we wire our sql statement into a VirtualQueriableCollectionView.

We studied this example: GridView -> Databinding -> Various Data Sources example -> Dynamic Data

This example solves the issue of dynamically generating columns that aren't hard-coded in a model, but doesn't show how one could hook this type of solution into data virtualization.
Austin
Top achievements
Rank 1
 answered on 05 Feb 2013
1 answer
125 views
Hi,

I am using version: 2012.1.0215

There is a memory leak in GridViewLoadingIndicator and when i logged ticket it was told to me to replace it with RadBusyIndicator (by changing the GridView's template in expression blend). I did it, i replace GridViewLoadingIndicator with RadBusyIndicator. But, now the problem is RadBusyIndicator is not showing up on the grid. When i looked at the sources of RadGridView the PART_GridViewLoadingIndicator as getting cast to GridViewLoadingIndicator, in this case it would be null. 

Question is how to replace GridViewLoadingIndicator with RadBusyIndicator in GridView?

(upgrading to newer release is not an option at this time of release in our project).


Thanks
Santosh
 



Santosh kumar
Top achievements
Rank 1
 answered on 05 Feb 2013
1 answer
199 views
LineSeries Stroke color is ignored if RadCartesianChart is used in the DataTemplate.
In the example below both charts should look identical.
Telerik.Windows.Controls.Chart.dll version 2012.3.1129.40

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Charts = new ObservableCollection<ChartItemsHolder>();
            Chart = new ChartItemsHolder();
            Chart.Items = new ObservableCollection<ChartItem>();
            for (int j = 0; j < 10; j++)
            {
                Chart.Items.Add(new ChartItem() { Value1 = 20 * j, Value2 = DateTime.Now.Ticks * j });
            }
            Charts.Add(Chart);
            DataContext = this;
 
        }
 
        public ObservableCollection<ChartItemsHolder> Charts { get; set; }
        public ChartItemsHolder Chart { get; set; }
    }
 
    public class ChartItemsHolder
    {
        public ObservableCollection<ChartItem> Items { get; set; }
    }
 
    public class ChartItem
    {
        public DateTime TimeStamp { get; set; }
        public double Value1 { get; set; }
        public double Value2 { get; set; }
    }

<Grid>
    <Grid.RowDefinitions>
      <RowDefinition />
      <RowDefinition />
    </Grid.RowDefinitions>
    <TabControl Grid.Row="0" ItemsSource="{Binding Charts, Mode=OneWay}">
      <TabControl.ContentTemplate>
        <DataTemplate>
          <chart:RadCartesianChart Grid.Column="3" EmptyContent="">
            <chartView:LineSeries Stroke="Red" ValueBinding="Value1" ItemsSource="{Binding Items}">
              <chartView:LineSeries.VerticalAxis>
                <chartView:LinearAxis Title="Value1" LabelFormat="F2"
                                      ElementBrush="Red"
                                      HorizontalLocation="Right" />
              </chartView:LineSeries.VerticalAxis>
            </chartView:LineSeries>
            <chartView:LineSeries Stroke="Gold" ValueBinding="Value2" ItemsSource="{Binding Items}">
              <chartView:LineSeries.VerticalAxis>
                <chartView:LinearAxis Title="Value2" LabelFormat="F0"
                                      ElementBrush="Gold"
                                      HorizontalLocation="Left" />
              </chartView:LineSeries.VerticalAxis>
            </chartView:LineSeries>
            <chart:RadCartesianChart.HorizontalAxis>
              <chartView:CategoricalAxis Visibility="Collapsed" />
            </chart:RadCartesianChart.HorizontalAxis>
          </chart:RadCartesianChart>
        </DataTemplate>
      </TabControl.ContentTemplate>
    </TabControl>
     
    <chart:RadCartesianChart Grid.Row="1" EmptyContent="d" DataContext="{Binding Chart}">
      <chartView:LineSeries  Stroke="Red" ValueBinding="Value1" ItemsSource="{Binding Items}">
        <chartView:LineSeries.VerticalAxis>
          <chartView:LinearAxis Title="Value1" LabelFormat="F2"
                                ElementBrush="Red"
                                HorizontalLocation="Right" />
        </chartView:LineSeries.VerticalAxis>
      </chartView:LineSeries>
      <chartView:LineSeries  Stroke="Gold"  ValueBinding="Value2" ItemsSource="{Binding Items}">
        <chartView:LineSeries.VerticalAxis>
          <chartView:LinearAxis Title="Value2" LabelFormat="F0"
                                ElementBrush="Gold"
                                HorizontalLocation="Left" />
        </chartView:LineSeries.VerticalAxis>
      </chartView:LineSeries>
      <chart:RadCartesianChart.HorizontalAxis>
        <chartView:CategoricalAxis Visibility="Collapsed" />
      </chart:RadCartesianChart.HorizontalAxis>
    </chart:RadCartesianChart>
  </Grid>

Missing User
 answered on 05 Feb 2013
5 answers
146 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
58 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
670 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
335 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
178 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
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
Slider
Expander
TileList
PersistenceFramework
DataPager
TimeBar
Styling
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
FilePathPicker
Licensing
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?