Telerik Forums
UI for WPF Forum
5 answers
119 views
I am trying to add a GridViewComboBoxColumn in radgridview dynmically usinfg the following code in my xaml.cs :

   GridViewComboBoxColumn comboColumn = new GridViewComboBoxColumn();
           
            comboColumn.DataMemberBinding = new Binding("CountryID");
            comboColumn.ItemsSource = GetCountries();
            comboColumn.DisplayMemberPath = "Name";
            comboColumn.UniqueName = "Name";
            comboColumn.SelectedValueMemberPath = "ID";
            this.RadGridView1.Columns.Add(comboColumn);


 private System.Collections.IEnumerable GetCountries()
        {
            List<Country> countries = new List<Country>();
            countries.Add(new Country() { ID = 0, Name = "Germany" });
            countries.Add(new Country() { ID = 1, Name = "Spain" });
            countries.Add(new Country() { ID = 2, Name = "UK" });
            return countries;
        }

When we select some value from the combobox and move to some other cell the binding for the combobox disapperas.
Kindly let us know your view as we are in the process of evaluating telirik radgridview control for one of our future wpf product devlopment.

Thanks
Anurag.


Tsvyatko
Telerik team
 answered on 24 Dec 2009
2 answers
235 views
Are there any examples of how to group data using the Pie Chart?  All of my attempts end with the entire pie showing just one of the possible groups.

            SeriesMapping seriesMapping = new SeriesMapping(); 
            seriesMapping.SeriesDefinition = new PieSeriesDefinition();
 
            seriesMapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("Baker")); 
 
            ItemMapping itemMappingValue = new ItemMapping("PieID", DataPointMember.YValue, ChartAggregateFunction.Count); 
            seriesMapping.ItemMappings.Add(itemMappingValue); 
 
            ItemMapping itemMappingKey = new ItemMapping("Baker", DataPointMember.LegendLabel); 
            seriesMapping.ItemMappings.Add(itemMappingKey); 
 
            RadChart1.SeriesMappings.Add(seriesMapping); 
 
            List<PieTest> pies = new List<PieTest>(); 
            pies.Add(new PieTest() { PieID = 1, Baker = "John", Crust = "Corn Meal", Filling = "Chili" }); 
            pies.Add(new PieTest() { PieID = 2, Baker = "Peter", Crust = "Graham Cracker", Filling = "Cream Cheese" }); 
            pies.Add(new PieTest() { PieID = 3, Baker = "Paul", Crust = "Graham Cracker", Filling = "Chocolate Cream" }); 
            pies.Add(new PieTest() { PieID = 4, Baker = "Paul", Crust = "Flour", Filling = "Apple" }); 
            RadChart1.ItemsSource = pies; 

So with my example, how would I show a pie chart that represents how many pies each Baker baked?
Brandon Strevell
Top achievements
Rank 1
 answered on 23 Dec 2009
1 answer
162 views
Hello guys,
I want to show some statistics about the drives installed on the machine, i wanted to use a pie chart for that.
But the question is how can i make the item's label to be more pleasant .. like 23.5GB / 58KB, how can stick the appropriate string at the end (GB/MB/KB so on...). 
Any suggestions?
Bartholomeo Rocca
Top achievements
Rank 1
 answered on 23 Dec 2009
9 answers
249 views
Hello, I want to generate columns of grid automaticaly. Everything works good except that generated colums have no data. Here is my code:
            try
{
LoadDataTable = SqlHelper.GetTable(LoadProcedureSelectName, Args);
}
catch (Exception e)
{
CreateSelectProcedure(LoadProcedureSelectName);
}
LoadData(LoadDataTable);

protected void LoadData(DataTable dataTable)
        {
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataMember = null;
            dataGridView1.Columns.Clear();
            LoadDataTable = dataTable;
            dataGridView1.ItemsSource = LoadDataTable.DefaultView;
            if (dataGridView1.Columns.Count == 0)
                GenerateColumns();
}
        protected void GenerateColumns()
        {
            dataGridView1.Columns.Clear();
            dt = SqlHelper.GetTable("base_Fields_SelectVisible", new string[] { "@UserID", Globals.UserID, "@TableName", _TableName });
            foreach (DataRow dr in dt.Rows)
            {
                if (dr["Type"].ToString().Equals("string"))
                {
                    GenerateTextBoxWPF(dr);
                }
            }
        }

