Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
309 views
hello...

in radgrid I want to be able to get the overall count of the records returned from
my database query. When I use datagrid.Item.Count, it only returns the
count for the current page. I see a property that lists pagecount, but
nothing for totalcount. I want to have a label above my datagrid that
says "n results returned".

Can anyone help,
 thanks.
hamda
Top achievements
Rank 1
 answered on 16 Jun 2010
1 answer
140 views
I currently have a rad splitter control with two items, a rad tree view on the left, and a flash visualization on the right.
When i click on the splitter bar and move it to the right over the flash visualization, the bar loses focus and I cannot move the splitter farther to the right, but once I move the mouse back to the left so it is no longer over the flash element, the bar regains focus and I can move it.  If i click the bar, and move it below the flash element, I can expand the splitter bar to the right.

The problem occurs in Internet Explorer 8, in regular mode and all compatability modes, but it does not occur in firefox or chrome.

Sample code for this problem is below:

<telerik:RadSplitter runat="server" ID="RsSplitter" Width="100%" Height="100%"> 
        <telerik:RadPane runat="server" ID="RpMenuPane" Width="20%" Scrolling="Y"> 
            <div id="menu"> 
                <telerik:RadPanelBar ID="RpbMenuPanelBar" runat="server" Width="100%"> 
                    <CollapseAnimation Type="InOutCubic" /> 
                    <Items> 
                        <telerik:RadPanelItem Text="Search" Expanded="false"> 
                            <Items> 
                                <telerik:RadPanelItem> 
                                    <ItemTemplate> 
                                        <input type="text" id="TxtSearchBox" value="Search for a node"  onfocus="this.value='';" /> 
                                        <input type="button" id="BtnSearch" value="Go" onclick="searchViz(this.value);"/> 
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="Architecture" Expanded="true"> 
                            <Items> 
                                <telerik:RadPanelItem> 
                                    <ItemTemplate> 
                                        <telerik:RadTreeView runat="server" ID="RtvArchTree" CheckBoxes="true" CheckChildNodes="true" 
                                            TriStateCheckBoxes="true" OnClientNodeClicked="archTree_NodeClicked" OnClientNodeChecked="archTree_NodeChecked" 
                                            OnClientNodeExpanded="archTree_NodeExpanded" OnClientNodeCollapsed="archTree_NodeCollapsed"> 
                                        </telerik:RadTreeView> 
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="Networks" Expanded="true"> 
                            <Items> 
                                <telerik:RadPanelItem> 
                                    <ItemTemplate> 
                                        <telerik:RadTreeView runat="server" ID="RtvNetTree" CheckBoxes="true" CheckChildNodes="true" 
                                            TriStateCheckBoxes="true" OnClientNodeClicked="netTree_NodeClicked" OnClientNodeChecked="netTree_NodeChecked" 
                                            OnClientNodeExpanded="netTree_NodeExpanded" OnClientNodeCollapsed="netTree_NodeCollapsed"> 
                                            <Nodes> 
                                                <telerik:RadTreeNode runat="server" Text="All Networks" Value="All Networks" /> 
                                            </Nodes> 
                                        </telerik:RadTreeView> 
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="Tools" Expanded="false"> 
                            <Items> 
                                <telerik:RadPanelItem> 
                                    <ItemTemplate> 
                                        <div id="exportControls"> 
                                            <div> 
                                                Select PDF paper size:</div> 
                                            <select id="ddlPaperSize"> 
                                                <option value="letter" onclick="hideCustomFields();">Letter (8.5 x 11)</option> 
                                                <option value="legal" onclick="hideCustomFields();">Legal (8.5 x 14)</option> 
                                                <option value="ledger" onclick="hideCustomFields();">Ledger (17 x 11)</option> 
                                                <option value="tabloid" onclick="hideCustomFields();">Tabloid (11 x 17)</option> 
                                                <option value="custom" onclick="showCustomFields();">Custom ...</option> 
                                            </select><br /> 
                                            <input type="text" id="txtCustomWidth" value="Width (inches)"></input> 
                                            <input type="text" id="txtCustomHeight" value="Height (inches)"></input> 
                                            <input type="button" id="btnExportPdf" value="Export PDF" onclick="exportPdf();" /> 
                                            <br /> 
                                            <input type="button" value="Export to PNG" onclick="exportPng();" /> 
                                        </div> 
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelBar> 
            </div> 
        </telerik:RadPane> 
        <telerik:RadSplitBar runat="server" ID="RsbSplitterBar" CollapseMode="Forward"> 
        </telerik:RadSplitBar> 
        <telerik:RadPane runat="server" ID="RpVizPane" Scrolling="Both"> 
            <div id="flashContent" style="padding: 5px 5px 5px 5px;"> 
                <p> 
                    To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed. 
                </p> 
 
                <script type="text/javascript"> 
                    var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); 
                    document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" 
                            + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>");  
                </script> 
 
            </div> 
            <noscript> 
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="90%" 
                    id="HorseBlanket"> 
                    <param name="movie" value="HorseBlanket.swf" /> 
                    <param name="quality" value="high" /> 
                    <param name="bgcolor" value="#f2f1e8" /> 
                    <param name="allowScriptAccess" value="sameDomain" /> 
                    <param name="allowFullScreen" value="true" /> 
                    <!--[if !IE]>--> 
                    <object type="application/x-shockwave-flash" data="HorseBlanket.swf" width="100%" 
                        height="100%"> 
                        <param name="quality" value="high" /> 
                        <param name="bgcolor" value="#f2f1e8" /> 
                        <param name="allowScriptAccess" value="sameDomain" /> 
                        <param name="allowFullScreen" value="true" /> 
                        <!--<![endif]--> 
                        <!--[if gte IE 6]>--> 
                        <p> 
                            Either scripts and active content are not permitted to run or Adobe Flash Player 
                            version 10.0.0 or greater is not installed. 
                        </p> 
                        <!--<![endif]--> 
                        <a href="http://www.adobe.com/go/getflashplayer"> 
                            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
                                alt="Get Adobe Flash Player" /> 
                        </a> 
                        <!--[if !IE]>--> 
                    </object> 
                    <!--<![endif]--> 
                </object> 
            </noscript> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 

