Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
719 views
Hi,

I have a complex edit template for my grid and the two controls in question are a drop down list and a button. OnClientSelectedIndexChanged on the drop down, I want to set the button's visibility. However, I cannot get the ID of the button control.

How do I get the button's ID to manipulate it's visibility when the button is inside of a grid edit template?

I was trying to do it like this but it does not work (it gets the correct index, but still the button variable returns null)

var masterTable = $find('<%=RadGrid1.ClientID %>').get_masterTableView();
var editIndex = $find("<%=RadGrid1.ClientID %>")._editIndexes;
var btn = masterTable.get_dataItems()[editIndex].findControl('btnBracketLookup');
var selectedBracket = sender.get_selectedItem().get_value();
            if (selectedBracket == -1) {
                btn.set_visible(false);
            }

Garrett
Top achievements
Rank 1
 answered on 23 Jul 2014
1 answer
124 views
Is it possible to have multiple kinds of connections in one RadDiagram, each with their own "ConnectionDataSourceId" and "<ConnectionSettings .../> under "<BindingSettings>"?

This capability is critical to any application where the semantics of the connections needs to be distinguished visually to indicate the nature of the relationship.  Any but the simplest diagrams need this kind of semantic distinction.

Thanks,

Donald
Slav
Telerik team
 answered on 23 Jul 2014
1 answer
109 views
Hi, I'm using this code straight from the offline help file:

function GetFirstItemContactNameCell() {
    var masterTable = $find("<%=RadGrid1.ClientID%>").get_masterTableView();
    var contactName = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[0], "ContactName").innerHTML;
}

And Chrome is returning the warning:

    'Attr.nodeValue' is deprecated. Please use 'value' instead.

It is still returning the text from the cell but I'm wondering what I should be using instead? We're using version 2014.2.618.40 of the controls. Thanks.

Daniel

Maria Ilieva
Telerik team
 answered on 23 Jul 2014
1 answer
87 views
I have a Grid which is added to an UpdatePanel, which is then added to a Panel and finally to the page. My grid show a text like on top of it:  4336|updatePanel|ctl11_GXHyperLinkTab_ctl00_GXDivRightLeft_GXDivRight_ctl00_ctl00_ctl00_DocumentumDocumentAjaxUploadCtrl_DocumentumListGridCtrl_RadGrid1Panel|

When this is displayed, the entire page breaks! Can you tell me why this happens.
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Jul 2014
2 answers
693 views
What telerik control can be used for creating an online survey?
It just needs to gather user's inputs through several steps .. kind of wizard steps.

Thank you
Sam
Top achievements
Rank 1
 answered on 23 Jul 2014
3 answers
685 views
Do you have a control similar to http://timschlechter.github.io/bootstrap-tagsinput/examples/ to manage tags?
Ianko
Telerik team
 answered on 23 Jul 2014
1 answer
201 views
Hi,

how to make validation for minimum width and minimum height for image before upload on server.

Appreciate for quick response


