Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
293 views
1. I have RadGrid
2. I have DetailTable 
3. All master rows have detail rows
4. All rows expanded

Why get_nestedViews()[0] have value only for first row in master grid?!

                var grid = $find("<%=masterGrid.ClientID %>");
                 var rows = grid.get_masterTableView().get_dataItems();

                    for (var i = 0; i < rows.length; i++) {
                        if (rows[i].get_nestedViews().length > 0)
                        {
                            var nestedView = rows[i].get_nestedViews()[0];
                            .......
                        }                        
Princy
Top achievements
Rank 2
 answered on 18 Aug 2014
3 answers
182 views
Dear Team,

I have a rad Grid, with in which I have created a  checkbox column and assing the Data to this grid. The check box is getting check or unchecked according to the Data. Perferct till here.

<telerik:GridTemplateColumn HeaderText="IsIndividual" UniqueName="IsIndividual" ReadOnly="true">
<ItemTemplate>
<asp:CheckBox ID="chkboxIsIndividual" runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>

But this check box appears editable, I can uncheck/ check it in the Grid. But I want this column to be read Only. The grid should show checked/unchecked as per the data but should not allow to edit this checkbox. When I try to make the enable property to false, all the records a show checked, which is incorrect :(


Below is the code in the
radCBTransactionDetails_ItemCreated to check/uncheck the checkbox.

if (column.UniqueName == "IsIndividual" && column is GridTemplateColumn)
{
CheckBox chk = (CheckBox)e.Item.FindControl("chkboxIsIndividual");
// chk.Enabled = false;
if (gridItem.OwnerTableView.DataKeyValues[gridItem.ItemIndex]["IsIndividual"].ToString().ToUpper().Equals("TRUE"))
{
chk.Checked = true;
//chk.Enabled = false;
editLink.Text = "ViewIndividual";
}
else if (gridItem.OwnerTableView.DataKeyValues[gridItem.ItemIndex]["IsIndividual"].ToString().ToUpper().Equals("FALSE"))
{
chk.Checked = false;
//chk.Enabled = true;
editLink.Text = "Bulk";

}
}​

Please help me with this asap.
Shinu
Top achievements
Rank 2
 answered on 18 Aug 2014
3 answers
171 views
1,SingleClick="True"
2,we have some validator at codebehind

when throw new exception("XXXX"), the button is disabled.

how can i make it enabled?
wk
Top achievements
Rank 1
 answered on 18 Aug 2014
3 answers
118 views
i am using telerik Version=2011.3.1115.35 . i want to use singleclick functionality. my code is in asp.net VB, its urgent please help
SANJAY
Top achievements
Rank 1
 answered on 16 Aug 2014
6 answers
239 views
I want to have some javascript code on OnClientReordering. It works fine however code also fires on load or databind of the RadListBox.
Please help!
David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 15 Aug 2014
2 answers
355 views
Hello,

I have a RadEditor that is supposed to use the Image Manager that allows them to upload and insert pictures. Here is my code for formatting it from the C# side. The imgPath created is a virtual path.

string imgPath = GenerateOutputDirectory(false);
CreateDirectoryIfNotExist(imgPath);
RadEditor1.ImageManager.ViewPaths = new string [] {imgPath};
RadEditor1.ImageManager.UploadPaths = new string[] { imgPath };
RadEditor1.ImageManager.EnableAsyncUpload = true;
RadEditor1.ImageManager.SearchPatterns = new string[] { "*.jpeg", "*.jpg", "*.bmp", "*.gif", "*.png" };


I create a string that creates the virtual path in imgPath, then if the directory does not exist, I create it so the imgPath exists for sure. Then I attempt to set the View and Upload path of the image manager to have those folders. However, when I open the image manager, this is what I see: (attached .png image)

The way it looks it seems that my paths are not being set. Why is this? The imgPath is the correct virtualPath. 

  
Jason
Top achievements
Rank 1
 answered on 15 Aug 2014
2 answers
142 views
my raddropdowntree appears always at the top of html DOM , before the form , with absolute position

How can keep it in the same place I put in the aspx page with absolute positioning .

Magdalena
Telerik team
 answered on 15 Aug 2014
2 answers
454 views
Hello Team,

I want Rad Menu to behave responsive for my asp.net application.

Please find code below :
    <div class="container">
        <button class="toggle" type="button">Toggle menu</button>
        <div  class="popup">
    <telerik:RadMenu runat="server" RenderMode="Lightweight">
                <Items>
                    <telerik:RadMenuItem Text="File">
                        <Items>
                            <telerik:RadMenuItem Text="New" />
                            <telerik:RadMenuItem Text="Open" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Save" />
                            <telerik:RadMenuItem Text="Save As" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Print Preview" />
                            <telerik:RadMenuItem Text="Print" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Close" />
                        </Items>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Edit">
                        <Items>
                            <telerik:RadMenuItem Text="Undo" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Cut" />
                            <telerik:RadMenuItem Text="Copy" />
                            <telerik:RadMenuItem Text="Paste" />
                            <telerik:RadMenuItem Text="Clipboard..." />
                            <telerik:RadMenuItem IsSeparator="True" />
                        </Items>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Insert">
                        <Items>
                            <telerik:RadMenuItem Text="Break..." />
                            <telerik:RadMenuItem Text="Page Numbers..." />
                            <telerik:RadMenuItem Text="Date and Time..." />
                            <telerik:RadMenuItem Text="Field..." />
                            <telerik:RadMenuItem Text="Symbol..." />
                            <telerik:RadMenuItem Text="Comment" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Picture" />
                            <telerik:RadMenuItem Text="Diagram" />
                            <telerik:RadMenuItem Text="Text Box" />
                            <telerik:RadMenuItem Text="Hyperlink" />
                        </Items>
                    </telerik:RadMenuItem>
</Items>
            </telerik:RadMenu>
    </div>
    </div>

Script:

 <script type="text/javascript">
            Sys.Application.add_load(function () {

                var $ = $telerik.$,
                    mqTest = document.getElementById("mqTest");

                $("link.append").appendTo("head");

                $(".toggle").bind("click", function () {
                    $(".popup").toggle();
                });

                var mq = window.matchMedia("(max-width: 980px)");
                mq.addListener(handleWidthChange);

                function handleWidthChange(mq) {
                    if (mq.matches) {
                        $(".popup").hide();
                    }
                    else {
                        $(".popup").show();
                    }
                }
                handleWidthChange(mq);
            });
        </script>

Css:
.toggle {
    display: none;
}
@media only screen and (max-width: 360px) {

    .container {
        position: relative;
    }

    .toggle {
        display: inline-block;
    }

    .popup {
        position: relative;
        left: 0;
        top: 100%;
        display: none;
    }

    .RadMenu {
        font-size: 16px;
        min-width: 40vw;
    }

    .RadMenu .rmRootGroup {
    }
        .RadMenu .rmRootGroup > .rmItem {
            float: none;
            border: 0;
            border-bottom: 1px solid #cccccc;
        }
        .RadMenu .rmRootGroup > .rmLast {
            border: 0;
        }

        .RadMenu .rmRootGroup .rmRootLink {
            padding: .5em 1em;
        }

    .rmSlide {
        display: inline-block !important;
        padding-left : 154px;
    }
}


It behaves too bad on hover effect and Sub Menu item always comes on top instead of inline with its parent item.

Can any one help me out?

Thanks and Regards,
Ruchi Patel
Ivan Zhekov
Telerik team
 answered on 15 Aug 2014
1 answer
177 views
I am having a problem with clearing filter value. I need to set ListOfFilterValues = Nothing for a GridBoundColumn. My code is as follows:

If TypeOf column Is GridBoundColumn Then
     Dim boundColumn As GridBoundColumn = TryCast(column, GridBoundColumn)
     boundColumn.FilterListOptions = GridFilterListOptions.AllowAllFilters
     DirectCast(column, Telerik.Web.UI.GridBoundColumn).ListOfFilterValues = Nothing

End If

However I am getting the error

Error 1 'Telerik.Web.UI.GridColumn.Protected Friend Property ListOfFilterValues As String()' is not accessible in this context because it is 'Protected Friend'. 

Any solution?

Thanks
Konstantin Dikov
Telerik team
 answered on 15 Aug 2014
4 answers
746 views
I am working on a program where I want to search for certain criteria in my database and display results in RadGrid.  I have created a WebMethod function that will query my database to get me my results.  My question is how to build result to pass back to Javascript to rebind the datasource?  I am currently storing info into DataTable, but I was reading that you need to have it in JSON format (is this accurate?).  So, once I have created my data in JSON format, how do I pass that over to a Javascript function as a parameter to then set datasource and rebind?

A side question: my boss is wanting this to occur on keypress.  How logical will this be?  Meaning will this be fast enough to continually fire and update on keypress?  So as person types each character of a person's last name in last name text box it continually fires the event and you see the results in the grid continually change as you type.  Thoughts???

Thank You,

Brad
Konstantin Dikov
Telerik team
 answered on 15 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?