Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
161 views
Hi

One of my websites had radgrids and radtrees to display data.  When the user clicks a row a RadDock windo appears with the data in it.  All worked fine until the 2013 Q1 upgrade.  Now on the second load I get an Invalid JSON primitive error (as below)

Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive: {"Top":50,"Left":225,"DockZoneID":"","Collapsed":false,"Pinned":true,"Resizable":false,"Closed":false,"Width":"821px","Height":null,"ExpandedHeight":0,"Index":-1,"IsDragged":false}.

If I put the RadDock in a RadDockZone it doesn't have the error however it renders inline with the page instead of as a floating window.

Any suggestions on what has happened and why this happens on the 2nd load rather than the first?

Regards

Jon


Jon
Top achievements
Rank 1
 answered on 26 Apr 2013
3 answers
72 views
I want to use RadChart to show the evolution of an indicator value compared to an objective value along a configurable period.

A database query returns the list of values, however maybe there is no values for all the periods.

01/01/2013 47,32
01/02/2013 35,36
01/03/2013 60,53
01/04/2013 82,75

I made the DataBind from a SqlDataReader.

On the other hand i know the objective value at the begining of the period and at the end of the period, for example:

01/01/2013
20           //This is the objective value in the first period
01/12/2013 120 //This is the objective value in the last period


ChartSeries serieObjective = new ChartSeries("Objective") { Type = ChartSeriesType.Line };
serieObjective.Items.Add(new ChartSeriesItem(1, 20));

int
periods = NumberOfPeriods(firstPeriod, lastPeriod);  //Returns the number of periods (in this example 12)
serieObjective.Items.Add(new ChartSeriesItem(periods, 120));
chart.Series.Add(serieObjective);

In my chart I only can see the first 4 periods as the first serie only has 4 values.
Therefore I cannot see the value of the second serie at the end of the period.

Any suggestion.
Thank you in advance.
Sonia
Top achievements
Rank 1
 answered on 26 Apr 2013
12 answers
944 views
Hello Sir,


I had used in radwindow in more pages.Now i want to change the left side default icon in all the pages.

How i will change the default left icon to my new icon.I want to need any script so i will apply in one user control or my main page so it will be effect to all other my pages, i don't want to change that icon path in all the pages.

So is there any script or css for it will effect to alll the pages?


Please help me.

Thanks & Regards
Jignesh Patel

Ashwin
Top achievements
Rank 1
 answered on 26 Apr 2013
1 answer
79 views
Hi,
  I have using RadGrid. In default row set in 5. Assign the more than 5 rows how could i add row

This is my coding its working good but greater then 4 row empty row added previous row value clear.

using (var db = new DoskContractServicesDataContext(Globals.strCon))
            {
                var ClaimAssign = (from a in db.DSProjectMasters
                                   where !db.ProjectSubCons.Any(b => b.ProjectCode == a.ProjectCode && b.status != "DEL" && b.compcode == a.CompCode && b.Subconcode==Subcontractor.SelectedValue) && a.CompCode == compcode && a.FinalStatus == "Cls" && a.Status != "DEL"
                                   select new { a.ProjectCode, a.ProjectTitle,a.DtCommencement,a.DtCompletion,a.ContractAmount }).ToList();
                for (int i = 0; i <= RadGrid1.MasterTableView.Items.Count - 1; i++)
                {
                    Label SNO = (Label)RadGrid1.MasterTableView.Items[i].FindControl("Sno");
                    RadTextBox ProjectID = (RadTextBox)RadGrid1.MasterTableView.Items[i].FindControl("ProjectID");
                    RadTextBox ProjectTitle = (RadTextBox)RadGrid1.MasterTableView.Items[i].FindControl("ProjectTitle");
                    Label claimnostart = (Label)RadGrid1.MasterTableView.Items[i].FindControl("claimnostart");
                    RadDatePicker RadDatePicker1 = (RadDatePicker)RadGrid1.MasterTableView.Items[i].FindControl("Mainprojectcommencement");
                    RadDatePicker RadDatePicker2 = (RadDatePicker)RadGrid1.MasterTableView.Items[i].FindControl("MainprojectCompletion");
                    HiddenField MainContractAmount = (HiddenField)RadGrid1.MasterTableView.Items[i].FindControl("MainContractAmount");

                    if (ClaimAssign.Count() > i)
                    {
                        SNO.Text = Convert.ToString(i + 1);
                        ProjectID.Text = ClaimAssign[i].ProjectCode.ToString();
                        ProjectTitle.Text = ClaimAssign[i].ProjectTitle.ToString();
                        RadDatePicker1.SelectedDate = ClaimAssign[i].DtCommencement;
                        RadDatePicker2.SelectedDate = ClaimAssign[i].DtCompletion;
                        MainContractAmount.Value = ClaimAssign[i].ContractAmount.ToString();
                        claimnostart.Text = ClaimAssign[i].ProjectCode.ToString() + "/" + compcode + "/" + "PCL";
                        if (i >= 4)
                            addrow(i);
                    }
                }
            }

 private void addrow(int currow)
        {
            object[] emptyRow = new object[columcount];
            tabledata1 = null;
            DataTable dt = tabledata1;
            assigndt2(dt);
            dt.Rows.Add(emptyRow);
            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();
        }

