Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
221 views
I'm looking at http://www.telerik.com/help/aspnet-ajax/grid-griddataitem-get-nestedviews.html and http://www.telerik.com/help/aspnet-ajax/grid-traversing-detail-tables-items-in-grid.html.

I have a RadGrid with a header and detail records.  What I need is to be able to find a control in the popup FormTemplate of a detail in JavaScript.  Given what little I've been able to find so far I would expect it to be something like this:

   var grid = $find('<%= RadGrid1.ClientID %>');
   var masterTable = grid.get_masterTableView();                                               
   var dataItems = masterTable.get_dataItems();                                                                                            
   var editForm = dataItems[0].get_nestedViews()[0];
   var comboAssigned = $telerik.findControl(editForm, "ddlAssignedTo");       

--------------------------------------

My apologies for once again posting too quickly.  After some trial and (much) error I believe I've found an answer.  
(Is this reasonably optimal?  I know I'm going to have to use get_editFormItem if the template is in Edit mode.)

      var grid = $find('<%=RadGrid1.ClientID %>');
      var masterTable = grid.get_masterTableView();
      var dataItems = masterTable.get_dataItems();
      var nestedView = dataItems[0].get_nestedViews()[0];
      var editForm = nestedView.get_insertItem();
      var comboAssigned = $telerik.findControl(editForm, 'ddlAssignedTo');


Eyup
Telerik team
 answered on 07 Mar 2013
1 answer
78 views
  I am creating multiple RadDockZones with a single RadDock in each zone dynamically.  I have implemented the example in the help for creating/working with dynamic RadDocks and that works fine.  However, on PostBack, I need to be able to delete and re-create the controls (for the purpose of screen layout or filtering criteria). 
  I seem to be having some odd problems that I'm guessing are related to viewstate issues since I'm creating the RadDockZones and RadDocks both in the Page Init and in the postback handler.  The zones live in a PlaceHolder and I'm just clearing the controls before re-creating them in the postback handler.
  Should I be clearing all docs and zones directly?  I see there's a way to clear the docs from a zone, but I don't see a way to clear the zones from the RadDockLayout.  Is there a method for this?
Slav
Telerik team
 answered on 07 Mar 2013
1 answer
79 views
Hi, I'm trying to embed a RadMenu into the RadPanel bar. Currently, the issue I'm facing is the SubMenu items isn't appearing (it is supposed to dropdown).

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="100%"
AllowCollapseAllItems="true" CollapseAnimation-Type="Linear"
ExpandAnimation-Type="Linear" Skin="WebBlue" BorderStyle="None" BorderWidth="0px">
    <Items>
        <telerik:RadPanelItem Text="Welcome, John Doe" runat="server" Expanded="true">
            <Items>
                <telerik:RadPanelItem>
                <ItemTemplate>
                <telerik:RadMenu ID="Menu1" runat="server" CssClass="RadMenu_MetroTouch"
                    Skin="MetroTouch" EnableRoundedCorners="true" Width="100%"
                    Font-Names="Calibri">
                </telerik:RadMenu>
                </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>
Shinu
Top achievements
Rank 2
 answered on 07 Mar 2013
5 answers
162 views
Hi,
I am ussing radeditor with custom radcombobox in it. when i add the content from combobox to rad editor it paste the value on top of the content but i need to be Paste at the cursor point.



Thanks
Frank
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
173 views
Hello
Is it possible to have multiple Delimiter Values in RadAutoCompleteBox?
I want the comma and semicolon characters to cause the token to be added.
Nencho
Telerik team
 answered on 07 Mar 2013
1 answer
182 views
Hi...

I am new to telerik, facing problem with RadAsyncUpload and RadBinaryImage.
I want to show the thumbnail size preview of selected image from RadAsyncUpload as soon as upload is complete.
Preview image should be seen without any button click.
For showing preview I use RadBinaryImage but not able achieve this.

So please give the sample working example or anything so that i can complete this.

Thanks in advance
Shinu
Top achievements
Rank 2
 answered on 07 Mar 2013
2 answers
180 views
Hello,

Iam using a radgrid with detailtables in it.
Everythings works perfectly, data are shown correctly.
Now i want to resize the whole grid to fit.

I use this javascript:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
    function pageLoad() {
        var grid = $find("<%= RadGrid1.ClientID %>");
        var columns = grid.get_masterTableView().get_columns();
        for (var i = 0; i < columns.length; i++) {
            columns[i].resizeToFit();
        }
    }
 </script>
</telerik:RadCodeBlock>

Now the grid (Mastertable) is resize to fit, but the detailtables not.

What can i do to use resizeToFit() on the detailtables?

Sorry because of my english ;) 
Manuel
Top achievements
Rank 1
 answered on 07 Mar 2013
