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
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:
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?
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
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);
}
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>
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 == " ")
{
//code
}
else
{
//code
}
}
}
Thanks
Jason
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
Hello!
As you can see in the image that I attached, my radgrid has 2 buttons at the bottom (Valider & Annuler) which stands for Validate and Cancel in english. These buttons are added as the following:
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column" ButtonType="PushButton" InsertText="Valider" CancelText="Annuler" EditText="Modif" UpdateText="Valider">
</EditColumn>
</EditFormSettings>
I would like to change their design and apply a skin. I have applied the Material skin to the whole RadGrid however these buttons seem to not be affected by that. Would that be possible to style them, just like we style any radbutton using Skins? Would changing the ButtonType from pushbutton to another type help with this matter?
Here's the full code of the radgrid shown in the attached image:
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" Culture="French (France)"
DataSourceID="SDS_Notes" GridLines="None" Width="775px" Skin="Material"
AllowAutomaticInserts="True" AutoGenerateEditColumn="True">
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataSourceID="SDS_Notes"
NoMasterRecordsText="Aucune note" DataKeyNames="NumNote"
AllowAutomaticUpdates="True"
Font-Size="13px">
<CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Ajouter une note"
RefreshText="Rafraichir"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridDropDownColumn DataField="AgenceAction" FilterControlAltText="Filter AgenceAction column"
HeaderText="Agence" SortExpression="AgenceAction" UniqueName="AgenceAction" HeaderStyle-Width="61px" DataSourceID="SDSAgence" ListTextField="AgenceAction" ListValueField="AgenceAction" ItemStyle-Width="130px">
<HeaderStyle Font-Size="15px" Width="80px"></HeaderStyle>
</telerik:GridDropDownColumn>
<telerik:GridDateTimeColumn DataField="DateAction" DataType="System.DateTime" FilterControlAltText="Filter DateAction column"
HeaderText="Date Action" SortExpression="DateAction" UniqueName="DateAction"
DataFormatString="{0:dd/MM/yyyy}" HeaderStyle-Width="110px">
<HeaderStyle Font-Size="15px" Width="130px"></HeaderStyle>
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="HeureAction" DataType="System.DateTime" FilterControlAltText="Filter HeureAction column"
HeaderText="Heure" SortExpression="HeureAction" UniqueName="HeureAction" PickerType="TimePicker"
DataFormatString="{0:HH:mm}" HeaderStyle-Width="70px">
<HeaderStyle Font-Size="15px" Width="60px"></HeaderStyle>
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="Observations" FilterControlAltText="Filter Observations column"
HeaderText="Observations" SortExpression="Observations" UniqueName="Observations"
HeaderStyle-Width="500px" MaxLength="105">
<HeaderStyle Font-Size="15px" Width="500px"></HeaderStyle>
<ItemStyle CssClass="form-control" />
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column" ButtonType="PushButton" InsertText="Valider" CancelText="Annuler" EditText="Modif" UpdateText="Valider">
</EditColumn>
</EditFormSettings>
<HeaderStyle BackColor="#757575" Font-Bold="false" ForeColor="White"/>
</MasterTableView>
<FilterMenu EnableImageSprites="False">
</FilterMenu>
</telerik:RadGrid>
I have tried setting the SkinID from codebehind in the itemcreated property however I am receiving the following error:
"The 'SkinId' property can only be set in or before the Page_PreInit event for static controls. For dynamic controls, set the property before adding it to the Controls collection."
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
If Not e.Item.OwnerTableView.IsItemInserted Then
'[......]
Else
'[......]
End If
Dim cancelButton As Button = CType(e.Item.FindControl("CancelButton"), Button)
cancelButton.SkinID = "Material"
End If
End Sub