Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
1.2K+ views
I have an issue to assign/change different columns to MasterTableView & GridTableView based on user conditions. The grid structure and its columns all are specified in aspx file. 
And I am assigning datakeys to mastertable view in page_load().

RadGrid.MasterTableView.DataKeyNames = new string[] { "column1, column2" };​ 
Its giving error, the column neither a DataColumn nor a DataRelation for table xxx. Please guide how to assign datakeys programatically to mastertable view and grid view. 
Thank you,
Madhavi
Herbert
Top achievements
Rank 1
Iron
 answered on 02 Sep 2022
1 answer
169 views

Hi,

 

I have a RadGrid consisting of a number of GridTemplateColumn's containing InsertTemplateColumns. When an item is inserted I perform validation on the C# side and either perform the insert or display an error message with RadWindowManager and RadAlert. The problem is when validation fails and an error message is displayed the grid is reloaded and all of the insert input fields are emptied, forcing the user to re-enter all the information. How can I validate the insert and display an error message without reloading the grid?

Thanks

Attila Antal
Telerik team
 answered on 02 Sep 2022
1 answer
1.6K+ views

This ASP.NET C# .NET 4.5.1 application was created with Telerik in 2018? and has not been used for a few years because of the pandemic. The programmer who knew Telerik retired and I have no experience with Telerik.  Now, it will not compile. This software is a culinary reservation system, so nobody is able to make reservations. It gets the following error:

Severity Code Description Project File Line Suppression State
Error 'Could not load file or assembly 'Telerik.Web.UI, Version=2018.3.910.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)' GTCC_Culinary C:\Users\ssjohnson\OneDrive - Guilford Technical Community College\Documents\Projects\Culinary\GTCC_Culinary-main\GTCC_Culinary\LC

I believe that this has something to do with a gridview because an error I saw on the server pointed to line 335.

Here are the Telerik references in the project:

 

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 01 Sep 2022
1 answer
200 views
Hi,

I'm trying to implement a drag and drop for use in sorting records in a grid, similar to the Demo here (But across multiple pages within one grid);

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx 

But I'm struggling to understand how to implement this across multiple grid pages, does anyone have any suggestions on how to do this?

Thanks,
Neil
Rumen
Telerik team
 updated answer on 01 Sep 2022
1 answer
462 views

I have a RadEditor in my web application defined as follows:

<tr>
    <th style="text-align: right; vertical-align: top;">
        <asp:Label ID="lblQuestion" runat="server" Text="Question"></asp:Label>
    </th>
    <td style="text-align: left; vertical-align: top;">
        <telerik:RadEditor ID="redQuestion" runat="server" EditModes="Design" Skin="Bootstrap" ToolsFile="~/EditorTools.xml" Width="100%" Height="150px" BorderStyle="Solid" BorderColor="Black" BorderWidth="1">
        </telerik:RadEditor>
    </td>
</tr>

When I run, I cannot grab the corner of the RadEditor and resize the text area, but if I remove the EditModes="DESIGN" property, then the grabber appears in the lower right corner and I can resize the text area.

I found this article on the forum that said to specify the style below, but it did not resolve my issue.

<style type="text/css">
.reToolZone table tr
{
    display: block !important;
}
</style>

Can anyone offer any suggestions or insight into how to have DESIGN mode but still be able to resize the text area?

Rumen
Telerik team
 updated answer on 30 Aug 2022
2 answers
109 views

Hello!

I'm having a problem using the RadTreeView. I've got a menu divided into a global parent > parent > child.

This means that I've got 3 levels in my treeview. The problem is once I click on the expand button, if it was the first time then there are no issues however if it is the second time or more, the items start to duplicate with each time.

You may watch the recorded video in order to understand what I meant exactly.

1. How to solve the issue with the duplicates? This did not use to happen on the TreeView

2. Is there a way to actually reduce the time it's taking to load the items? As you can see in the video on how it is slow with every click to expand.

Thanks for the help!


Private Sub creaTV(ByVal user As String)
        Dim acdo As New SiteWeb.AccesDonnees
        Dim rdro As SqlDataReader

        RTV_menuUtilisateur.Nodes.Clear()

            rdro = acdo.RetournerDataReader("SELECT Identifiant, Libelle FROM lobdjetBDD " _
                            & "WHERE Parent is null AND NomUser='" & Trim(user) & "' ORDER BY Libelle,Parent", "EU_BREST")
         
            Do While rdro.Read
                Dim NewNode As New RadTreeNode(rdro(1), rdro(0))
                NewNode.ExpandMode = TreeNodeExpandMode.ServerSide
                NewNode.Expanded = False
                RTV_menuUtilisateur.Nodes.Add(NewNode)
            Loop
            rdro.Close()
            acdo.Dispose()
End Sub

