Telerik Forums
UI for WPF Forum
3 answers
681 views

We currently have an admin page that allows us to search for customers by email. My task is to also implement functionality that allows us to see all of a particular customer's orders for the past two weeks when we make that search. I modeled this data binding after the current data binding that exists, but it just causes a stack overflow exception, and I'm not sure what I'm doing wrong. Here's the markup:

 

<telerik:RadGrid ID="MailingsGrid" runat="server" AllowSorting="True" CellSpacing="0" GridLines="None" PageSize="50" OnItemDataBound="MailingsGrid_ItemDataBound">
    <MasterTableView Width="100%" NoMasterRecordsText="No users found" AutoGenerateColumns="false">
        <Columns>
            <telerik:GridBoundColumn DataField="Sub_Order_ID" HeaderText="Sub_Order_ID" UniqueName="Sub_Order_ID" ReadOnly="true" DataType="System.Int32" FilterControlAltText="Filter Sub_Order_ID column" SortExpression="Sub_Order_ID" />
                <telerik:GridBoundColumn DataField="Num_Pages" HeaderText="Num_Pages" UniqueName="Num_Pages" ReadOnly="true" DataType="System.Int32" FilterControlAltText="Filter Num_Pages column" SortExpression="Num_Pages" />
                    <telerik:GridTemplateColumn SortExpression="Address_1" HeaderText="Recipient" HeaderButtonType="TextButton" GroupByExpression="Address_1 Group by Address_1" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" ReadOnly="true" ItemStyle-Wrap="false">
                        <ItemTemplate><%#MailALetter.Common.FormatAddressTo(DataBinder.Eval(Container, "DataItem.Title"), DataBinder.Eval(Container, "DataItem.Name"), DataBinder.Eval(Container, "DataItem.JobTitle"), DataBinder.Eval(Container, "DataItem.Company"), DataBinder.Eval(Container, "DataItem.Address_1"), DataBinder.Eval(Container, "DataItem.Address_2"), DataBinder.Eval(Container, "DataItem.Address_3"),  DataBinder.Eval(Container, "DataItem.City"), DataBinder.Eval(Container, "DataItem.State"),  DataBinder.Eval(Container, "DataItem.Zip_Code_5"), DataBinder.Eval(Container, "DataItem.Zip_Code_4"),  DataBinder.Eval(Container, "DataItem.Country"))%>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="Date_Created" DataType="System.DateTime" FilterControlAltText="Filter Date_Created column" HeaderText="Date_Created" ReadOnly="True" SortExpression="Date_Created" UniqueName="Date_Created">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Date_Fullfilled" DataType="System.DateTime" FilterControlAltText="Filter Date_Fullfilled column" HeaderText="Date_Fullfilled" ReadOnly="True" SortExpression="Date_Fullfilled" UniqueName="Date_Fullfilled">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

And here's the code behind:

protected void SearchButton_Click(object sender, EventArgs e)
    {       
        string EmailSearchTerm = SearchText.Text;
 
        UserResults = DBContext.Users.Where(x => SqlMethods.Like(x.Email, "%" + EmailSearchTerm + "%")).ToList();
        MembershipResults = DBContext.Memberships.Where(x => UserResults.Select(y => y.UserId).Contains(x.UserId)).ToList();
        SearchResults.DataSource = UserResults;
        // This line is causing the overflow exception
        MailingsGrid.DataSource = DBContext.LetterReports.Where(x => x.UserID.Equals(MembershipResults[0].UserId)).ToList();
        SearchResults.Rebind();
        MailingsGrid.DataBind();
    }

protected void MailingsGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
 
            string SubOrderId = item.GetDataKeyValue("Sub_Order_ID").ToString();
            string DateCreated = item.GetDataKeyValue("Date_Created").ToString();
            string DateFullfilled = item.GetDataKeyValue("Date_Fulfilled").ToString();
            string Pages = item.GetDataKeyValue("Num_Pages").ToString();
        }
    }

Any help would be greatly appreciated, this is the latest of many iterations, and I'm kind of at a loss at this point.

Eyup
Telerik team
 answered on 12 Jul 2016
10 answers
530 views
By default RadWindow.Confirm defaults to OK button, how would I set the Cancel button to be the default?
Yana
Telerik team
 answered on 12 Jul 2016
1 answer
133 views

Hello! 

 

I'm trying to limit the RowSubTotals that it's showing in a pivot, I only want the first level of RowSubTotal. I attached a image where show a first subtotal in green, that i want to keep that values, but in it's show in red the subtotal that i don't want to show. Can someone help me?

 

 

