Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
116 views

 Hi Guys,
 
 I haven't had the need to use much javascript...so please forgive my ignorance.
 
 Im trying to write some client-side validation code.
 
 The premise is that each listbox item hold a delimited value that contains a ProductId and other ProductIds it cannot coexist with.
 
 For example value=1,4,6,8.  This is intrepreted that the ProductId of this item =1 and it cannot be added to any list box which already has Products 4,6 or 8 in it.
 
 I have successfully done this server side with the following code and I am trying to reproduce client-side with javascript.  Any help would be appreciated.
 
   

Private Sub RadListBoxDestination_Transferring(sender As Object, e As Telerik.Web.UI.RadListBoxTransferringEventArgs) Handles RadListBoxDestination.Transferring
 
    Dim aryNoCoExist As Array
    Dim i As Integer
    Dim Product As Integer
    Dim Cancel As Boolean = False
    Dim BoxItem As Telerik.Web.UI.RadListBoxItem
    Dim NoCoExist As String = ""
 
    Me.ErrorLabel.Text = ""
 
    If RadListBoxDestination.Items.Count > 0 Then
        Product = GetProductId(e.Items(0).Value) 'GetProductId returns the first delimited string  item
 
        For Each BoxItem In RadListBoxDestination.Items
            If Len(NoCoExist) Then
                NoCoExist = NoCoExist & "," & GetNoCoExist(BoxItem.Value) 'GetNoCoExist returns the remaining delimited string minus the first item
            Else
                NoCoExist = GetNoCoExist(BoxItem.Value)
            End If
        Next
        aryNoCoExist = Split(NoCoExist, ",")
 
        For i = 0 To aryNoCoExist.GetUpperBound(0)
            If Product = aryNoCoExist(i) Then
                Cancel = True
                Me.ErrorLabel.Text = "Product Not Compatible with Existing Selections"
            End If
        Next
        e.Cancel = Cancel
 
    End If
 
End Sub
    
    
    My Listbox Definition: 

 

 

 

 

 

<telerik:RadListBox runat="server" ID="RadListBoxSource" Height="200px" Width="300px" AllowTransfer="true" TransferToID="RadListBoxDestination"
                        AllowTransferOnDoubleClick="True"  EnableDragAndDrop="True">
                        <ButtonSettings TransferButtons="Common" ShowDelete="False" ShowReorder="False" ShowTransferAll="False"></ButtonSettings>
                    </telerik:RadListBox>
                    <telerik:RadListBox ID="RadListBoxDestination" runat="server" Height="200px" Width="300px" AllowTransfer="true" TransferToID="RadListBoxSource"
                        AllowTransferOnDoubleClick="True"  EnableDragAndDrop="True" OnClientTransferring="onTransferring">
                        <ButtonSettings TransferButtons="Common" ShowTransfer="false" ShowDelete="False" ShowReorder="False" ShowTransferAll="False"></ButtonSettings>
                    </telerik:RadListBox>

 

 

 

  
     Thanks....
    
     David

Kate
Telerik team
 answered on 21 Jun 2013
2 answers
102 views
Hey guys,

We updated our Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll yesterday and noticed that our buttons which use a custom skin broke. Was there any change that would have caused this?
Danail Vasilev
Telerik team
 answered on 21 Jun 2013
4 answers
353 views
Hi Guys,

I am trying to display an aspx page in a radWindow. I can get the webPage to load in the RadWindow but it only shows me CheckBoxes and none of my buttons.

I have tried many ways of trying to get this to display correctly but have failed everytime. my last attempt just loads a blank RadWindow,its probably a simple fix could someone please help me out.

Here is my aspx page i need loaded into my RadWindow


<body id="SendNotifications">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        <StyleSheets>
            <telerik:StyleSheetReference Path="~/Styles/Site.css" />
            <telerik:StyleSheetReference Path="~/App_Themes/Skins.skin" />
        </StyleSheets>
    </telerik:RadStyleSheetManager>
  
    <form id="form1" runat="server">
    <div class="oops">
  
        <asp:ScriptManager ID="notifyScriptManager" runat="server" />
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2010Silver" DecoratedControls="All" />
  
        <asp:FormView ID="NotificationForm" runat="server" Width="100%" Height="300px" >
            <EditItemTemplate>
                 
<table class="IncDetails">
                    <tr>
                        <td>
                            <asp:CheckBox runat="server" ID="chkIncLogger" Checked="false" Text="Notify Incident Logger" />
                        </td>
                        <td>
                            <asp:CheckBox runat="server" ID="chkIncAssignee" Checked="true" Text="Notify Current Assignee" Enabled="false" />
                         </td>
                         <td>
                            <asp:CheckBox runat="server" ID="chkNotifyManager" Checked="false"  Text="Notify Notify Manager" />
                        </td>
                        <td>
                            <asp:CheckBox runat="server" ID="chkIncDistList" Checked="false"  Text="Notify Distribution List " />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:CheckBox runat="server" ID="chkIncCreator" Checked="false" Text="Notify Incident Creator" />
                        </td>
                        <td>
                            <asp:CheckBox runat="server" ID="chkIncOrigAssignee" Checked="false" Text="Notify Original Assignee" Enabled="false" />
                         </td>
                         <td>
                            <asp:CheckBox runat="server" ID="chkIncConsumer" Checked="false" Text="Notify Consumer" Enabled="false" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnSave" runat="server" Text="Save" />
                           </td>
                            <td>
                            <asp:Button ID="btnClose" runat="server" Text="Close" />
                        </td>
                    </tr>
                </table>
            </EditItemTemplate>
        </asp:FormView>
    </div>
    </form>
