Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
181 views
SOLVED:


I am get the following error:

  1. Uncaught TypeError: Cannot call method 'get_selected' of undefined Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&comp…e21a%3a650fdad%3aa960fda2%3aca44ff11%3a29e4ab07%3a59462f1%3aa51ee93e:27811
    1. b

I am removing all of the items of a listbox and then adding new items.  It works the first time but when i call the JavaScript function the second time I get an error.


//rangeitems looks like: "25|1.25,50|1.00,100|.85,125|.70"
var
items = listbox.get_items();
        items.forEach(function (item) {
            items.remove(item);
            listbox.trackChanges();
            listbox.get_items().remove(item);
            listbox.commitChanges();
        });
 
        for (i = 0; i < rangeitems.length; i++) {
            var items = rangeitems[i].split("|");
            var item = new Telerik.Web.UI.RadListBoxItem();
            item.set_text(items[1]);
            item.set_value(items[0]);
            listbox.trackChanges();
            listbox.get_items().add(item);
            listbox.commitChanges();
        }

I have a drop down that is loading the array as an attribute and I call this function using  onSelectedIndexChanged.

Any ideas?

Marty

Not sure what part fixed this issue but here is the new code if anyone has the same issue.

var items = listbox.get_items();
        items.clear();
        items.forEach(function (item) {
            items.remove(item);
            listbox.trackChanges();
            listbox.get_items().remove(item);
            listbox.commitChanges();
        });
        for (i = 0; i < rangeitems.length; i++) {
            listbox.trackChanges();
            var items = rangeitems[i].split("|");
            var item = new Telerik.Web.UI.RadListBoxItem();
            item.set_text(items[1]);
            item.set_value(items[0]);
            listbox.trackChanges();
            listbox.get_items().add(item);
            listbox.commitChanges();
        }



moegal
Top achievements
Rank 1
 asked on 12 Jul 2013
1 answer
159 views
I have used XAxis steps to ensure that ticks are placed every 1 step.

ChartSeries serieIndicator = new ChartSeries("Indicator") { Type = ChartSeriesType.Line };
 
serieIndicator.Items.Add(new ChartSeriesItem(0, 47));
serieIndicator.Items.Add(new ChartSeriesItem(1, 35));           
serieIndicator.Appearance.PointMark.Visible = true;
serieIndicator.Appearance.PointMark.Border.Width = 2;
serieIndicator.Appearance.PointMark.Border.Color = Color.RoyalBlue;
serieIndicator.Appearance.PointMark.Dimensions.AutoSize = true;
serieIndicator.Appearance.PointMark.Dimensions.SetDimensions(new Dimensions(6, 6));
serieIndicator.Appearance.PointMark.Dimensions.AutoSize = false;
serieIndicator.Appearance.PointMark.FillStyle.MainColor = Color.White;
serieIndicator.Appearance.PointMark.FillStyle.FillType = FillType.Solid;
 
RadChart1.Series.Add(serieIndicator);
 
RadChart1.PlotArea.XAxis.AutoScale = false;
RadChart1.PlotArea.XAxis.Step = 1;
 
ChartSeries serieObjective = new ChartSeries("Objective") { Type = ChartSeriesType.Line };
serieObjective.Appearance.PointMark.Visible = true;
serieObjective.Appearance.PointMark.Border.Width = 2;
serieObjective.Appearance.PointMark.Border.Color = Color.RoyalBlue;
serieObjective.Appearance.PointMark.Dimensions.AutoSize = true;
serieObjective.Appearance.PointMark.Dimensions.SetDimensions(new Dimensions(6, 6));
serieObjective.Appearance.PointMark.Dimensions.AutoSize = false;
serieObjective.Appearance.PointMark.FillStyle.MainColor = Color.White;
serieObjective.Appearance.PointMark.FillStyle.FillType = FillType.Solid;
serieObjective.Items.Add(new ChartSeriesItem(0, 20));
serieObjective.Items.Add(new ChartSeriesItem(1, 40));
serieObjective.Items.Add(new ChartSeriesItem(2, 60));
serieObjective.Items.Add(new ChartSeriesItem(3, 80));
 
RadChart1.Series.Add(serieObjective);

However I cannot understand the resulting chart.
Why seven steps if i only created chartseriesitem from 0 to 3?

Thanks for your help,
Sonia.
Sonia
Top achievements
Rank 1
 answered on 12 Jul 2013
2 answers
240 views
  Hi,

    I am using a radgrid with two detail tables. I wrote come code in InsertCommand of RadGrid.
But when i insert a detail record, InsertCommand fires.
I dont want that InsertCommand fires, when i insert detail record.

Could you suggest any solution for this?
Thanks.
Yunus
YUNUS EMRE
Top achievements
Rank 1
 answered on 12 Jul 2013
2 answers
313 views
Hello,

After upgrade my code to use with the latest version, 2013.2.611.40, the server-side code that updates the page's title in the pop-up window doesn't work any more. Could you take a look and let me know what I can do to make it happen. Thanks.

Tri

 

Partial Class PopWin
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Title = Now.ToString
 
    End Sub
