Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
272 views
My requirements are to have sorting, pagination and grouping of the data done on the server-side.  With advanced data-binding, and custom pagination, via the NeedDataSource event, I'm able to easily do the sorting on the entire dataset and use pagination information to slice the data to send to the client.  However the issue is how to deal with grouping on the server side so that the RadGrid can display it.

I've looked through the demos, tutorials, documentation, forum, etc. and haven't seen anything on it, so if I've missed something please let me know.  One reference I came across is in the "limitation" section of the http://www.telerik.com/help/aspnet/grid/grdbasicgrouping.html document.

Has anyone dealt with this issue, have any ideas or advice?


Chris
Top achievements
Rank 1
 answered on 18 Jan 2012
1 answer
246 views
Hi all,

Is it possible to combine the 2 features (Multi columns and Check box) out of the box? I do not want to use checkbox and hidden fields in the item templates of the combo box in order to manage the multi selection feature. Please find the attached snap shoot of what i'm trying to achieve.

If this is doable it will be great providing me with working sample.

Regards,
Taiseer
Cat Cheshire
Top achievements
Rank 1
 answered on 18 Jan 2012
2 answers
98 views
Hello,

I'm currently using the RadGrid control with a delete button I've added to the "CommandItemTemplate" section. When the user selects certain rows and clicks delete, a client side event is called "delete_click". This function iterates over each selected row to build up an array of parameters which should include the primary key of the row. I'm currently using hidden columns to hold certain values needed in this function. Certain values are IsUserAdmin, userRole, and userId - but none of these should be displayed as a column in the grid.The primary key (data key) is userId.... "<MasterTableView DataKeyNames='userId'>

Question #1: Is there a better approach for associating these values with a row instead of hidden columns? You can see in the example below, to access the row's column "IsUserAdmin", I access the column by it's unique name. This is a column in the grid that is hidden. Can I associate this without using a hidden column as a better approach? 

