Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
139 views
Hello,

I am trying to user the insertItem function (in Javascript) for the RadListBox. 

Here is my code:

var

 

listBox = $find("<%= rlbSelectedContacts.ClientID %>");

 

 

var arr = [];

 

 

for (var i = 0; i < 10; i++) {

 

 

var item = new Telerik.Web.UI.RadListBoxItem();

 

item.set_text(

"text" + i);

 

arr[i] = item;

}

listBox.insertItems(arr);




When I run this script, it is telling me that "Microsoft JScript runtime error: Object doesn't support this property or method" regarding the insertItems() function.  listBox is not NULL in my script.  Any ideas?

I need to insert 2000+ items into the list box and a bulk insert would do wonders.

Thanks!
Dave
Yana
Telerik team
 answered on 15 Mar 2010
3 answers
348 views
Hi,

I am using Client-side update/insert/delete Grid. My programs is pretty much similar to your demo of the grid. The grid works fine if I already have some rows in the grid and then doing insert/update. However when I try to insert the first the row of the grid through Add panel it gives me error in updateGrid() javascript function for

 

 

 

var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

I am getting get_masterTableView() null.

 

Pavlina
Telerik team
 answered on 15 Mar 2010
4 answers
192 views
I was having some issues with a few screens not being able to find the script manager so I tried a repair using the MSI for 2009 Q2.

Well it hs ben running for over an hour with EXTRACTING SCRIPTS and SKINS with my dual core cpus ruinning at 50%.

How long should I expect this to run - I suspect that over an hour is too long.

Cliff
Erjan Gavalji
Telerik team
 answered on 15 Mar 2010
1 answer
103 views
Hello,

i am working on nested radgrid.
i wants to sorting and paging functinality for the master grid.
i tryed but its not working
Please give me the code for the same.

 

<form runat="server" id="mainForm" method="post">

 

 

<telerik:RadScriptManager runat="server" ID="ScriptManager1">

 

 

</telerik:RadScriptManager>

 

 

<!-- content start -->

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<ajaxsettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</ajaxsettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"

 

 

AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5"

 

 

GridLines="None"

 

 

OnItemCreated="RadGrid1_ItemCreated"

 

 

MasterTableView-AllowMultiColumnSorting="false"

 

 

OnItemCommand="RadGrid1_ItemCommand"

 

 

onsortcommand="RadGrid1_SortCommand1" >

 

 

<pagerstyle mode="NumericPages"></pagerstyle>

 

 

<mastertableview datakeynames="IssueID" allowmulticolumnsorting="false" grouploadmode="Server">

 

 

<NestedViewTemplate>

 

 

<asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">

 

 

<telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1"

 

 

SelectedIndex="0">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Text="ViewIssue" PageViewID="PageView1">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 

 

<telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">

 

 

<telerik:RadPageView runat="server" ID="PageView1">

 

 

<telerik:RadGrid runat="server" ID="OrdersGrid" AutoGenerateColumns="False" AllowMultiRowSelection="False" >

 

 

<MasterTableView ShowHeader="true" AutoGenerateColumns="False" HierarchyLoadMode="ServerOnDemand">

 

 

<NoRecordsTemplate>

 

Records Not Found

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridNumericColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton"

 

 

DataField="Description" UniqueName="Description">

 

 

</telerik:GridNumericColumn>

 

 

<telerik:GridBoundColumn SortExpression="CSTComments" HeaderText="CSTComments" HeaderButtonType="TextButton"

 

 

DataField="CSTComments" UniqueName="CSTComments" Aggregate="Count">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDateTimeColumn SortExpression="AnalystComments" HeaderText="AnalystComments" HeaderButtonType="TextButton"

 

 

DataField="AnalystComments" UniqueName="AnalystComments" >

 

 

</telerik:GridDateTimeColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage>

 

 

</asp:Panel>

 

 

</NestedViewTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn SortExpression="CoName" HeaderText="CoName" HeaderButtonType="TextButton"

 

 

DataField="CoName" UniqueName="CoName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="ScenarioName" HeaderText="ScenarioName" HeaderButtonType="TextButton"

 

 

DataField="ScenarioName" UniqueName="ScenarioName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="Subject" HeaderText="Subject" HeaderButtonType="TextButton"

 

 

DataField="Subject" UniqueName="Subject">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="IssueDate"

 

 

HeaderText="IssueDate" HeaderButtonType="TextButton" DataField="IssueDate" UniqueName="IssueDate">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</mastertableview>

 

 

<clientsettings allowdragtogroup="true" />

 

 

</telerik:RadGrid>

 

 

</form>
------------------------------------ code behind....................................................................................

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

if (!Page.IsPostBack)

 

{

sortExpr.FieldName =

"CoName";

 

sortExpr.SortOrder =

GridSortOrder.Ascending;

 

 

//Add sort expression, which will sort against first column

 

RadGrid1.MasterTableView.SortExpressions.AddSortExpression(sortExpr);

BindMasterGrid();

}

}

 

private void BindMasterGrid()

 

{

 

try

 

{

dsIssueData = moIssueTrackBL.GetIssueDetails(0, 82, 0);

RadGrid1.DataSource =

null;

 

RadGrid1.DataBind();

 

if (dsIssueData.Tables[0] != null && dsIssueData.Tables[0].Rows.Count > 0)

 

{

RadGrid1.DataSource = dsIssueData.Tables[0];

RadGrid1.DataBind();

}

}

 

catch (Exception)

 

{

 

 

throw;

 

}

}

 

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

if (e.CommandName == RadGrid.ExpandCollapseCommandName)

 