Protected Sub RTV_menuUtilisateur_NodeExpand(sender As Object, e As RadTreeNodeEventArgs) Handles RTV_menuUtilisateur.NodeExpand
        Dim acdo As New SiteWeb.AccesDonnees
        Dim rdro As SqlDataReader
        Dim user As String
        user = DDL_utilisateur_menu.SelectedValue 'this is a combobox with a list of users, ignore it in your tests

        rdro = acdo.RetournerDataReader("SELECT Identifiant, Libelle, LienPage FROM lobdjetBDD WHERE Parent = " _
                                                    & e.Node.Value & " AND NomUser='" & Trim(user) & "' ORDER BY Libelle,Parent", "EU_BREST")
            
            Do While rdro.Read
                Dim NewNode As New RadTreeNode(rdro(1), rdro(0))

                    NewNode.ExpandMode = TreeNodeExpandMode.ServerSide
                    e.Node.Nodes.Add(NewNode)
            Loop
            rdro.Close()
            acdo.Dispose()
    End Sub

Johnny
Top achievements
Rank 3
Bronze
Iron
Iron
 updated answer on 29 Aug 2022
2 answers
886 views

I have the telerik radcombox and I want to loop through all the items on that radcombox before adding any element to it. I want to achieve this at client side.I tried this code but it did not give result I was expecting for. I have application which will add items to the radcombox but before that I want to check element is already there or not. Not sure why my below code is not working.

 

var combo = $find("<%= MyCombo.ClientID %>");

var items = combo.get_items();

for (var i = 0; i < items._array.length; i++) {

    var myradcomboValues= items.getItem(i);

  alert(myradcomboValues);

}

Johnny
Top achievements
Rank 3
Bronze
Iron
Iron
 updated answer on 29 Aug 2022
1 answer
288 views

Hello everyone!

 

I have 2 listboxes where I am transferring data from one to another. You may check the attached screenshot for a better understanding of my page's layout.

The page contains a combobox and 2 listboxes.The combobox allows you to select a user from the list and then both listboxes will display the permissions this user has (on the left) and the perms he doesn't have (on the right). All of it is automatic of course and connected to a database.

Moving items from one listbox to another is messing with the order. I have tried to do the following:

Protected Sub RadListBoxSource_MM_Transferred(sender As Object, e As RadListBoxTransferredEventArgs) Handles RadListBoxSource_MM.Transferred
        SortRadListBoxes_MM
    End Sub

    Protected Sub RadListBoxDestination_MM_Transferred(sender As Object, e As RadListBoxTransferredEventArgs) Handles RadListBoxDestination_MM.Transferred
        SortRadListBoxes_MM()
    End Sub

    Private Sub SortRadListBoxes_MM()
        RadListBoxSource_MM.Sort = RadListBoxSort.Ascending
        RadListBoxSource_MM.SortItems()

        RadListBoxDestination_MM.Sort = RadListBoxSort.Ascending
        RadListBoxDestination_MM.SortItems()
    End Sub

This is not working, and the items are being added to the bottom of the list instead of being sorted to their correct position.

Thanks!

<telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBoxSource_MM" 
                        Height="200px" Width="100%" Skin="Material"
                        AllowTransfer="true" TransferToID="RadListBoxDestination_MM"
                        ButtonSettings-AreaWidth="35px">
</telerik:RadListBox>

<telerik:RadListBox RenderMode="Lightweight" runat="server" 
                    ID="RadListBoxDestination_MM" Height="200px" Width="100%"
                    ButtonSettings-AreaWidth="35px" Skin="Material">
</telerik:RadListBox>

 

Johnny
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 29 Aug 2022
1 answer
91 views

My RadGrid has multiple GridTableViews, I have tested my ItemDataBound code on a RadGrid with no GridTableViews and the image gets added as expected. 

The problem is the code in the ItemDataBound needs adjusting to be able to access the GridTableView with the name "ReviewLabel"

as the error is "Cannot find a cell bound to column name 'photoid'

Please can someone show me how to rewrite this please

This is the ItemDataBound Code


  protected void RadGrid1_ItemDataBound1(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            string s = item["photoid"].Text;
            if (s == null || s == string.Empty || s == "" || s.Length < 2 || s == "&nbsp;")
            {
                //code
            }
            else
            {
               //code
            }
        }
    }

Thanks

Jason

Jason
Top achievements
Rank 1
Iron
 updated question on 28 Aug 2022
1 answer
130 views

I'm using RadHTMLChart for the first time. My application has six or eight data series to display. I'm feeding from a SQL database using linq.

Do I need to set up a separate series for each of these or can the RadHTMLChart control auto create series based on a field I give it?

If I have to manually create a series for each, does anyone have an example on how to do this in code behind? The number of series varies according to the data so I can't do this at design time.

Bernie

 

Doncho
Telerik team
 answered on 25 Aug 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?