Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
733 views
Im having some trouble understanding why I cant access columns within the PreRender function.  Here is the code.  I am loading the grid at runtime.

Why do I not get inside of either of these loops?  But, the commented code will set the ID columns visibility to false if uncommented.
Private Sub RadGrid_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid.PreRender
    For Each column As GridColumn In RadGrid.MasterTableView.Columns
        If column.UniqueName = "ID" Then
            column.Visible = False 'Not column.Visible
        End If
    Next
    For Each column2 As GridColumn In RadGrid.Columns
        If column2.UniqueName = "ID" Then
            column2.Visible = False 'Not column.Visible
        End If
    Next
    'Dim column3 As GridColumn = RadGrid.MasterTableView.GetColumnSafe("ID")
    'If column3 IsNot Nothing Then
    '    column3.Visible = False 'Not column.Visible
    'End If
    RadGrid.MasterTableView.Rebind()
End Sub

Here is the PageLoad just in case.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not IsPostBack() Then
        Dim bp As BasePage
        bp = CType(Parent.Page, BasePage)
        RadGrid.DataSource = bp.mDs
        bp.ExecuteQuery(" WHERE 1 = 0 ")
    End If
End Sub

Princy
Top achievements
Rank 2
 answered on 03 Mar 2011
3 answers
88 views
I need to do this:
 C #
          var item = RadGrid.MasterTableView.GetInsertItem ();
but in javascript
         ????????
Giancarlo
Top achievements
Rank 1
 answered on 03 Mar 2011
4 answers
389 views

Hi Telerik team,

 

I am Telerik user and I have an requirement as below:

 

 

Right now, Telerik RadListBox doesn’t support Dropped event (it is not fired when dropping an item over another RadListBox/RadListBoxItem). So, how can I sort  AvailableList’s items whenever an item is dropped into it?

 

I have tried to work around by firing two event OnInserted and OnUpdated, but it seems hopelessness (these two events were fired one by one after an item was dropped into AvailableList), and it threw exception like:

 

Line: 6

Error: Sys.WebForms.PageRequestManagerServerErrorException: Insertion index was out of range. Must be non-negative and less than or equal to size.

Parameter name: index

 

It’s urgent, any solution please?

 

Many thanks,

Bo

kate tsai
Top achievements
Rank 1
 answered on 02 Mar 2011
2 answers
110 views
I have a RadTreeView set up so that the lowest level of the tree has a check box. It has many nodes so I have implemented the Page Methods functionality.  I am trying to decrease the level of clicks by using the UncheckAllNodes() method on the tree. On tree load I have a javascript function that will hide the original node and I created a custom RadTreeNodeData class that has an object ShowCheckBox and Checked objects. When I call the UncheckAllNodes, I need it to be on the lowest level, instead what I'm getting is all nodes unchecked (expected), but the check boxes are showing up for the non-lowest level nodes. Is there a function I could call that will re-hide the check boxes, or a function that will un-check nodes that are checked? That way it won't affect the style I've applied to the nodes above?

function TreeViewLoad() {
    var treeView = $find("<%=TreeView.ClientID%>");
    if (treeView != null) {
        var node = treeView.get_nodes().getNode(0); //get the first node
        node.get_checkBoxElement().style.display = "none"; // hide the CheckBox
    }
}

function OnClientNodeDataBoundHandler(sender, e) {
    var node = e.get_node();
    if (e.get_dataItem().ShowCheckBox) {
        node.set_checked(e.get_dataItem().Checked);
    }
    else {
        node.get_checkBoxElement().style.display = "none"; // hide the CheckBox
    }
}
Alex
Top achievements
Rank 2
 answered on 02 Mar 2011
1 answer
95 views
Hi,

I am trying to upload the files using RADUpload control.

I am able to upload all the files but not able to .bmp.

even i mentioned this extention in AllowFileExtention property.

Please help,

Thanks in advance,
Mahendra
Dimitar Terziev
Telerik team
 answered on 02 Mar 2011
1 answer
257 views
Hi,
I am using Visual Studio 2010 with Framework 4.0 and the Telerik.Web.UI and Telerik.Web.Design dlls are versioned at 2010.3.1317.40
I have been having problems adding a user web control to an aspx page via mark up and have been getting the error shown above.
The user control is one of a series of user controls some of which incorporate Telerik RadComboBox controls.  Any user control which does not have a Telerik RadComboBox control within it can be found and added to the page markup without the error occurring.

Markup page Inherits from:
ScottishParliament.QAndMSearchControls.QAndMSearch (with QAndMSearch being the name (and class) of the aspx page).
The Telerik.Web.UI Assembly is registered on the markup page using:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik>Web.UI" TagPrefix="telerik" %>

The aspx page references the Telerik assemblies Telerik.Web.Design and Telerik.Web.UI found by browsing.

Each control is Registered on the mark up page.  All (working and non-working) reside in the same child folder.  They are all assigned a tagPrefix of uc and a TagName matching their ControlName with Src pointing to the relative path of the ascx file involved.
Eg
<%@ Register TagPrefix="uc" TagName="MSPUC" Src="~/ChildUserControls/MSPUC.ascx" %>

I am trying to add the control to a asp:panel control using
<uc:MSPUC ID="MSPUC1" runat="server" />

There is a Script Manager in place at the head of the list of user controls as I am aware that the Telerik drop list requires one.  This is entered as:
<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True" />

The aspx page written in c# is part of namespace ScottishParliament.QAndMSearchControls.
It has a 'using ScottishParliament.QAndMSearchControls.ChildUserControls;' statement at the top.

