Telerik Forums
UI for WPF Forum
10 answers
56 views
Hey,

using Q2 2009

I have a grid with relation based on a dataset.

I am trying to iterate over the child rows in the grid.

It seems that the "ExpandableDataRecord" does not have the
"ChildRecordManagers" property.

How I can I find the child rows ?

Thanks.
Vlad
Telerik team
 answered on 10 Sep 2009
2 answers
103 views
Hi,

I have a simple (I guessed) problem.
I use a linechart which displays datapoints with a DateTime for the XAxis.
It has between 20 and 100 datapoints. (the point distance is between 0.1 and 0.8 seconds).

All I want are labels on the XAxis which show every second a tick and an alternate view which shows all 2 seconds a tick.

I guess I do something completely wrong :)
To find the value I display the label in the format "ss.f"
I messed around with the two seconds an reached now at this point:
rcData.DefaultView.ChartArea.AxisX.Step = 0.000022890946517388024;
But still I have some "drift" - this means I get:
17.3, 19.4, 21.5...and it ends in 37.9, 40.0 instead of 39...

Since I can't imagine that it is that difficult to have a XAxis with labels for one second or 2 seconds it stop playing around and ask for a solution here; because I think what I try it totally wrong.

So the simple question:
a.) how to have a XAxis with labels every second
b.) how to have a XAxis with labels every 2 seconds

Regards

Manfred
ManniAT
Top achievements
Rank 2
 answered on 09 Sep 2009
1 answer
127 views
How to set GridView.SelectedItem in Example below?

Gridview.ItemSource is setted datatable that includes Vendors(Vendor class)

public void setSelectedItem(Vendor handledVendor)
{
    GridView.SelectedItem = (object)handledVendor;             //What must code be?
}
Milan
Telerik team
 answered on 09 Sep 2009
3 answers
255 views
If there is not a way to do this already, I would like to request that you make the DateTimePicker control have a property where you can specify 12-hour or 24-hour based times.  Thanks...

Yavor
Telerik team
 answered on 09 Sep 2009
2 answers
84 views
Hi,

Since I upgraded to Q2 SP1, the treeview lines became gray. Is there a way to change the color of the lines?

Thanks,
Ruben.
Dimitrina
Telerik team
 answered on 09 Sep 2009
1 answer
25 views
In order to filter my child grid
I try to do the folowing
but now the OnChildGridLoaded
happens few times and I get the child grid few times

 private void OnChildGridLoaded(object sender, RoutedEventArgs e)  
        {  
                try  
                {  
                    if (((ComboBoxValues.ComboValues)cmbActivityType.SelectedValue).Id != 0)  
                    {  
                        dsAcoount.Tables["Budget"].DefaultView.RowFilter = "ActivityTypeID=" + ((ComboBoxValues.ComboValues)cmbActivityType.SelectedValue).Id;  
                        ((RadGridView)sender).ItemsSource = null;  
                        ((RadGridView)sender).ItemsSource = dsAcoount.Tables["Budget"].DefaultView;  
                    }  
Thanks!
Orit
Orit
Top achievements
Rank 1
 answered on 09 Sep 2009
3 answers
126 views
From line 1148 in RadDragAndDropManager.cs in the source  of 08/13

if (el.VisualHit != null && (el.VisualHit as UIElement).IsHitTestVisible)


System.Windows.Media.DrawingVisual doesn't inherit from UIElement, so the as returns null and we get an exception.

Allan Elder
Top achievements
Rank 1
 answered on 08 Sep 2009
1 answer
104 views
Hello,

I have a very simple question: I want to select multiple cells in the GridView, but I can't find the option to do it, and the SelectionMode property is not available. So far all it does is select the whole row, where I want to be able to select only a cell.
Any clue?

Thanks in advance.
Vlad
Telerik team
 answered on 08 Sep 2009
2 answers
207 views
Guys,

I honestly tried your WPF controls, and I must say, the overall impression is not good.

With my first project, I found:
1) The RadGridView control has a bug where items added to bound collections do not display correctly. Component One's grid works.
2) The Toolbox gets some huge amount of classes added to it that are not even controls. Not productive to scroll through a giant list, and I should NOT have to go registry hacking to fix this.
3) Scheduler has no resource support, so I'm told to wait until the next release. Telerik's is easier to work with than C1, but lacks this key feature.

This is the same experience I had last time with Telerik's controls. Bugs!

So I've about 7 days left in evaluation to decide where to spend my $$ and I cannot figure out why I should pay over $1k when all I have used so far with success is the DatePicker. I'd love to buy Telerik, because the documentation is better than the competition, and there are a lot of sample projects, but I get the feeling that the kit isn't well tested, and I cannot afford to make the wrong choice since this app will ship to my customers and become something I must support and base my business off of.
Kaloyan
Telerik team
 answered on 08 Sep 2009
0 answers
111 views
I arranged my "things to do"
and now I need tow things
1. have the ability to filter the child rows
2.  have the ability to filter the items in the ComboBoxColumn of the child grid

I think to do it in the OnChildGridLoaded
when I get to it the value in the ((RadGridView)sender).ItemsSource
is {System.Linq.Enumerable.WhereEnumerableIterator<System.Data.DataRow>}

how can I filter it? or is there another way to filter


 