Yasin
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2014
1 answer
333 views
Hi. I try get item from edit form template, when edit button pressed, to change some of their values.
But I always receive null.
My code:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"
    DataSourceID="sqlDataFeedGrid" GridLines="Both" AllowPaging="True"
    AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True"
    OnInsertCommand="RadGrid1_InsertCommand"
    OnEditCommand="RadGrid1_EditCommand"
    OnPreRender="RadGrid1_PreRender" OnUpdateCommand="RadGrid1_UpdateCommand">
    <PagerStyle Mode="NextPrevAndNumeric" />
    <MasterTableView DataSourceID="sqlDataFeedGrid" AutoGenerateColumns="False"
        DataKeyNames="Id" CommandItemDisplay="Top">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />
            <telerik:GridBoundColumn DataField="Id" HeaderText="Datafeed ID" SortExpression="Id" UniqueName="Id" Visible="False" MaxLength="10" />
            <telerik:GridBoundColumn DataField="IPAddress" DataType="System.String" HeaderText="IP Address" SortExpression="IPAddress" UniqueName="IPAddress" />
            <telerik:GridBoundColumn DataField="Name" DataType="System.String" HeaderText="Name" SortExpression="Name" UniqueName="Name" />
            <telerik:GridBoundColumn DataField="Status" DataType="System.String" HeaderText="Status" SortExpression="Status" UniqueName="Status" />
            <telerik:GridBoundColumn DataField="Configs" DataType="System.Guid" HeaderText="Configs" SortExpression="Configs" UniqueName="Configs" />
            <telerik:GridBoundColumn DataField="Logs" DataType="System.String" HeaderText="Logs" SortExpression="Logs" UniqueName="Logs" />
            <telerik:GridBoundColumn DataField="setupInstruction" DataType="System.Guid" HeaderText="Install Instruction" SortExpression="setupInstruction" UniqueName="setupInstruction" />
            <telerik:GridBoundColumn DataField="execInstruction" DataType="System.Guid" HeaderText="Execute Instruction" SortExpression="execInstruction" UniqueName="execInstruction" />
            <telerik:GridBoundColumn DataField="Description" DataType="System.String" HeaderText="Description" SortExpression="Description" UniqueName="Description" />
            <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton" />
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn UniqueName="EditColumn"></EditColumn>
            <FormTemplate>
                <table cellspacing="2" cellpadding="1" width="100%" border="0"
                    rules="none" style="border-collapse: collapse;">
                    <tr class="EditFormHeader">
                        <td colspan="2" style="font-size: small">
                            <b>Datafeed Details</b>
                        </td>
                    </tr>
 
                    <tr>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>ID</td>
                        <td>
                            <asp:TextBox ID="txtId" runat="server" ValidationGroup="Datafeed" ReadOnly="true" Text='<%# Bind("Id") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>IP Address
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlMachineId" EnableViewState="true" AutoPostBack="true"
                                runat="server" DataSourceID="sqlMachineId" DataTextField="IPAddress"
                                DataValueField="ID" OnSelectedIndexChanged="ddlMachineId_IndexChange" />
                            <asp:Label ID="lblHostingName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>Data Agent</td>
                        <td>
                            <asp:DropDownList ID="ddlDataAgentID" runat="server" DataSourceID="sqlDataAgentId" DataTextField="Name" DataValueField="ID">
                            </asp:DropDownList><asp:Button ID="addAgent" runat="server" Text="Add" Width="55px" OnClick="addAgent_Click" />
                            <asp:ListBox ID="agentsList" runat="server" Height="91px" Width="194px"></asp:ListBox>
                        </td>
                    </tr>
                    <tr>
                        <td>Datafeed Name</td>
                        <td>
                            <asp:TextBox ID="txtName" runat="server" ValidationGroup="Datafeed" Text='<%# Bind("Name") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>Status</td>
                        <td>
                            <asp:TextBox ID="txtStatus" runat="server" ValidationGroup="Datafeed" Text='<%# Bind("Status") %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>Config File</td>
                        <td>
                            <asp:FileUpload runat="server" ID="configFile" Width="229px" />  <asp:HyperLink runat="server" ID="confResult" Target="_blank" />
                        </td>
                    </tr>
                    <tr>
                        <td>Logs Path</td>
                        <td>
                            <asp:TextBox ID="txtLogs" runat="server" ValidationGroup="Datafeed" Text='<%# Bind("Logs") %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>Install Instruction</td>
                        <td>
                            <asp:FileUpload runat="server" ID="setupFile" Width="229px" />  <asp:HyperLink runat="server" ID="setupResult" Target="_blank" />
                        </td>
                    </tr>
                    <tr>
                        <td>Execute Instruction</td>
                        <td>
                            <asp:FileUpload runat="server" ID="execFile" Width="229px" />  <asp:HyperLink runat="server" ID="execResult" Target="_blank" />
                        </td>
                    </tr>
                    <tr>
                        <td>Description</td>
                        <td>
                            <asp:TextBox ID="txtDescription" runat="server" ValidationGroup="Datafeed" TextMode="MultiLine" Height="58px" Width="303px" Text='<%# Bind("Description") %>'></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <asp:Button runat="server" ID="btnUpdate" Text='<%#(Container is GridEditFormInsertItem) ? "Insert":"Update" %>'
                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert":"Update" %>' /> 
                            <asp:Button runat="server" ID="btnCancel" Text="Cancel" CausesValidation="False" CommandName="Cancel" />
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
    </ClientSettings>