4 answers
538 views
Hi,

I am rebinding data grind on text changed event. When I changed the text in the text box, the data in the data grid need to reload. If I change the text in the text box which is in first row, the grid is reloading but the text box is missing on first row. But I am not getting issues when I changed the text in other rows.

I tried both data grid and rad grid.

I am using the below code,

.aspx Page Code

<rad:RadCodeBlock ID="RadCodeBlock1" runat="server">
 

<asp:datagrid id="Datagrid1" runat="server" Width="100%" AutoGenerateColumns="False" BorderColor="#B6B9BE" BorderWidth="1px" BorderStyle="Solid">
--Bound columns--
<asp:TemplateColumn
<ItemTemplate>

 <asp:TextBox ID="txt_QPercent" runat="server" Width="100%" Text='<%#Container.DataItem("RevisedPercent")%>' onkeydown="return jsDecimals(event,this.value);" MaxLength="3" onchange="SavePercent(this);" OnTextChanged="ReLoadGrid" AutoPostBack="True"></asp:TextBox>

</asp:TemplateColumn> 

</ItemTemplate>

 

</asp:datagrid>


</rad:RadCodeBlock>

<rad:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

<AjaxSettings>

 

<rad:AjaxSetting AjaxControlID="txt_QPercent"> 
<UpdatedControls

<rad:AjaxUpdatedControl ControlID="txt_QPercent" />

<rad:AjaxUpdatedControl ControlID="DgQAccounts" />

 
</UpdatedControls>

 

 </AjaxSettings>

 

</rad:RadAjaxManager>

 


Code Behind - aspx.vb

Public

 

Sub ReLoadGrid(ByVal sender As Object, ByVal e As System.EventArgs)

 

BindGrid(ID)--Binding the data in the function

 

End Sub

 


Thanks,
Durga Rao
Durga
Top achievements
Rank 1
 answered on 07 Mar 2013
3 answers
134 views
Hi guys,

I have a grid which allows filtering by columns. I need the filter to perform a postback after a filter has been applied. Is there any way to do it?

I have tried using AutoPostBackOnFilter="true", but it performs the postback before the filter has been applied in the client. The reason for which I need this is to enable or disable some radbuttons depending on the results of the filter; for example, if there are no rows once the filter has been applied, I want to disable the 'Edit' radbutton.

I have tried to do it client side, using the onGridCreated event:

var usuarioEsSupervisor;
        function afterGridCreation() {
// Called from onGridCreated
                // Mostrar el número de registros que hay en el grid

                var grid = $find("<%= gridIncidencias.ClientID %>");
                var MasterTable = grid.get_masterTableView();
                var Rows = MasterTable.get_dataItems();
                var filas = Rows.length;

                var etiqueta = $get("<%=lblNumberOfIssues.ClientID %>");
                etiqueta.innerHTML = filas;


                // Desactivar los botones de eliminar y editar si el grid no contiene registros
                var botonDelete = $find("<%=btnDeleteIssue.ClientID %>");
                var botonDetails = $find("<%=btnEditIssue.ClientID %>");

                if (filas > 0) {

                    if (usuarioEsSupervisor) {
                        botonDelete.set_enabled(true);
                    }
                    botonDetails.set_enabled(true);
                }
        }

 However, for some reason that I dont know, the vars botonDelete and botonDetails get null value and, therefore, I cannot reach the buttons.

Any idea please? Thank you.
Eyup
Telerik team
 answered on 07 Mar 2013
3 answers
97 views
hi,
I need to change dynamically cellStyle of a PivotGridAggregateField 
but the properties it's readonly

how can I do this ?

var rowField = new PivotGridAggregateField();
RadPivotGrid1.Fields.Add(rowField);
rowField.Aggregate = PivotGridAggregate.Sum;
rowField.DataFormatString = "{0:C}";
rowField.TotalFormatString = "{0:C}";
var style = new Style();
style.CssClass = "";
//rowField.CellStyle = style;
thanks


comgiu
Top achievements
Rank 2
 answered on 07 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?