Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
113 views
I have a hierarchical Radgrid
Batch...
        Adjustments...
                         Comments
I have the functionality of export to excel on the 'Adjustments' grid. How can I prevent the export of the 'Comments' grid if the user clicks Export when Comments are expanded?

protected void ConfigureExport(object source, GridCommandEventArgs e)
 {
     e.Item.OwnerTableView.GetColumn("PolicyEditRecord").Visible = false;
     e.Item.OwnerTableView.GetColumn("DeleteTransaction").Visible = false;
     e.Item.OwnerTableView.GetColumn("ManualAdjustmentBatchID").Visible = false;
     e.Item.OwnerTableView.GetColumn("ManualAdjustmentID").Visible = false;
     ((RadGrid)source).ExportSettings.ExportOnlyData = true;
     ((RadGrid)source).ExportSettings.IgnorePaging = true;
     ((RadGrid)source).ExportSettings.OpenInNewWindow = false;
     ((RadGrid)source).ExportSettings.HideStructureColumns = true;
     ((RadGrid)source).MasterTableView.HierarchyDefaultExpanded = false;
     ((RadGrid)source).MasterTableView.ExportToExcel();
 }








Mira
Telerik team
 answered on 10 Feb 2012
1 answer
67 views
Hi,

I've a MasterPage with the RadScriptManager on it.

A default.aspx opens a RadWindow which is in a User Control, in this Control is a RadButton which opens a RadTooltip (using RadToolTipManager) with another control. In this Control is a RadListView

Somehow the the RadScriptmanager does not include the Telerik JS File in the WebRessource for the RadListView, althougth it's rendered. See the attached picture.

Is there any Command where to tell the RadScriptmanager to include certain JS Files?
(In my case Telerik.Web.UI.ListBox.RadListBoxScripts.js ) for RadControls used in dynamic loaded Controls.
I was unable to find out why the RadScriptmanager isn't able attach the Scripts. 
The only work-around was to put a the RadListBox Control on the page where the Tooltip is loaded
like this 
<div style="displaynone;">
    <telerik:RadListBox runat="server" ID="listBox">
    </telerik:RadListBox>
</div>
to get the script loaded into the WebRessource.
But this is not very clean. 

 Kind regards.
Vasil
Telerik team
 answered on 10 Feb 2012
1 answer
74 views
Hi,
  Ok I have two grids, a parents Customer Grid and a child Orders grid, the child grid is in the edit form of the parent Customer Grid.
In the Orders Grid I have two Item Template columns. and have validators in these columns. I am trying to find these in the edit row in client side code but having a really hard time?!? Can someone from the Telerik team show me by a code example how can I achieve this??  Your helps really appreciated and please give an example by code. thanks!! **Please see my comments below above the Javascript code

Here are the item templates in the OrdersGrid

<telerik:GridTemplateColumn DataField="Order" HeaderText="OrderName" SortExpression="owner" UniqueName="OrderName" AutoPostBackOnFilter="true"
                                              HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" >                        
                                                   <ItemTemplate>
                                                       <asp:Label runat="server" ID="lblOrderName" Text='<%# Eval("OrderName") %>' ToolTip="Owner/Private Car Mark"></asp:Label>
                                                   </ItemTemplate>
                                                   <EditItemTemplate>
                                                       <span><asp:TextBox runat="server" ID="txtOrderName" Text='<%# Bind("OrderName") %>' ></asp:TextBox><span
                                                       style="color: Red">
                                                           
<asp:RequiredFieldValidator ID="RequiredOrderName" ControlToValidate="txtOrderName"
                                                       ErrorMessage="Order Name is required" runat="server">
                                                           </asp:RequiredFieldValidator>
                                                           </span>
                                                   </EditItemTemplate>
                                               </telerik:GridTemplateColumn>
 
 
                                                <telerik:GridTemplateColumn DataField="OrderAdd" HeaderText="Order Address"  UniqueName="OrderAdd" AutoPostBackOnFilter="true"
                                               HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"  >
                                                   <ItemTemplate>
                                                     
                                                       <asp:Label runat="server" ID="lblOrderAdd" Text='<%# Eval("OrderAdd") %>'></asp:Label>
                                                   </ItemTemplate>
                                                   <EditItemTemplate>
                                                       <span><asp:TextBox runat="server" ID="txtOrderAdd" Text='<%# Bind("OrderAdd") %>' ></asp:TextBox><span
                                                       style="color: Red">
                                                        <asp:RequiredFieldValidator ID="RequiredOrderAdd" ControlToValidate="txtOrderAdd"
                                                       ErrorMessage="Order Address is required" runat="server">
                                                           </asp:RequiredFieldValidator>
                                                           
                                                           
                                                           </span>
                                                   </EditItemTemplate>
                                               </telerik:GridTemplateColumn>