</telerik:RadGrid>

protected void RadGrid1_EditCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName != RadGrid.EditCommandName) return;
            GridDataItem gridDataItem = e.Item as GridDataItem;
             
            var ddlMachineId = gridDataItem.FindControl("ddlMachineId") as DropDownList;
            var ddlDataAgentID = gridDataItem.FindControl("ddlDataAgentID") as DropDownList;
            var agentsList = gridDataItem.FindControl("agentsList") as ListBox;
            var confResult = gridDataItem.FindControl("confResult") as HyperLink;
            var execResult = gridDataItem.FindControl("execResult") as HyperLink;
            var setupResult = gridDataItem.FindControl("setupResult") as HyperLink;
}

gridDataItem.FindControl return null for all my ids.
Please help.
Princy
Top achievements
Rank 2
 answered on 23 Jul 2014
1 answer
129 views
Hi,

I have a project where I dynamic change the theme i.e. css. We also support multilingual, hence we have used RTL css also.

Since my base css is:
html, body
{
direction: rtl;
}

I have used RadEditor and my RadEditor toggle full screen does not work fine with if I use the base css direction: rtl;
To fix the same issue I have used a dynamic EditorContentArea_RTL.css file, where we use :
html, body
{
direction: ltr !important;
}

The issue is, toggle full screen doesn't open in full screen in RTL and the toolbar window (popup) doesn't open in the center of the screen.
Please note, RadEditor ToolbarMode used if floating.

If I change the base css class from

html, body
{
direction: rtl;
}
to
html, body
{
direction: ltr;
}
the RadEditor and even the toggle full screen works fine. But I need base css for rest of my code to be rtl.


I have read and checked few help articles on telerik site, but unfortunately it does not work.
Also if I use the toolbar as floating and toggle full screen, it doesn't work on Telerik site also.
Some links I used :
http://www.telerik.com/help/aspnet-ajax/editor-right-to-left-support.html
http://demos.telerik.com/aspnet-ajax/editor/examples/righttoleft/defaultcs.aspx

Waiting for a prompt reply !!
Thanks
Ianko
Telerik team
 answered on 23 Jul 2014
3 answers
113 views
Hi,

I have a project where I dynamic change the theme i.e. css. We also support multilingual, hence we have used RTL css also.

Since my base css is:
html, body
{
direction: rtl;
}

I have used RadEditor and my RadEditor toggle full screen does not work fine with if I use the base css direction: rtl;
To fix the same issue I have used a dynamic EditorContentArea_RTL.css file, where we use :
html, body
{
direction: ltr !important;
}

The issue is, toggle full screen doesn't open in full screen in RTL and the toolbar window (popup) doesn't open in the center of the screen.
Please note, RadEditor ToolbarMode used if floating.

If I change the base css class from

html, body
{
direction: rtl;
}
to
html, body
{
direction: ltr;
}
the RadEditor and even the toggle full screen works fine. But I need base css for rest of my code to be rtl.

I have read and checked few help articles on telerik site, but unfortunately it does not work.
Also if I use the toolbar as floating and toggle full screen, it doesn't work on Telerik site also.
Some links I used :
http://www.telerik.com/help/aspnet-ajax/editor-right-to-left-support.html
http://demos.telerik.com/aspnet-ajax/editor/examples/righttoleft/defaultcs.aspx

Waiting for a prompt reply !!
Thanks

Ianko
Telerik team
 answered on 23 Jul 2014
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?