Christopher
Top achievements
Rank 1
 answered on 15 Jun 2010
6 answers
183 views
Hi everyone,

Client Side, is there a way to set a comboboxItem invisible?

I've tried something like:

var ddlPrecoMax = $find("<%= ddlPrecoMax.ClientID %>");  

var

maxLength= ddlPrecoMax.get_items().get_count();

for(i=0; i< maxLength; i++)

{

    var comboItem= ddlPrecoMax.get_items().getItem(i);  
    comboItem.set_visible(false);  
}

... but it's not working.

Can someone point me the correct way?

Thanks in advance!
The Wire
Top achievements
Rank 1
 answered on 15 Jun 2010
2 answers
321 views
I have my grid in edit mode for all rows all the time and I need to place onblur and onfocus javascript client side events to each individual radcombobox that is generated in edit mode in this grid but I don't seem to be able to figure out how to attach these events to the right control

it looks like from the markup that the
dataItem["attendancekind"].Controls[0].ClientID + "_Input'
is the clientid of the combobox

i saw this article that talks about how to attach onblur event to a combobox but it seems to refer to an older non-ajax version - I'm using the latest 2010 telerik ajax version
'

aspx

<telerik:RadGrid ID="MyRadGrid" runat="server" AutoGenerateColumns="False" 
                        Width="300px" DataSourceID="MyObjectDataSource" AllowAutomaticDeletes="True" 
                        AllowAutomaticInserts="True" AllowAutomaticUpdates="True" GridLines="None" AllowMultiRowEdit="True" 
                        OnPreRender="MyRadGrid_PreRender"> 
                        <ClientSettings EnablePostBackOnRowClick="True"> 
                            <Selecting AllowRowSelect="True" /> 
                        </ClientSettings> 
                        <MasterTableView DataKeyNames="myid" DataSourceID="MyObjectDataSource" 
                            EditMode="InPlace" InsertItemPageIndexAction="ShowItemOnCurrentPage"> 
                            <Columns> 
                                <telerik:GridBoundColumn DataField="myid" Display="False" UniqueName="myid"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridDropDownColumn DataField="anotherid" DataSourceID="PersonObjectDataSource" 
                                    HeaderText="Name" ListTextField="name" ListValueField="anotherid" DataType="System.Guid" 
                                    UniqueName="anotherid"> 
                                </telerik:GridDropDownColumn> 
                                <telerik:GridDropDownColumn DataField="attendancekind" DataSourceID="MyKindObjectDataSource" 
                                    HeaderText="" ListTextField="description" ListValueField="attendancekind" 
                                    DataType="System.Guid" UniqueName="attendancekind"> 
                                </telerik:GridDropDownColumn> 
                                <telerik:GridClientSelectColumn Display="False" UniqueName="column"> 
                                </telerik:GridClientSelectColumn> 
                            </Columns> 
                        </MasterTableView> 
                    </telerik:RadGrid> 


