Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
123 views
Hi,

I using some ampersand characters in my treeview, but when I validate my page with http://validator.w3.org I get some error on the ambersand characters.

Line 146, Column 132StartTag: invalid element name
…x?Category=$VingepumpeMindre250&amp;menyCategory=1,1">Vingepumper, <250 bar</a>

<telerik:RadTreeNode Text="Vingepumper, &lt;250 bar" NavigateUrl="~/preview.aspx?Category=$VingepumpeMindre250&menyCategory=1,1" ></telerik:RadTreeNode>

Is it possible to make the treeview control to show ambersand?


Best regards
Aksel Henriksen

Nikolay Tsenkov
Telerik team
 answered on 13 Oct 2011
1 answer
200 views
when i try to bind the Grid view using the Pagemathods or webmethods, everything works well and its fast.
but the above is true only if my web method returns not more than 20 rows of data.
as soon the webmethod returns more than 20 rows, the RadGrid control simply doesnt bind or refresh, as if no action was made !?
at first i thought that it might be just slow so i tried waiting for more than 30min and the result is the same...

if i do the same thing but bind the grid on server side using the NeedDataSource event then it loads more than 20 rows, but because the performance is much faster on client side binding, i need to make it work on client side.

using the visual studio 2010 debugger i followed step by step and a strange thing happens the ajax call to the webmethod is beingsent ok, and the pagemethod / webmethod is executed ok and returns the data, once the data is returned to radgrid its like it swallows it and no further action happens nor any other client side events are fired or javascript code is executed...

Please help, i spent almost a week on this issue and cant find a solution... many thanks in advance...

please see below the grid code and pagemethods that i am using:

grid from .aspx:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
                CellSpacing="0" GridLines="None">
                <ClientSettings>
                    <ClientEvents OnCommand="showLoadingPanel" OnDataBinding="alert('databinding')"
                        OnDataBindingFailed="function () {alert('binding failed');}" OnDataBound="hideLoadingPanel"
                        OnDataSourceResolved="alert('data source resolved')" />
                </ClientSettings>
                <MasterTableView>
                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="JobItemId"
                            FilterControlAltText="Filter JobItemId column" HeaderText="Ref"
                            UniqueName="JobItemId">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ItemName"
                            FilterControlAltText="Filter ItemName column" HeaderText="Name"
                            UniqueName="ItemName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ItemBarcode"
                            FilterControlAltText="Filter ItemBarcode column" HeaderText="Barcode"
                            UniqueName="Barcode">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
            </telerik:RadGrid>

client side javascript from .aspx:

<script type="text/javascript">

            var currentLoadingPanel = null;
            var currentUpdatedControl = null;
            function RequestStart(sender, args) {
                if (args.get_eventTarget() == "<%= RadButtonLoadLoc.UniqueID %>") {
                    currentLoadingPanel = $find("<%= RadAjaxLoadingPanel.ClientID%>");
                    currentUpdatedControl = "<%= PanelMain.ClientID %>";
                    //show the loading panel over the updated control
                    currentLoadingPanel.show(currentUpdatedControl);
                }
            }
            function ResponseEnd(sender, args) {
                //hide the loading panel and clean up the global variables
                if (currentLoadingPanel != null) {
                    currentLoadingPanel.hide(currentUpdatedControl);
                    //alert('Hide: ' + currentUpdatedControl);
                }
                currentUpdatedControl = null;
                currentLoadingPanel = null;
            }

            function showLoadingPanel(sender, args) {
                toggleLoadingPanel(sender.get_id(), true);
            }

            function hideLoadingPanel(sender, args) {
                toggleLoadingPanel(sender.get_id(), false);
            }

            function toggleLoadingPanel(elementId, show) {
                var loadingPanel = $find("<%= RadAjaxLoadingPanel.ClientID%>");
                if (show) {
                    loadingPanel.show(elementId);
                }
                else {
                    loadingPanel.hide(elementId);
                }
            }

            function NodeClicked(sender, args) {
                //alert(args.get_node().get_value());
                toggleLoadingPanel("<%=RadGrid1.ClientID %>", false);
                toggleLoadingPanel("<%=RadGrid1.ClientID %>", true);
                var selectedTreeViewLocId = args.get_node().get_value();            
                LoadChildRecords(selectedTreeViewLocId);
                //PageMethods.GetCount(tableView.get_filterExpressions().toList(), updateVirtualItemCount);
                //RefreshGrid();
            }
            
            function RefreshGrid() {
                var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                masterTable.rebind();
            }
            function LoadChildRecords(selectedTreeViewLocId) {
                var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                
                PageMethods.GetDataByLocId(selectedTreeViewLocId, updateGrid);
            }

            function pageLoad() {
                PageMethods.set_path('/ProductionView/PView.aspx');
            }

            function updateGrid(result) {
                //alert("update control");
                var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                tableView.set_dataSource(result);
                updateVirtualItemCount(result.length)
                alert(result.length);
                tableView.dataBind();
            }

            function updateVirtualItemCount(result) {
                var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                tableView.set_virtualItemCount(result);
            }

            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
            function endRequest(sender, e) {
                if (e.get_error()) {
                    debug.trace("[" + new Date().toLocaleTimeString() + "] An error occurred while processing the request on the server. Please try again later.");
                    alert("error");
                    e.set_errorHandled(true);
                }
            }
            Sys.Application.notifyScriptLoaded();
       
        </script>