Here is what I have on the client side for checking the edit row in the orders grid, please let me know how can I access validators "RequiredOrderName" and "RequiredOrderAdd" ??  The grid has only single row edit allowed so should be only one row in edit mode at a time. I am trying to attach the Jquery validation plugin to the validator. http://plugins.jquery.com/project/updnValidatorCallout

function pageLoad(source, eventArgs) {
      //debugger;
 
      var grid = $telerik.$('[id$=CustomersGrid]');
      if (grid != null) {
          var gridObj = $find(grid.attr("id"));
          var masterTable = gridObj.get_masterTableView();
 
          var isInEditMode = false;
 
          if (gridObj.get_editItems().length > 0) {
              isInEditMode = true;
          }
 
          if (masterTable.get_isItemInserted() == true || isInEditMode == true) {
              var Ordergrid = $telerik.$('[id$=OrdersGrid]');
              if (Ordergrid != null) {
                  var orderGridObj = $find(Ordergrid.attr("id"));
                  var ordermasterTable = orderGridObj.get_masterTableView();
                  
                  if (AARgridObj.get_editItems().length > 0) {
                      // var editedItem = ordermasterTable.editItem(ordermasterTable.get_dataItems()[0].get_element());
                      var editedItems = orderGridObj.get_editItems()
                          for (var i = 0; i < editedItems.length; i++) {
 
                               
                         // How to get the validators here?? I want to get the validators from the edit row and
                         // attach the $updnValidatorCallout to them?                               
 
                          //    var item = editedItems[0];
                                
                          //    var RequiredOrderName = item._element.cells[1].children[0];
                          //    var RequiredOrderAdd = item._element.cells[2].children[0];
 
                          //    $(ownerValidator).updnValidatorCallout();
                          //    $(carValidator).updnValidatorCallout();
                          }
                  }
                  else {
                      $.updnValidatorCallout.attachAll();
                  }
              }
 
          }
          
 
      }
  }


 
Tsvetina
Telerik team
 answered on 10 Feb 2012
1 answer
83 views
When I go to upload an excel file that I have open on my desktop, it errors somewhere in the javascript with a generic error. I have some .Net code to test if the file is open. However, I do not know where to call it. I tried OnClientFileSelected with no luck.
Bozhidar
Telerik team
 answered on 10 Feb 2012
3 answers
225 views
I am trying to create a large combo box, however when I increase the font size, the control does not render correctly.  I don't see any other properties that allow me to adjust the control accordingly. It doesn't matter what skin I choose.  See the image example I attached.

Princy
Top achievements
Rank 2
 answered on 10 Feb 2012
1 answer
101 views
Hi,

i have a problem, i want to float two menu item on the right, but only the last one would float to the right.

I set it in the css file.

Can anyone help me?

Sorry for my english.

Thanks

Andrea
Shinu
Top achievements
Rank 2
 answered on 10 Feb 2012
1 answer
51 views
Hi,
I have a problem with ImageEditor in the pages that have a MasterPageFile.
when I use ImageEditor in a seperated WebForm (without MasterPage) it works properly,
but when I use a MasterPage and put ImageEditor in the <asp:Content> tag, the tools dialogs don't load completely,
the tools dialogs only contain a title bar.
Thank you
Pero
Telerik team
 answered on 10 Feb 2012
1 answer
119 views
Hello there,

I'm unable to sort out how to pass the parameters from a selecte item in radwindow to a textbox.

means we have a textbox and a small button, so if we click it it opens a small radwindow and if we select any item or anything so how to pass it from the window to the textbox. means how to do it using the "Request.QueryString"............


please help my friends
Princy
Top achievements
Rank 2
 answered on 10 Feb 2012
2 answers
56 views
Hi.
I had a gridview  with paging and because of this, if i do a foreach for grid items i only get the current page items.
As far i know i could set the allow paging to false, rebind it , and gett all items this way, using a foreach (for example)
Since my work at the moment is upgrading some one else work, i would try to avoid this aproach, since that  causes me issues on rebind data source on gridview. due to programing logic already implemented. 
Is there any way to get All items from datasource, who where primarily bind to grid besides my aproach? 

my current aproach: 
...
   this.RadGrid1.AllowPaging = false;
            this.RadGrid1.Rebind();
...
xis xix
Top achievements
Rank 1
 answered on 10 Feb 2012
1 answer
91 views
I have radcontextmenu which opens on click of a button, after opening it should stay open until same button is clicked again, but when I click that button again instead of closing it, the button reopens the context menu, please help.
Princy
Top achievements
Rank 2
 answered on 10 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?