code behind

protected void MyRadGrid_PreRender(object sender, EventArgs e) 
        { 
            // put all items in edit mode by default 
            for (int i = 0; i < MyRadGrid.PageSize; i++) 
            { 
                MyRadGrid.EditIndexes.Add(i); 
            } 
 
            MyRadGrid.Rebind(); 
 
            //subtotal 
            foreach (GridDataItem dataItem in MyRadGrid.MasterTableView.Items) 
            { 
                (dataItem["attendancekind"].Controls[0] as RadComboBox).Attributes.Add( 
                    "onblur", "update(''" + dataItem["attendancekind"].Controls[0].ClientID + "_Input');"); 
 
(dataItem["attendancekind"].Controls[0] as RadComboBox).Attributes.Add( 
                    "onfocus", "getInitialValue('" + dataItem["attendancekind"].Controls[0].ClientID + "_Input');"); 
} 
} 
 

EJ
Top achievements
Rank 1
 answered on 15 Jun 2010
2 answers
117 views
I am really starting to like the new header context menu. But, it has very limited options at this time. I'd like to limit my header context menus to only show the sorting and filtering options. These are great shortcuts!

There are too many issues with widths to allow grouping on every grid, and the show/hide columns is FAR too slow to be usable. I'd really like to see this not attempted with javascript and just postback to hide columns. I have one grid that the context menu won't even open at all becuase the javascript is just too slow. Browser keeps throwing the "do you want to keep running this script?" message.

If anyone could help me hide all the options except sorting and filtering I would really appriciate it!
James
Top achievements
Rank 1
 answered on 15 Jun 2010
2 answers
171 views
Hello,

I have requirement for which I am declaring the RadGrid on the serverside ( in a class so that I can call this anywhere in the application).
So, I bind the xml to the RadGrid by using Dataset as a datasource to Grid.
I am perfectly able to bind the xml to Radgrid and populate the Columns.
Here is what I do next:
RadGrid1.Skin = "Default" 
RadGrid1.MasterTableView.Enabled = True 
RadGrid1.ItemStyle.Font.Name = "sans-serif" 
RadGrid1.AllowSorting= True 
RadGrid1.AllowPaging = True 
RadGrid1.PageSize = "5" 
RadGrid1.HeaderStyle.Font.Bold = True 
The point here is that I loading this into a UserControl.
I am facing the following issues:
1) I am not able to achieve paging.
2) Not able to achieve sorting.
3) Not able to make headertext as Clickable hyperlinks.
smith spd
Top achievements
Rank 1
 answered on 15 Jun 2010
5 answers
250 views
Hi.  I am looking for code sample (VB.NET) to do something in the webpage when the user selects a row in the gridcontrol in a user control.  The user control code is listed below. 

<%

@ Control Language="VB" AutoEventWireup="false" CodeFile="YALReadOnlyGrid.ascx.vb" Inherits="UserControls_YALReadOnlyGrid" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 
<telerik:RadGrid ID="RadROGrid" runat="server"   
     AllowPaging="true" AllowSorting="True" GridLines="None" Skin="Sunset"   
    Width="275px">  
        <MasterTableView> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
        </MasterTableView> 
          
            
        <ClientSettings> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
</telerik:RadGrid> 


In the webpage, the user control is accessed as follows

<%@ Page Title="" Language="VB" MasterPageFile="~/Common/YALMasterPage.master" AutoEventWireup="false" CodeFile="YALDropDowns.aspx.vb" Inherits="Admin_YALDropDowns" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderHeader" Runat="Server">  
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="ConPHLeftTop" Runat="Server">  
    <YAL:YALROGenGrid runat="server" ID="YALDDVals" Source="DropDowns" setPageSize="50" /> 
</asp:Content> 
<asp:Content ID="Content4" ContentPlaceHolderID="ConPHLeftBottom" Runat="Server">  
</asp:Content> 
<asp:Content ID="Content5" ContentPlaceHolderID="ConPHRightTop" Runat="Server">  
</asp:Content> 