private void assigndt2(DataTable dt)
        {
            RadTextBox r1;
            RadNumericTextBox rn1;
            CheckBox c1;
            Label l1;
            HiddenField h1;
            RadDatePicker d1;

            for (int i = 0; i <= RadGrid1.Items.Count - 1; i++)
            {
                if (dt.Rows.Count - 1 < i)
                {
                    object[] emptyRow = new object[columcount];
                    dt.Rows.Add(emptyRow);
                }
                //c1 = (CheckBox)RadGrid1.Items[i].FindControl("active");
                //dt.Rows[i]["active"] = c1.Text;
                l1 = (Label)RadGrid1.Items[i].FindControl("Sno");
                dt.Rows[i]["Sno"] = l1.Text;
                r1 = (RadTextBox)RadGrid1.Items[i].FindControl("ProjectID");
                dt.Rows[i]["ProjectID"] = r1.Text;
                r1 = (RadTextBox)RadGrid1.Items[i].FindControl("ProjectTitle");
                dt.Rows[i]["ProjectTitle"] = r1.Text;
                r1 = (RadTextBox)RadGrid1.Items[i].FindControl("Subcontitle");
                dt.Rows[i]["Subcontitle"] = r1.Text;
                d1 = (RadDatePicker)RadGrid1.Items[i].FindControl("DateofCommencement");
                dt.Rows[i]["DateofCommencement"] = d1.SelectedDate;
                d1 = (RadDatePicker)RadGrid1.Items[i].FindControl("Mainprojectcommencement");
                dt.Rows[i]["Mainprojectcommencement"] = d1.SelectedDate;
                d1 = (RadDatePicker)RadGrid1.Items[i].FindControl("DateofCompletion");
                dt.Rows[i]["DateofCompletion"] = d1.SelectedDate;
                d1 = (RadDatePicker)RadGrid1.Items[i].FindControl("MainprojectCompletion");
                dt.Rows[i]["MainprojectCompletion"] = d1.SelectedDate;
                rn1 = (RadNumericTextBox)RadGrid1.Items[i].FindControl("ContractAmount");
                dt.Rows[i]["ContractAmount"] = rn1.Text;
                h1 = (HiddenField)RadGrid1.Items[i].FindControl("MainContractAmount");
                dt.Rows[i]["MainContractAmount"] = h1.Value;
                rn1 = (RadNumericTextBox)RadGrid1.Items[i].FindControl("LD");
                dt.Rows[i]["LD"] = rn1.Text;
                d1 = (RadDatePicker)RadGrid1.Items[i].FindControl("tentativedate");
                dt.Rows[i]["tentativedate"] = d1.SelectedDate;
                l1 = (Label)RadGrid1.Items[i].FindControl("claimnostart");
                dt.Rows[i]["claimnostart"] = l1.Text;
                rn1 = (RadNumericTextBox)RadGrid1.Items[i].FindControl("autoclaimno");
                dt.Rows[i]["autoclaimno"] = rn1.Text;
                rn1 = (RadNumericTextBox)RadGrid1.Items[i].FindControl("paymentcert");
                dt.Rows[i]["paymentcert"] = rn1.Text;
            }
        }


Thanks & Advance
Ansari.
Eyup
Telerik team
 answered on 26 Apr 2013