{

((

GridDataItem)e.Item).ChildItem.FindControl("InnerContainer").Visible = !e.Item.Expanded;

 

 

GridDataItem item=(GridDataItem)e.Item;

 

iIssueID =

Convert.ToInt32(item.OwnerTableView.DataKeyValues[item.ItemIndex]["IssueID"].ToString());

 

dsViewIssueData = moIssueTrackBL.GetViewIssueDetails(iIssueID);

 

RadGrid OrdersGrid = (RadGrid)((GridDataItem)e.Item).ChildItem.FindControl("OrdersGrid");

 

OrdersGrid.DataSource = dsViewIssueData.Tables[0];

OrdersGrid.DataBind();

}

}

 

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

if (e.Item is GridNestedViewItem)

 

{

e.Item.FindControl(

"InnerContainer").Visible = ((GridNestedViewItem)e.Item).ParentItem.Expanded;

 

}

}

 

protected void RadGrid1_SortCommand1(object source, GridSortCommandEventArgs e)

 

{

 

switch (e.OldSortOrder)

 

{

 

case GridSortOrder.None:

 

sortExpr.FieldName = e.SortExpression;

sortExpr.SortOrder =

GridSortOrder.Ascending;

 

e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);

 

break;

 

 

case GridSortOrder.Ascending:

 

sortExpr.FieldName = e.SortExpression;

sortExpr.SortOrder =

GridSortOrder.Descending;

 

e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);

 

break;

 

 

case GridSortOrder.Descending:

 

sortExpr.FieldName = e.SortExpression;

sortExpr.SortOrder =

GridSortOrder.Ascending;

 

e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);

 

break;

 

}

}

Pavlina
Telerik team
 answered on 15 Mar 2010
1 answer
72 views
I am beginning to use the Ajax controls and need help. I have a content page that is connected to a masterpage.

I want to use have controls on my page updated without the navigational jump that occurs on the page.

What Ajax controls do I use and on what page do I place them? My other controls that I want clean navigation for are on the content page.

Thanks,

Dave
Sebastian
Telerik team
 answered on 15 Mar 2010
4 answers
272 views

Hi Telerik

I am creating and grouping grid dynamically (refer 1.jpg  attached image here). In this grid I need to freeze first one or two columns. This I can achieve using below code.

<ClientSettings>

    <Scrolling FrozenColumnsCount="2" SaveScrollPosition="true" UseStaticHeaders="true"

     AllowScroll="True" />

</ClientSettings>

 

 But when I am scrolling to last then I surprised. Because some of last columns are not being visible completely (refer 2.jpg).

At the same time another problem is, the Column freezing is not working for other grid which is in other tab (refer 3.jpg and 4.jpg). Even all the grids I am binding together at a time.

 

Please help me to sort out this problem.

Pavlina
Telerik team
 answered on 15 Mar 2010
1 answer
55 views
Hi,
 
 I am creating a tabstrip with EnableEmbeddedSkins set to false and i have my custom skin and stylesheet files. In my css classes for tabs i am setting the height property for my tabs. Problem is that using these properties my tab strip works fine in IE7 but setting height in IE6 create some kind of error and my tabstrip does not render properly. if i set the height at server side for each tab ( example: item.Height = Unit.pixel(24) ), than also,i get the same problem. I removed height property from my CSS classes it works fine in IE6 but it takes default hieght for tabs. But i have to set more height for the tabs, thats the requirement. Is there anyway where we can set the height for tabs and still make it to work in IE6.

Thanx in advance.
Mohammad.
Yana
Telerik team
 answered on 15 Mar 2010
1 answer
201 views
Hi Telerik,
in 2010.1.309 suddenly a line with
"RadEditor hidden textarea" appears. How to get rid of this?
Thanks und best regards,
Andreas
Andreas Kaech
Top achievements
Rank 1
 answered on 15 Mar 2010
1 answer
131 views
These two properties exist for the upload control, but I am unable to find them for the file explorer. Does the file explorer allow you to control these settings?

MaxFileInputsCount="4"
InitialFileInputsCount="2"
Lini
Telerik team
 answered on 15 Mar 2010
2 answers
145 views
Hi guys,

I have the following problem regarding the RadWindow opening, and it is related to AJAX. I have the following for the ajax settings.

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
        
         <telerik:AjaxSetting AjaxControlID="TabStrip">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TabStrip" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        
            <telerik:AjaxSetting AjaxControlID="grdAttachments">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdAttachments" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            
            <telerik:AjaxSetting AjaxControlID="cboWorkflowAction">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cboWorkflowForwardTo" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        
            <telerik:AjaxSetting AjaxControlID="rblTargetCodeSelector">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlSingleCountry" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            
            <telerik:AjaxSetting AjaxControlID="rblTargetCodeSelectors">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlSingleCountry" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            
            <telerik:AjaxSetting AjaxControlID="grdActions">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdActions" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
                
            <telerik:AjaxSetting AjaxControlID="rblTargetCodeSelector">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlMultipleCountries" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>                
            </telerik:AjaxSetting>
            
            <telerik:AjaxSetting AjaxControlID="rblTargetCodeSelectors">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlMultipleCountries" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            
        </AjaxSettings>

    </telerik:RadAjaxManager>

And I try to open the rad window through an a-href link from within a grid. Now, the problem is the following. When I comment out the lines on top for the ajax settings, then the radwindow opens. Otherwise I get a JS error: Object Expected.

Please help on this one as I could not find the specifics in other threads.

Thanks,
lektira 
Svetlina Anati
Telerik team
 answered on 15 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?