Thanks :)

Polya
Telerik team
 answered on 11 Jul 2016
1 answer
65 views

http://www.telerik.com/forums/incorrect-caret-position-when-bookmark-is-at-the-begnning-of-the-paragraph

I have a issue which is exactly the same as this thread talked. Is there any recent updates on it? As the  trace link there(http://www.telerik.com/support#/public/silverlight/11471) is not available any more. 

 

Thanks.

Petya
Telerik team
 answered on 11 Jul 2016
6 answers
675 views

Telerik grid row is overlapping when GridViewDataColumn is having multiline text.

Workaround : If we resize column or apply any filter, row overlapping disappears.

How do we avoid this row overlapping?

            <telerik:GridViewDataColumn
                        DataMemberBinding="{Binding ConnectedCardInfo, Mode=OneWay}"
                        IsReadOnly="True" UniqueName="ConnectedCardInfo">

                <telerik:GridViewDataColumn.Header>
                    <TextBlock Text="Connected Card Info" TextWrapping="WrapWithOverflow" ToolTip="Connected Card Info"/>
                </telerik:GridViewDataColumn.Header>
            </telerik:GridViewDataColumn>

Stefan Nenchev
Telerik team
 answered on 11 Jul 2016
1 answer
131 views

Hello. We have got a weird issue. We have a data provider which returns IQueryable like

Source = new QueryableCollectionView(_dbContext.Orders.AsNoTracking());

Then it's bound to the rad grid view.

 

The problem appears when edit mode is activated, after lost focus new row to the gridview is added. If I don't use AsNoTracking it works fine.

Stefan Nenchev
Telerik team
 answered on 11 Jul 2016
1 answer
97 views

I'm trying to change the line colour of the entire ScheduleView - I've got as far as changing the TimeRulerLineStyle to the desired colour and the Major/Minor Ticks and I've also changed the colour of the GroupHeader borders, but there are a few lines that still seem to take the value of the Office Black theme which I am using and I want to know what they are part of so I can change them - please see attached screenshot (red circles).

There is a blue circle on the screenshot - I would like a line joining the top of my resources to the DefinitionView bar - is this possible?

Yana
Telerik team
 answered on 11 Jul 2016
2 answers
198 views

Hello;

 I am working with RadScheduleView for WPF in my project. The goal is to define typical week days appointement with different catagories. When the user double click on a specific appoitment, we need to assign a selected user considered as responsible for that period.

The project makes use of MEF and MVVM logic to implement the view. The issue I get is that I am unable to select any defined appointement. The selected appointment variable is null in my view model and it is not highlighted when clicked

 

I did the same thing with a new window, and it works perfectly.

So, is there any issue regarding the use of RadScheduleView in MEF/MVVM logic ? Do you see any other issue that may explain the issue ?

 

Thanks for your reply

Best regards

Alireza
Top achievements
Rank 1
 answered on 09 Jul 2016
7 answers
191 views

I have an instance of RadTreeListView in my WPF MVVM Prism 6 application (my application is pure MVVM without code behind). I'm interested in searching of specified item in RadTreeListView in a programmatical way. The instance of RadTreeView in my application is bound to an instance of ObservableCollection comprising hierarchical data.

private ObservableCollection<ProfileElementType> _myCollection = new ObservableCollection<ProfileElementType>();
 
// This property is the data source for RadTreeListView.
public ObservableCollection<ProfileElementType> MyCollection
{
    get{return this _myCollection;}
    set{this.SetProperty(ref this._myCollection, value);}
}

ProfileElementType class is the base class for two classes that are derived from him. These derived classes are: Group and Register. The definition of ProfileElementType class, Group class and Register class you can see in my post in Stackoverflow at:  http://stackoverflow.com/questions/37058259/why-is-invalideoperationexception-thrown-when-i-try-to-serialize-to-xml-an-obser .  In "Hierarhy.PNG" attached file you can see how hierarchy is displayed in RadTreeView on the screen. In pure MVVM I can use only properties and mapped to commands events. But I can't use control's methods there. Is it possible to realize search in such RadTreeView in pure MVVM application?

P.S. If you need any additional Information please tell about it.

Stefan
Telerik team
 answered on 08 Jul 2016
1 answer
98 views
Is it possible to have different section columns setting at the same page? For example, two columns at upper page and no column at lower page.
Boyko
Telerik team
 answered on 08 Jul 2016
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?