End Class
 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="PopWin.aspx.vb" Inherits="PopWin" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
    </div>
    </form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
            function ShowEditForm(pageUrl, id, iWidth, iHeight) {
                var nWindow = window.radopen(pageUrl + ".aspx?id=" + id, "UserListDialog");
                nWindow.setSize(iWidth, iHeight);
                nWindow.center();
                nWindow.modal = true;
                nWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
                nWindow.show();
                return false;
            }
        </script>
    <telerik:RadScriptBlock runat="server" >
    </telerik:RadScriptBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <asp:Button ID="btn" runat="server" Text="Pop Window" OnClientClick="return ShowEditForm('PopWin', 0, 400, 300);" />
    </div>
    <telerik:RadWindowManager ID="WinMgr" runat="server" KeepInScreenBounds="true" Style="z-index: 7100;">
        <Windows>
            <telerik:RadWindow ID="UserListDialog" runat="server" Behaviors="Close, Move" Height="300px"
                Left="10px" Modal="true" ReloadOnShow="true" Opacity="100" Title="User List Dialog"
                Top="10px" Width="500px" KeepInScreenBounds="true">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </form>
</body>
</html>

 

 

 

Michael
Top achievements
Rank 1
 answered on 12 Jul 2013
1 answer
104 views
I have AllowAutomaticInserts = false

but it still shows on the grid is it because I have editMode = Batch?

<telerik:RadGrid ID="dgGrid" runat="server"
            AllowAutomaticUpdates="True"
            AutoGenerateColumns="False"
            CellSpacing="0"
            GridLines="None"
            Skin="Sitefinity"
            Width="100%"
            AllowAutomaticDeletes="True"
            AllowAutomaticInserts="False">
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView AllowNaturalSort="False" EditMode="Batch" BatchEditingSettings-OpenEditingEvent="DblClick">
                <BatchEditingSettings EditType="Cell" />
                <PagerStyle PageSizeControlType="RadComboBox" />
            </MasterTableView>
            <ItemStyle Wrap="False" />
        </telerik:RadGrid>


=================================== CODE

 

 

With dgGrid

 

 

 

'.MasterTableView.Columns.Add(editcolumn)

 

.MasterTableView.CommandItemDisplay =

 

GridCommandItemDisplay.Bottom

 

.MasterTableView.BatchEditingSettings.EditType =

 

GridBatchEditingType.Row

 

.MasterTableView.AllowAutomaticInserts =

 

False

 

 

 

End With

 



Princy
Top achievements
Rank 2
 answered on 12 Jul 2013
1 answer
104 views
Hi
I want to track multiple people work history in scheduler control, and it should be happened with filter, if i select one user it should show tasks related to that person only.

Left side it should show the user with check boxes and once if i select the check box data should display in scheduler control accordingly.

Could you help me how to apply filters to scheduler control.
Plamen
Telerik team
 answered on 12 Jul 2013
1 answer
146 views
Hi, 
I dont know which section to post this.
I have a sharepoint project. With 2 web parts(assume Grid 1 and 2) each having a radgrid. I created another webpart with having both of those webparts as usercontrol. Grid 1 is a normal radgrid and Grid 2 has a gridItemTemplate column which has a RadComboBox and a RadListBox. (See attachment for clarification)

I have attached the a sample project. To recreate the issue,  Add the "VisualWebPart1" to a page. It will have 2 grids with no data. Click add record in the top grid (i.e Grid 1). Then click add record on the bottom grid(i.e Grid 2). I get script error on the following line.

"Telerik.Web.UI.RadListBox._preInitialize("ctl00_m_g_48fd96ff_fcd9_4ad7_b892_f17a26434abb_ctl00_grid2_RadGrid2_ctl00_ctl03_ctl01_rdSelectedUsers","0");"

Error : "SCRIPT5007: Unable to get value of the property '_preInitialize': object is null or undefined "


Download Sample Proj.
Plamen
Telerik team
 answered on 12 Jul 2013
1 answer
73 views
Hi,

I have a RadGrid Inside TabTemplate of RadTabStrip. I upload the data to RadGrid from an asp button click event(c# ode).

The problem is I am not able to findcontrol of RadGrid from the button. 

Can someone tell me how to get around this problem?

Code for Button:

protected void Button2_Click(object sender, EventArgs e)
{filldata();
}
filldata()
{
radgrid1.DataSource=list; // list is my data source
radgrid1.DataBind();
}


Also, I don't have license to Radtabs hence using TabTemplate. I have also tried findcontrol but its not working with button EvenArgs.

RadGrid grv1 = (RadGrid)RadTabStrip1.FindControl("radgrid1");

Thanks,
Shinu
Top achievements
Rank 2
 answered on 12 Jul 2013
4 answers
331 views
I'm having an issue where my sorting appears to be working properly on the client, but when i select a row from the sorted records, i get the data for that row from the previous, un-sorted record. 
So if my original data set looked like:
12345

After the sort it looked like:
54321

And i select "4", programmatically it returns "2".

Any ideas?

Thanks in advanced for your help.
Princy
Top achievements
Rank 2
 answered on 12 Jul 2013
1 answer
200 views
I have multiple RadListBox that basically are doing the same and has more likely the same behavior except maybe for the data, so I want to use the same RadContextMenu for all of them but on the OnItemClick(server side) I need to know which of those controls call it, How can I approach this?
Thanks in advance
Shinu
Top achievements
Rank 2
 answered on 12 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?