private void GenerateTextBoxWPF(DataRow dr)
        {
            GridViewColumn col = new GridViewColumn();
            col.Name = dr["FieldName"].ToString();
            col.Header = dr["Caption"].ToString();
            col.UniqueName = dr["FieldID"].ToString();
            col.IsReadOnly = true;
            col.Width = Convert.ToInt32(dr["width"].ToString());

            dataGridView1.Columns.Add(col);
            if (dr["Visible"].ToString() == "1")
            {
                dataGridView1.Columns[dataGridView1.Columns.Count - 1].IsVisible = true;
            }
            else
            {
                dataGridView1.Columns[dataGridView1.Columns.Count - 1].IsVisible = false;
            }
}

What i do wrong. This technique worked very well with standart wpf grid and also with devExpress grid.


Tsvyatko
Telerik team
 answered on 23 Dec 2009
1 answer
722 views
Hello,
    I've implemented an undo capability into the grid. If a user changes the value of a field but they want to reverse the change they will click on the undo button and the change is undone. This undo functionality remembers only the last change. I've implemented this using List's and by clearing out the grid and re-building the grid using the data in the lists. It works but it's slow. Imagine re-building a 2000 row X 800 column grid. I tried saving the previous state of the data in the grid in another datatable and then getting rid of the current datatable and making this datatable the current one but I ran into many problems. Because rows and columns can be deleted the datatable rejectchanges() function is of no use.

Any ideals would be appreciated.

Thanks

Tsvyatko
Telerik team
 answered on 23 Dec 2009
2 answers
120 views
If you open Demo application and select Grid --> First Look --> Filter near any column. As soon as you select a dropdown "Is Equal To" to change the mode you got an excetpion: Recursive Call to Automation Peer API is not valid.

I think this is a bug related to the combobox, I opened another thread this morning related to the fact that RadCombo is raising exception in this release.

Hope this helps,

Ivan
4ward s.r.l.
Top achievements
Rank 1
 answered on 23 Dec 2009
5 answers
340 views
Hello!

I am willing to buy your wpf controls, but before, I need to be sure that I do following stuff with it:

1. drag items to other controls than the treeview itself (for that case, if would be nice if I still would have the "drag tooltip")
2. being able to change the texts "drop in", "drop before", etc...
3. Do filtering (I explain here what I need):
I have the following structure: 
aaa
   bbb
   ccc
      fff
ddd
   eee 
I enter a filter criteria "fff". Will the node be displayed, even though the node "aaa" and "ccc" do not match the criteria?

Thanks for your quick answer.

Best regards,

Marc Wuergler
Miroslav
Telerik team
 answered on 23 Dec 2009
1 answer
89 views
Hi,
  We would like to place a combobox in gridview header.How can we add the template in the gridview header.Kindly let us know your feedback  for the same on an urgent basis.

Thanks
Anurag
Missing User
 answered on 23 Dec 2009
4 answers
205 views
Is there a way to dock normal WPF Windows in the RadDock like you can with the winforms implementation ? Is there a way to dock the Telerik RadWindow control at all ? 

When I add items to the RadPaneGroup it always has to be a RadPane or iSplitItem.

I'm new to the WPF dock and really keen to get an old winforms application using RadDock for winforms upgraded to wpf.
Antonio
Top achievements
Rank 1
 answered on 23 Dec 2009
2 answers
69 views
Hi team,

Im getting "get_IsInDesignMode()    " error while trying create and object of Radwindow

here is the stack trace.

StackTrace = "   at Telerik.Windows.Controls.RadWindow.get_IsInDesignMode()    at Telerik.Windows.Controls.RadWindow..ctor()    at

please let me know how i can resolve this

-raj
orion systems india
Miroslav Nedyalkov
Telerik team
 answered on 23 Dec 2009
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
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?