Page method that returns the data to the grid:

[WebMethod]
        public static IEnumerable<JobItems> GetDataByLocId(int selectedTreeViewLocId)
        {
            JobItemsDataTable table = new JobItemsTableAdapter().GetData(selectedTreeViewLocId);
            foreach (JobItemsDataRow row in table.Rows)
            {
                yield return new JobItem(row.JobItemId, row.JobId, row.ItemName, row.ItemBarcode, row.LocationId, row.IsInRush);       
            }   
        }



Tsvetoslav
Telerik team
 answered on 13 Oct 2011
6 answers
593 views
Hi,

I have a Telerik control inside an ASP.NET UserControl. The UserControl is deployed to the Sharepoint 2010 site.

Currently I am receiving the error:- "Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified."

What I have done so far:
- I have added the Telerik.Web.UI.dll to the GAC.
- I have added it to the SafeControls list
- I have checked that all the Ajax required tags are present (as in http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax.html)

Is there something else I am missing??

Note* I am aware that there are separate products for Sharepoint but I want to use my exisiting Telerik controls.

Thank you,

KS
Stanimir
Telerik team
 answered on 13 Oct 2011
1 answer
154 views
Hi,

I have created ConfirmTemplate in Radwindowmanager.

I am using {1} in template to set the text runtime .

How can I do same to set the title runtime .

Regards,
Suraj .
Marin Bratanov
Telerik team
 answered on 13 Oct 2011
7 answers
181 views
Hi all,
which control do you use for the Country Map on http://demos.telerik.com/aspnet-ajax/salesdashboard/default.aspx ?
Thanks!
Vasil
Telerik team
 answered on 13 Oct 2011
1 answer
128 views
Hi,

i have a radgrid with autogeneratedcolumns option as true. i disabled the viewstate for grid.  whenever a column reorder happens, i have to move some more columns.i am trying to move the extra columns through server side implementation. i am doing this in Prerender event of radgrid. The drag and drop column is moving to dropped position. However i am unable to move the extra columns. please help me out regarding this. i am trying for this for whole day but in vain :(

i made the following settings for my grid
EnableColumnsViewState="true"
AllowColumnsReorder="True",  ReorderColumnsOnClient="false"

grid PreRender code for moving the extra columns
protected void grdSummary_PreRender(object sender, EventArgs e)
{
//Holds the Unique names of columns to be moved
string[] extraColumns =new string(commasepratedColumnNames)
//column that was dragged and dropped
GridColumn mainColumnObject = grdSummary.MasterTableView.GetColumn("34");
                        index = mainColumnObject.OrderIndex;
                        foreach (string columnUniqueName in extraColumns)
                        {                            

                            grdSummary.MasterTableView.SwapColumns(columnUniqueName, mainColumnObject.UniqueName);                            
                        }
                        grdSummary.MasterTableView.Rebind();
}

Thanks,
Chaitanya
Tsvetoslav
Telerik team
 answered on 13 Oct 2011
1 answer
70 views
Hi Telerik Team,


         The problem is i have 7748 records and am using scrolling along with paging with size 100 .After am redirecting to next page using paging the scroll is not coming to the start position and it is residing in the end position for new paging.

Regards,
Sravan
Synfosys Business Solutions
Princy
Top achievements
Rank 2
 answered on 13 Oct 2011
1 answer
72 views
Hi,
Teleric Radgrid supports reordering grid columns on client side. I have a requirement like if i move a column from position m to n, then columns in m+1, m+2 should move to n+1 and n+2 positions automatically(through code).

can you please help me out how can we achieve this using the javascript methods provided.

I came to know that ColumnMovingToLeft and ColumnMovingToRight property javascript methods are invoked when we reorder a column.

Thanks in advance
Chaithanya Bhadri
Marin
Telerik team
 answered on 13 Oct 2011
1 answer
74 views
is possible that when you add a dynamically Radok not have to re-create existing ones, the postback does not affect existing
Slav
Telerik team
 answered on 13 Oct 2011
1 answer
182 views
Hi Guys,
       I am loading 800000 records in the radgrid with custom paging, it's throwing timeout error, How can i work Radgrid with large number(800000) of records, this is my requirement. but i can able to bind 200000 records in radgrid without any timeout or performance issue, so can anyone knows please suggest me  

These are the following steps i have tried in my code: (Kindly note this, this radgrid i am using with in sharepoint 2007 as well as 2010)
1. i am using custom paging and set the virtual item count is 800000 and set the pagesize is 50
2. i am storing 800000 records in viewstate, not binding all 800000 records in radgrid, i am binding just 50 records at the time of loading the radgrid
3. if i change the paging in the radgrid, based on the page index i am getting 50 records from viewstate and bind it in the radgrid (for ex: current pageindex is 5 means i took 201 to 250)
4. telerik support team tell, don't use the viewstate, so i am storing all 800000 records in property bag even though it's throwing time out error
          which is the best way to store all 800000 records and bind 50 records in RadGrid without performance issue, please tell me what i need to do?
Tsvetoslav
Telerik team
 answered on 13 Oct 2011
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?