private void BindDataMainGrid()  
        {  
            try  
            {  
                thisthis.gvAccount.ItemsSource = this.GetData();              
            }  
            catch{}  
        }  
 
        private DataSet GetData()  
        {  
            try  
            {  
                dsb = ServiceData.GetBudgetsByOBS(iOBSID);  
                if (dsb != null)  
                {  
                    dsb.Tables["Budget"].Columns.Add("SumBudgetAllocation", typeof(float));  
                    dsb.Tables["Budget"].Columns.Add("SumBudgetRequest", typeof(float));  
                    dsb.Tables["Budget"].Columns.Add("SumOrderAllocation", typeof(float));  
                    dsb.Tables["Budget"].Columns.Add("SumOrderPaid", typeof(float));  
                   
                    foreach (DataRow dr in dsb.Tables["Budget"].Rows)  
                    {  
                        dr["RowStatus"] = 0;  
                        if (dsb.Tables["BudgetAllocation"].Select("id=" + Convert.ToInt32(dr["ID"])).GetLength(0) > 0)  
                        {  
                            dr["SumBudgetAllocation"] = Convert.ToDecimal(((LM_Model.dsBudget.BudgetAllocationRow)dsb.Tables["BudgetAllocation"].Select("id=" + Convert.ToInt32(dr["ID"]))[0]).ItemArray[1]);  
                        }  
                        if (dsb.Tables["BudgetRequest"].Select("BudgetId=" + Convert.ToInt32(dr["ID"])).GetLength(0) > 0)  
                        {  
                            dr["SumBudgetRequest"] = Convert.ToDecimal(((LM_Model.dsBudget.BudgetRequestRow)dsb.Tables["BudgetRequest"].Select("BudgetId=" + Convert.ToInt32(dr["ID"]))[0]).ItemArray[1]);  
                        }  
                        if (dsb.Tables["BudgetOrder"].Select("BudgetId=" + Convert.ToInt32(dr["ID"])).GetLength(0) > 0)  
                        {  
                            dr["SumOrderAllocation"] = Convert.ToDecimal(((LM_Model.dsBudget.BudgetOrderRow)dsb.Tables["BudgetOrder"].Select("BudgetId=" + Convert.ToInt32(dr["ID"]))[0]).ItemArray[1]);  
                        }  
                        if (dsb.Tables["BudgetOrderPaid"].Select("Id=" + Convert.ToInt32(dr["ID"])).GetLength(0) > 0)  
                        {  
                            dr["SumOrderPaid"] = Convert.ToDecimal(((LM_Model.dsBudget.BudgetOrderPaidRow)dsb.Tables["BudgetOrderPaid"].Select("Id=" + Convert.ToInt32(dr["ID"]))[0]).ItemArray[1]);  
                        }  
                    }  
                     
                    dsb.Tables["Budget"].Columns.Add("BalanceBudgetAllocation", typeof(float), "TotalBudget-SumBudgetAllocation");  
                    dsb.Tables["Budget"].Columns.Add("BalanceToPay", typeof(float), "SumBudgetRequest-SumOrderPaid");  
                      
                    //Build dsAcoount  
                    dsAcoount = new DataSet();  
                    DataView dv = new DataView(dsb.Tables["Budget"], "Type=1", "", DataViewRowState.CurrentRows);  
                    dsAcoount.Tables.Add((DataTable)dv.ToTable("Account"));  
                    dv = new DataView(dsb.Tables["Budget"], "Type=2", "", DataViewRowState.CurrentRows);  
                    dsAcoount.Tables.Add((DataTable)dv.ToTable("Budget"));  
                    dv = new DataView(dsb.Tables["Budget"], "Type=3", "", DataViewRowState.CurrentRows);  
                    dsAcoount.Tables.Add((DataTable)dv.ToTable("SubBudget"));  
                                    
                    LM_Model.clsEnums.BudgetType eVal = clsEnums.BudgetType.Investment;  
                    decimal dCurrentInvestment = Convert.ToDecimal(dsAcoount.Tables["Account"].Compute("SUM(TotalBudget)", "BudgetType=" + Convert.ToInt32(eVal)));  
                    txtbInvestmentSum.Text = dCurrentInvestment.ToString("#,##0.00");  
                    eVal = clsEnums.BudgetType.Continuous;  
                    decimal dCurrentContinues = Convert.ToDecimal(dsAcoount.Tables["Account"].Compute("SUM(TotalBudget)", "BudgetType=" + Convert.ToInt32(eVal)));  
                    txtbContinuesSum.Text = dCurrentContinues.ToString("#,##0.00");  
 
                    decimal dInvestmentBaseline = Convert.ToDecimal(dsb.Tables["BaselineBudget"].Rows[0]["InvestmentBaseline"]);  
                    decimal dContinuesBaseline = Convert.ToDecimal(dsb.Tables["BaselineBudget"].Rows[0]["ContinuesBaseline"]);  
 
                    decimal dI = (dCurrentInvestment / dInvestmentBaseline - 1) * 100;  
                    decimal dC = (dCurrentContinues / dContinuesBaseline - 1) * 100;  
 
                    txtInv.Text = dI.ToString("#.00");  
                    txtCon.Text = dC.ToString("#.00");  
 
                    DateTime dDate = (DateTime)dsb.Tables["BaselineBudget"].Rows[0]["Date"];  
                    txtBLDate.Text = dDate.ToString("dd/MM/yyyy");  
 
                    //Add Relations  
                    dsAcoount.Relations.Add("BudgetRelation",  
                    dsAcoount.Tables["Account"].Columns["Number"],  
                    dsAcoount.Tables["Budget"].Columns["ParentID"]);  
                      
                    dsAcoount.Relations.Add("SubBudgetRelation",  
                    dsAcoount.Tables["Budget"].Columns["Number"],  
                    dsAcoount.Tables["SubBudget"].Columns["ParentID"]);  
                      
                    return dsAcoount;  
                }  
            }  
            catch { }  
            return null;  
        }  
 
Orit
Top achievements
Rank 1
 asked on 08 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?