All user controls (those that use Telerik components and those that don't) all belong to namespace 'ScottishParliament.QAndMSearchControls.ChildUserControls.
The example control MSPUC does not work and has an ASP Label and ASP DropList as well as a Telerik RadComboBox.  These all appear on the Designer.cs page and can be referenced in the user control's own code page without problems.
The control's own Markup page registers the Telerik Web UI assembly in the same way as the aspx page.

I can't work out why there is a difference in behaviour from these controls and after some investigation found that removing the telerik component from the user control and re-building allowed me to add the control to the aspx mark up.
I had read from somewhere that it might be a trust issue resulting in the Telerik assemblies not being found?

Thanks for any help that can be provided in advance.
Simon
Telerik team
 answered on 02 Mar 2011
1 answer
97 views

I wanna write in one of my tab text the following " Imagazine *new* ".
But i want the *new* text to be in certain color other than the one am using for Imagazine. I tried the following :

Text="iMagazine <font color='FF FA 03'>*new*</font>"
But when i try to open the its RadpageView i doesnt show its content.

Is there another way to do that without affecting the pageview?
Kate
Telerik team
 answered on 02 Mar 2011
2 answers
54 views
Well...another issue which I am unable to resolve...lemme explain

I have an ascx page...which I want to load into a tab...now the issue is that I am able to load the tab in the first tab...but when I load the user control in the second tab...it goes blank and doesn't show anything...this is happening just for my user controls...

Now when I have a simple gridview with a sql datasource in another usercontrol...this time I am able to load this properly in the "child" tabs...no issues whatsoever.

The issue pertains to only loading of user controls in child tabs where I have multiple asp tools embedded in that particular user control...something like the one which is shown below.

<asp:GridView ID="grdContent" runat="server" AutoGenerateColumns="false" Height="124px" 
    Width="577px" OnRowCommand="grdContent_RowCommand"
    <Columns> 
        <asp:TemplateField HeaderText="Language"
            <ItemTemplate> 
                <asp:Label ID="lblLanguage" runat="server" Text='<%#Bind("ActualLanguage") %>'></asp:Label> 
            </ItemTemplate> 
        </asp:TemplateField> 
        <asp:CheckBoxField HeaderText="Read" DataField="IsRead" /> 
        <asp:CheckBoxField HeaderText="Write" DataField="IsWrite" /> 
        <asp:CheckBoxField HeaderText="Speak" DataField="IsSpeak" /> 
        <asp:TemplateField> 
            <ItemTemplate> 
                <asp:LinkButton ID="lnkModify" runat="server" CommandName="Modify" CommandArgument='<%#Bind("ID") %>' 
                    Text="Modify"></asp:LinkButton> 
                <asp:LinkButton ID="lnkDelete" runat="server" CommandName="Del" CommandArgument='<%#Bind("ID") %>' 
                    Text="Delete"></asp:LinkButton> 
                <asp:HiddenField ID="hdnID" runat="server" Value='<%#Bind("ID") %>' /> 
            </ItemTemplate> 
        </asp:TemplateField> 
    </Columns> 
</asp:GridView> 
&nbsp; 
<JobsControl:LinkButton ID="lbtnNew" runat="server" OnClick="lbtnNew_Click">New</JobsControl:LinkButton> 
<asp:Panel ID="LanguagePanel" runat="server" Visible="False"
    <table width="100%" border="0" cellpadding="0" cellspacing="0"
        <tr> 
            <td width="5%"
            </td> 
            <td style="width: 30%"
                Language 
            </td> 
            <td width="60%"
                <JobsControl:CompositCombo ID="ddlLanguage" runat="server" CommonCode="160" IsLoadValuesInPostBack="true" /> 
                <asp:HiddenField ID="hdnID" runat="server" /> 
                <asp:HiddenField ID="hdnLanguageID" runat="server" /> 
            </td> 
            <td width="5%"
            </td> 
        </tr> 
        <tr> 
            <td width="5%"
                &nbsp; 
            </td> 
            <td style="width: 30%"
                Read 
            </td> 
            <td width="60%"
                <JobsControl:CheckBox ID="chkRead" runat="server" /> 
            </td> 
            <td width="5%"
                &nbsp; 
            </td> 
        </tr> 
        <tr> 
            <td width="5%"
                &nbsp; 
            </td> 
            <td style="width: 30%"
                Write 
            </td> 
            <td width="60%"
                <JobsControl:CheckBox ID="chkWrite" runat="server" /> 
            </td> 
            <td width="5%"
                &nbsp; 
            </td> 
        </tr> 
        <tr> 
            <td width="5%"
                &nbsp; 
            </td> 
            <td style="width: 30%"
                Speak 
            </td> 
            <td width="60%"
                <JobsControl:CheckBox ID="chkSpeak" runat="server" /> 
            </td> 
            <td width="5%"
                &nbsp; 
            </td> 
        </tr> 
        <tr> 
            <td width="5%"
                &nbsp; 
            </td> 
            <td style="width: 30%"
                &nbsp; 
            </td> 
            <td width="60%"
                <JobsControl:Button ID="btnSave" runat="server" CausesValidation="False" OnClick="btnSave_Click" 
                    Text="Save" Width="54px" /> 
            </td> 
            <td width="5%"
                &nbsp; 
            </td> 
        </tr> 
    </table> 
</asp:Panel> 

David
Top achievements
Rank 1
 answered on 02 Mar 2011
1 answer
170 views
Hi,
Is it possible to have the RadScheduler display a Vertical Timeline view with the days down the y axis and the people along the top on the x axis?
I attached a screenshot of what Im describing.

Thank you
Veronica
Telerik team
 answered on 02 Mar 2011
3 answers
86 views
Is it possible install on my pc more version of Asp.Net Ajax controls and to use one in a project and one in an another (old) project?
Are there any problems?

Template project?

does "dll telerik" register in GAC?
Veronica
Telerik team
 answered on 02 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?