3 answers
1.0K+ views
What I am trying to do is open a popup window on a linkbutton click on a radgrid.  Tried 2 methods and alls the page does is postback and produce no window.  What I would like is a window to open so that they can email someone from the window that pops up.

1st method, not working

<telerik:GridTemplateColumn HeaderText="RESCHEDULE">
                       <ItemTemplate>
                           <asp:ImageButton ID="imgSched" runat="server" CommandName="reSched" CommandArgument='<% #Bind("intEOLId") %>' ImageUrl="~/Images/Bones.png" OnClientClick="javascript:window.open('../Admin/Email.aspx?EolId);" Height="30px" Width="30px" />
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>


2nd method not working
If (e.CommandName = "reSched") Then
           Dim EolId As Integer = Convert.ToInt32(e.CommandArgument)
           Dim item As GridDataItem = TryCast(e.Item, GridDataItem)
           Dim linkSched As ImageButton = DirectCast(item.FindControl("imgSched"), ImageButton)
           Dim Vreturn As String = ""
 
 
           linkSched.Attributes.Add("onclick", "javascript:window.open('../Admin/Email.aspx?EolId=" & EolId & "'); return false;")
 
           'sql = "Execute usp_EOLResched " & EolId
 
           'Vreturn = getData(sql).Rows(0)(0)
 
           'If Vreturn = "1" Then
           '    Fillgrid = True
           '    myRadGrid.Rebind()
           'End If
 
       End If

Shinu
Top achievements
Rank 2
 answered on 26 Apr 2013
3 answers
229 views
Hi,
We have a RadButton with Target property set to "_blank".  In the OnClick method we have Response.Redirect("www.google.com").

But the requested url is not opening in new window. Any suggestion is appreciated. Thanks in advance.
Prathyusha
Top achievements
Rank 1
 answered on 26 Apr 2013
1 answer
92 views
I have a RodComboBox that has default values loaded in from a dataset, but I am also allowing the user to enter a new value if their desired option is not in the list.  I have auto complete on, but if a user types fast enough they can enter a duplicate of an existing value.  What I want to do is verify the entered value does not match an existing value.  If the value does exist I would like to return it's value.  ASP's ComboBox has the method FindStringExact which seems to be perfect for this scenario, but I have not seen this method in the RadComboBox.  I'm using Q2 2012 if that helps.

Thanks
Shinu
Top achievements
Rank 2
 answered on 26 Apr 2013
1 answer
142 views
Ok so my problem is that I cant set the checkboxes from node on true state.

my treeView is in a .ascx

this is the event for my RadGrid at .aspx where I have my usercontrol.ascx as a Template for Edit Mode
protected void dtg_ItemCreated(object sender, GridItemEventArgs e)
        {
            #region dtgCatalogos_ItemCreated
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
                if (e.Item.DataItem != null)
                {
                    string name = e.Item.DataItem.ToString();// 
                    UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
                    RadTreeView radTreeView = (userControl.FindControl("tvRoles") as RadTreeView);
                    radTreeView.DataSource = SOMEDATASOURCE1;
                    radTreeView.DataBind();
 
                    foreach (RadTreeNode node in radTreeView.Nodes)
                    {
                             node.Checked = true;
                    }
                }
            }
}
here I set the check nodes to TRUE

but at the time I display the treeView it doesnt have any checked nodes

this is my .ascx

<telerik:RadTreeView runat="server"  ID="tvRoles" DataValueField="ProcesoId" DataTextField="ProcesoDescr" CheckBoxes="true" CheckChildNodes="true" TriStateCheckBoxes="true" CausesValidation="false" />

please, someone knows what am I doing wrong?

Thanks
Shinu
Top achievements
Rank 2
 answered on 26 Apr 2013
1 answer
119 views
I am using RadAsyncUpload with ManualUpload="true". When I select a file, it shows up with a pulsing yellow circle, the file name and a cancel button.

I and my users would like to not have that pulsing yellow circle be displayed. I've tried various CSS to do so, but have not managed to find the correct incantation. Can someone tell me how to remove or hide it? Thanks.
Shinu
Top achievements
Rank 2
 answered on 26 Apr 2013
3 answers
201 views
Hi,

I have a rad grid but when in edit mode I need to set one of the columns default value to the selectedvalue of a combo box?  How can this be done in VB.

Thanks,

Princy
Top achievements
Rank 2
 answered on 26 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?