</body>
</html>


As you can see this is very short, All that i need is when a user clicks on a button the RadWindow will appear and display the following CheckBoxes and Buttons inside of the rad window.

Here is the javascript i am using to call the RadWindow

function ShowNotificationForm() {
                window.radopen("/Inc/Notifications.aspx", "NotifyDialog");
                return false;
            }

And here is the RadWindowManager from the Page it is being called from

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
<telerik:RadWindow ID="NotifyDialog" runat="server" ReloadOnShow="true" ShowContentDuringLoad="false"    Modal="true"    Width="900px" Height="760px">
</telerik:RadWindow>
</Windows>

This does not give me any errors the RadWindows is displayed But without any Controls.

Thank you  in advance
Danail Vasilev
Telerik team
 answered on 21 Jun 2013
4 answers
208 views
When i'm trying to bind a record from one grid view to another grid view using item command event i'm facing the following error.

"Object Doesn't support this action". please help me regarding this.
Selvamanikandan
Top achievements
Rank 1
 answered on 21 Jun 2013
1 answer
176 views
1. Single Select: I want user to select only one node and if user selects another then previous one is deselected. I am using Entry_Added event and can clear the entries but not sure how to select entry. I looks like I need to use both clientside and serverside events. How can I allow single select?

2 Tooltip on nodes: How can I show tooltip on nodes? The tooltip for control is there but I can't find any property for nodes.

3. Is it possible to find and select the node with node value. There is no property called Nodes and find Entries collection. how can show the checkbox checked for a node with a specific value?
Kate
Telerik team
 answered on 21 Jun 2013
3 answers
125 views
How do I delete rows from a self-hierarchial radgrid?  I want to do this with a 'remove' button click.
When a row is selected and 'remove' is clicked, I would like to remove the selected row as well as its children.

Thanks
Raka
Princy
Top achievements
Rank 2
 answered on 21 Jun 2013
1 answer
110 views
I've seen example. 
But I can't realize binding hierarchy.
I've one table ID, ParentID (see attached image)
There is my grid.
<MasterTableView DataSourceID="dsMain" DataKeyNames="ID, ParentID" AllowSorting="True" HierarchyLoadMode="ServerBind" GroupLoadMode="Server">
<DetailTables>
<telerik:GridTableView DataSourceID="dsSub" DataKeyNames="ID, ParentID" Width="100%" AutoGenerateColumns="True"  >
 <ParentTableRelation>
  <telerik:GridRelationFields DetailKeyField="ID" MasterKeyField="ID">
  </telerik:GridRelationFields>
</ParentTableRelation>
 </telerik:GridTableView>
                     
</DetailTables>

My object data source

<asp:ObjectDataSource id="dsMain" runat="server" selectmethod="GetRootCategories" deletemethod="DeleteCategory"
      typename="Ascent.Catalog.Model.DataModel.Categories">
     <deleteparameters>
         <asp:Parameter Name="ID" Type="Int32"/>
     </deleteparameters>
 </asp:ObjectDataSource>
  
<asp:ObjectDataSource id="dsSub" runat="server" selectmethod="GetSubCategoriesByParentCategoryId" deletemethod="DeleteCategory"
      typename="Ascent.Catalog.Model.DataModel.Categories">
    <deleteparameters>
              <asp:Parameter Name="ID" Type="Int32"/>
    </deleteparameters>
     
    <SelectParameters>
    <asp:SessionParameter Name="pID" SessionField="ID" Type="Int32"></asp:SessionParameter>
    </SelectParameters>
 
 </asp:ObjectDataSource>

Each time when "GetSubCategoriesByParentCategoryId" is called  ID = 0.

What am i doing wrong?
Andrey
Telerik team
 answered on 21 Jun 2013
3 answers
63 views
Hi,

In one of the Telerik grid in SharePoint 2010 we are not getting themes or background in filter of the grid.However, In rest of the all grids it is working fine. Can you please suggest us what is the possibilities of the problem.

The functionality of the filter is working fine the problem is related to UI.
Tsvetoslav
Telerik team
 answered on 21 Jun 2013
5 answers
422 views
Hi, I'm hoping someone out there can help me...

I've got a radgrid and in the  <CommandItemTemplate> I have a button with CommandName="ExportToExcel"

... In the code behind, I capture the radgrid1.ItemCommand

Select Case e.CommandName
            Case "ExportToExcel"
		RadGrid1.ExportSettings.ExportOnlyData = True
RadGrid1.ExportSettings.IgnorePaging = True
RadGrid1.ExportSettings.OpenInNewWindow = True
		RadGrid1.MasterTableView.ExportToExcel()

but whenever I hit the button, I get an error within what I assume is part of the Telerik code...

Microsoft JScript runtime error: Unable to get value of the property 'Cols': object is null or undefined

    
Adriano
Top achievements
Rank 1
 answered on 21 Jun 2013
0 answers
466 views
We have discovered a problem in the RadGrid rendering that appears in various scenarios in Q2 2013 release. The issue appears on post back and causes broken RadGrid layout. The problematic behavior is caused by the <FilterMenu></FilterMenu> tag which is automatically added when RadGrid is created from the designer. In case the official Q2 2013 version is used in your application you need to remove the mentioned tag from the RadGrid markup in order to fix the problem.
Official fix for the presented issue is already added to the latest internal build of the controls.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 21 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?