Thanks for any help and/or sample code that you can provide
John
Top achievements
Rank 1
 answered on 15 Jun 2010
2 answers
302 views
Hi,

I getting strange error on row edit.
1. I implemented inline row edit on double click. But the row is editing in "Form Template Edit Form". I want only inline line edit. How do it. I am doing something but  I am unable to get it. Can anyone help me.

here is java script.

function RowDblClick(sender, eventArgs) { 
            editedRow = eventArgs.get_itemIndexHierarchical(); 
            $find("<%= gvCktMap.MasterTableView.ClientID %>").editItem(editedRow); 
        } 
 
        function GridCommand(sender, args) { 
            if (args.get_commandName() != "Edit") { 
                editedRow = null; 
            } 
        } 
 
        function GridCreated(sender, eventArgs) { 
            var gridElement = sender.get_element(); 
            var elementsToUse = []; 
            inputs = gridElement.getElementsByTagName("input"); 
            for (var i = 0; i < inputs.length; i++) { 
                var lowerType = inputs[i].type.toLowerCase(); 
                if (lowerType == "hidden" || lowerType == "button") { 
                    continue; 
                } 
 
                Array.add(elementsToUse, inputs[i]); 
                inputs[i].onchange = TrackChanges; 
            } 
 
            dropdowns = gridElement.getElementsByTagName("select"); 
            for (var i = 0; i < dropdowns.length; i++) { 
                dropdowns[i].onchange = TrackChanges; 
            } 
 
            setTimeout(function() { if (elementsToUse[0]) elementsToUse[0].focus(); }, 100); 
        } 
 
 
 

Radgrid

<telerik:RadGrid ID="gvCktMap" BorderColor="White" runat="server" AutoGenerateColumns="true" 
                                AllowSorting="true" BackColor="White" AllowPaging="true" PageSize="25" GridLines="None" 
                                OnPageIndexChanging="gvCktMap_PageIndexChanging" OnRowCancelingEdit="gvCktMap_RowCancelingEdit" 
                                OnRowCommand="gvCktMap_RowCommand" OnRowUpdating="gvCktMap_RowUpdating" OnRowDataBound="gvCktMap_RowDataBound" 
                                OnSorting="gvCktMap_Sorting" OnRowEditing="gvCktMap_RowEditing" ShowGroupPanel="True" 
                                EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="true" 
                                AllowFilteringByColumn="True" AllowCustomPaging="false" OnItemCreated="gvCktMap_ItemCreated" 
                                EnableViewState="false" OnNeedDataSource="gvCktMap_NeedDataSource" OnItemUpdated="gvCktMap_ItemUpdated"> 
                                <MasterTableView DataKeyNames="sId"> 
                                </MasterTableView> 
                                     
                                 
                                <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"> 
                                    <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" 
                                        OnCommand="GridCommand" /> 
                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                                    <Selecting AllowRowSelect="True"></Selecting> 
                                    <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" 
                                        ResizeGridOnColumnResize="False"></Resizing> 
                                </ClientSettings> 
                                <GroupingSettings ShowUnGroupButton="true" /> 
                                <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" AlwaysVisible="true" /> 
                            </telerik:RadGrid> 

2. I want to give few columns to edit. For ex. i have columns a, b, c, d, e, f, g.  When user double click on a row the user should get e, f, g columns to edit.
Babu Puchakayala
Top achievements
Rank 1
 answered on 15 Jun 2010
1 answer
124 views
Hi,

Can I select more than 1 values using checkboxes in Rad Combobox?

Regards,
Lubna.
Kalina
Telerik team
 answered on 15 Jun 2010
2 answers
67 views
I have a question about customized the AdvacedForm with an ASP.Net FileUpload control.
I added the FileUpload control to the AdvancedForm so a user can upload file to the server when an appointment is created. When the Save button is clicked after selecting a file, everything seems going well since I do not see any errors. However, in my server-side code, for example, in handling UploadButton_OnClick event, I cannot catch any property of the FileUpload control. The control is posted back since I can access it by its ID, but the properties I am interested do have value. For example, FileName property is an empty string, the "HasFile" property returns a FALSE value. As such I cannot save the file or I do not have a file to save on post back.

Has this something to do with the fact that the AdvacedForm is an user control? I am asking this because when I have a FileUpload on the parent page with the Scheduler, I do not have any problem with catching the FileUpload control's properties.

Derek Feng
Top achievements
Rank 1
 answered on 15 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?