Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
101 views
I'm writing how best to expand the root node of the TreeView control by default, on the page load - either with C# or with the properties of the RadTreeView;

rootNode.Expanded = true  - this code did not work as expected;

Thanks in advance for any insight; 


 

 

 

 

 

 

 

 

 

 

 

 

 

Kate
Telerik team
 answered on 13 Oct 2011
1 answer
252 views
Hi,
We got requirement when data is empty , we show "No records found". Grid contains command to add or edit item. if there is no data or empty datasource, when the user clicks on "NEW " button , we would like to add new dummy row. I could not see telerik grid able to add new record incase of empty datasource. Can any1 provide me any solution on this

-Mahender
Shinu
Top achievements
Rank 2
 answered on 13 Oct 2011
6 answers
365 views
Hi,

I have a tree list setup as follows:

http://i1135.photobucket.com/albums/m621/surfrat77/TreeListLayout.png

I wish to remove the labels and textbox's as shown below. How do I achieve this?

http://i1135.photobucket.com/albums/m621/surfrat77/EditName.png

http://i1135.photobucket.com/albums/m621/surfrat77/EditValue.png

Thanks

SurfRat
Surf
Top achievements
Rank 1
 answered on 13 Oct 2011
1 answer
216 views
I'm trying to use the list box in a load on demand scenario, but I have a need to set it's height via javascript rather than on the server object. Is there any way to get load on demand to work in this scenarios?

Thanks,
Chris
Peter Filipov
Telerik team
 answered on 13 Oct 2011
1 answer
170 views
I have an issue on how to save the layout of all RadDock controls on a web page when a RadDock is moved to a new location. Currently, I have server side code that saves the users layout position to the database. However, the user must click a command button to save layout. However, the user wants the application to save the new layout when a RadDock is closed or moved to a new location. Is this possible.
Slav
Telerik team
 answered on 13 Oct 2011
0 answers
89 views
Hi Telerik,

I had a requirement of doing like Quickbook Grid (Screens attached).

Please advice me in doing this .
ramkumar
Top achievements
Rank 1
 asked on 13 Oct 2011
1 answer
85 views
Hello,
 I am facing a problem using RadFilterDateFieldEditor . Sometimes there is rendering problem in IE 6, 7, 8 browsers.
Have you got any idea why it happens?
Image attached describes problem.


Thanks.
Mira
Telerik team
 answered on 13 Oct 2011
3 answers
126 views
Dear TelerikTeam,

I am using RadGrid.There are list of rows displaying in it, but I would like to select (or) highlight the newly inserted row. So that the new user can easily identify the row which is inserted.

Note: I am also using paging for your reference.

-Thanks
John John
Top achievements
Rank 1
 answered on 13 Oct 2011
4 answers
168 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
238 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
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?