Below is an example of how I access the cells for each selected row. 

         var grid = $find("<%=grdSummary.ClientID %>");
         var MasterTable = grid.get_masterTableView();
         var selectedRows = MasterTable.get_selectedItems();
         var parms = new Array();
         for (var i = 0; i < selectedRows.length; i++) {
         {  
          var row = selectedRows[i];
           parm = new ScheduleSummaryParms();
           // Retrieve Cell by column
           parm.IsAdmin = MasterTable.getCellByColumnUniqueName(row, "userIsAdmin").innerHTML; 
           parm.userRole = MasterTable.getCellByColumnUniqueName(row, "userIsAdmin").innerHTML;        
          parms[i] = parm;
         }

Question #2: Is there a way to access the row's primary key. I've been thinking about adding a hidden column for the primary key, but I thought there had to be a better way. I've seen examples using "getDataKeyValue", but this doesnt seem to work. 

Thanks!!
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Jan 2012
1 answer
133 views
Hi,
   I have been trying to get this resolved. I have a grid with a GridCalculatedColumn, this column combines two Data fields and shows them together. I want to specify the Grid Sort Expression for this column in the grid so when the grid initially comes up its sorted by this column and the little sorting image in the column header is placed there to show the user the default column thats sorted. What should I put in the GridSortExpression's FieldName?  I can not seem to get this, It seems with a grid bound column the image appears since its a single datafield but how can I do the same thing with a grid calculated column *Updated* I actually have noticed the same issue with GridTemplateColumns as well, please let me know, thanks in advance!!

<SortExpressions>
       <telerik:GridSortExpression FieldName="OriginCity" />
 </SortExpressions>
  
  
 <telerik:GridCalculatedColumn UniqueName="Origin" HeaderText="Origin" AutoPostBackOnFilter="true"     
       SortExpression="{0} , {1}"
       DataFields="OriginCity, OriginState" Expression='{0} + " " + {1}'>
         <HeaderStyle HorizontalAlign="Left" VerticalAlign="Bottom" />
         <ItemStyle HorizontalAlign="Left" />
</telerik:GridCalculatedColumn>
Farhan
Top achievements
Rank 1
 answered on 18 Jan 2012
5 answers
557 views
How can I disable the upload button till a file is selected? I tried to set the upload enable=false then use

 

 

<telerik:radupload id="RadUpload1" OnClientFileSelected="ClientFileSelected"  runat="server" ControlObjectsVisibility="None"  text="BROWSE" targetfolder="uploads" ></telerik:radupload>

but not work

in javascript ClientFileSelected

 

I used below, not work
document.getElementById("Mygrid_ctl00_ctl04_btnUpload").disabled = true;

Thanks

Richard
Top achievements
Rank 1
 answered on 18 Jan 2012
3 answers
172 views
Hello,

I would like to add a simple combox (not telerik) with items in it as an additional field to the RadUpload control.

Here is my code:

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MultiFileUploadPrototype._Default" %>
  
<%@ register tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
    <head id="Head1" runat="server">
        <link rel="stylesheet" type="text/css" href="styles.css" />
    </head>
    <body class="BODY">
          
        <form runat="server" id="mainForm" method="post">
  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        
        <telerik:RadProgressManager ID="Radprogressmanager1" runat="server" />
  
        <table>
            <tr>
                <td class="TopCell" colspan="2">
                </td>
            </tr>
            <tr>
                <td class="BodyCell">
                    <div class="FileDetails">
                        <telerik:RadAsyncUpload runat="server" 
                                                id="RadAsyncUpload1"
                                                OnClientFileUploaded="onClientFileUploaded" 
                                                MultipleFileSelection="Automatic">
                        </telerik:RadAsyncUpload>
                    </div>
                </td>
                <td class="BodyCell RightCell">             
                    <div class="uploadedfiles">
                        <div>
                            <asp:Label ID="labelNoResults" runat="server" Visible="True">No uploaded files</asp:Label>
                            <asp:Repeater runat="server" ID="Repeater1">
                                <ItemTemplate>
                                    Category: <%#((Telerik.Web.UI.UploadedFile)Container.DataItem).GetFieldValue("TextBox").ToString()%>,<br />
                                    File name: <%# DataBinder.Eval(Container.DataItem, "FileName").ToString() %>,<br />
                                    File size: <%# DataBinder.Eval(Container.DataItem, "ContentLength").ToString() %><br />
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:Repeater>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="BottomCell" colspan="2">
                    <asp:Button ID="buttonSubmit" runat="server" CssClass="RadUploadButton" OnClick="buttonSubmit_Click" Text="Submit" />
                </td>
            </tr>
  
        </table>
              
            <telerik:RadProgressArea runat="server" ID="ProgressArea1"></telerik:RadProgressArea>
  
            <script type="text/javascript">
  
                var $ = $telerik.$;
  
                function onClientFileUploaded(radAsyncUpload, args) {
                    var $row = $(args.get_row());
                    var categoryInputName = radAsyncUpload.getAdditionalFieldID("TextBox");
                    var categoryInputType = "text";
                    var categoryInputID = categoryInputName;
                    var categoryInput = createInput(categoryInputType, categoryInputID, categoryInputName);
                    var categoryLabel = createLabel(categoryInputID, "Category");
  
//                    var subCategoryInputName = radAsyncUpload.getAdditionalFieldID("ComboBox");
//                    var subCategoryInputID = subCategoryInputName;
//                    var subCategoryInput = createComboBox(subCategoryInputID);
//                    var subCategoryLabel = createLabel(subCategoryInputID, "Category");
                      
                    $row.append("<br/>");
                    $row.append(categoryLabel);
                    $row.append(categoryInput);
//                    $row.append("<br/>");
//                    $row.append(subCategoryLabel);
//                    $row.append(subCategoryInput);
                }
  
                function createInput(inputType, inputID, inputName) {
                    var input = '<input type="' + inputType + '" id="' + inputID + '" name="' + inputName + '" />';
                    return input;
                }
  
//                function createComboBox(inputID) {
  
//                    var cmbBox = '<telerik:RadComboBox id="' + inputID + '" />';
//                    return cmbBox;
//                }
  
                function createLabel(forArrt, labelName) {
                    var label = '<label for=' + forArrt + '>' + labelName + ': </label>';
                    return label;
                }
  
                  
            </script>
             
        </form>
</body>
</html>

Please help.

Thanks,
Richard
Top achievements
Rank 1
 answered on 18 Jan 2012
1 answer
97 views
Hello,
i make a RadTreeView so:
<telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="playerID"
                  DataFieldParentID="parentID" DataSourceID="ObjectDataSource1"
                  DataTextField="playerName" DataValueField="Route"
                  onnodedatabound="RadTreeView1_NodeDataBound" 
                    Width="100%" oncontextmenuitemclick="RadTreeView1_ContextMenuItemClick">

It works fine.
playerID - Primary key
parentID - for TreeView
playerName - String
Route - a value between 1 to 4 (1-Main, 2-Partial, ...)

Once a new record is inserted into the database, I get back the new playerID.

PlayerBLL players = new PlayerBLL();
        string text = SaveSQL.GetSaveSql(txtCreateMainRouteName.Text.Trim());       
 
        if (Page.IsValid)
        {
            PlayerID = players.InsertRouteAndStation(text, 1, null);
            RadTreeView1.DataSourceID = "ObjectDataSource1";
            RadTreeView1.DataBind();
        }

How can i select the new Node in the TreeView with the new playerID?

Best regards
Reiner
Bozhidar
Telerik team
 answered on 18 Jan 2012
5 answers
94 views
I'm using Telerik 2010.1.519.40 and webservices to populate a radtreeview.  However, in IE8 when I get a large amount of nodes the treeview will not render out the nodes.

Here is aspx file:

<telerik:RadTreeView ID="tvConfigArchive" runat="server" Skin="Vista" CheckBoxes="true">
      <CollapseAnimation Duration="100" Type="OutQuint" />
      <ExpandAnimation Duration="100" Type="OutQuart" />
      <WebServiceSettings Path="mws.asmx" Method="PopulateNodes" />
    </telerik:RadTreeView>

Once again, everything works fine in IE7,IE9,Chrome,Safari,etc...ONLY IE8 doesn't work?

Any ideas?
Bozhidar
Telerik team
 answered on 18 Jan 2012
1 answer
44 views
I am bulding a upload page, but I am confused as to the proper way to handle the contols. 
I dragged the Asyncupload control into my area on my page.  When I do that it looks as though I also need to
Add RadAjaxManager
Add RadScriptManager
Add RadStyleSheetManager
Add ScriptManager

When I put either of the the scriptManagers on the page I get an error that there is already a ScriptManager on the page.  And there is, it is used by the Tabstrip that I am using for navigation.

I add the other two managers and they don't seem to do anything.
I then add one of the Progress managers and it doesn't seem to do anything either.
The last control I have is the Submit button for Postback, when pressed the screen goes blank and the file selected goes
away with out any indication that an upload occured.  Since I am doing this all on my Laptop, where should I look for the uploaded file.

Bozhidar
Telerik team
 answered on 18 Jan 2012
5 answers
118 views
hi i need help in this case

i have a radcombobox in datalist and i need register this event:

var pane1 = splitter.getPaneById("<%= RadPane2.ClientID %>");
                var combo1 = $find("<%= ddltipoeval.ClientID %>");
                var paneElem1 = pane1.getContentElement();
                if (combo1 != null) { $telerik.addHandler(paneElem1, "scroll", function() { combo1.hideDropDown(); }, false); }

How do I find the radcombobox in this datalist to record the event I need?, Because I can not register as a normal radcombobox generating the error that I send attached

Ivana
Telerik team
 answered on 18 Jan 2012
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?