Dear Technical Team,
I have installed Telerik UI for ASP.NET Ajax. I need to change my skin from Hay to Vista or Other.
I checked in following path, only one file Vista.gif is available. and I am not getting file select-hover.png. so combobox not looking good.
C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX R1 2022\Skins\Vista\ComboBox
Skin are not working properly then I checked there are not available png image of controls folde.
Kindly Provide me to download all skins controls png or other format images to show proper control on web page.
Thanks
Alam
Good afternoon,
I am using ASP.NET AJAX version 2023.3.1010.45,
I have a page with a ComboBox and Grid. By choosing an Item in the ComboBox and clicking a Button, it will locate the Item in the Grid. If an Item is inserted into or deleted from the Grid, the ComboBox needs to update. Both controls have the same ObjectDataSource as their data source. This is why they share an Ajax Panel.
I am using a RadAjaxManager and RadAjaxLoadingPanel as follows (setting UpdatePanelsRenderMode to Inline):
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadComboItems">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridItems"/>
<telerik:AjaxUpdatedControl ControlID="RadComboItems" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGridItems">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridItems" />
<telerik:AjaxUpdatedControl ControlID="RadComboItems" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" BackgroundTransparency="30" RenderMode="Lightweight">
</telerik:RadAjaxLoadingPanel>
The ComboBox and Grid appear in the same RadAjaxPanel (also with RenderMode Inline):
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" RenderMode="Inline">
<label for="RadComboItems">Input/Select Item:</label>
<telerik:RadComboBox ID="RadComboItems" runat="server" Height="200px" Width="200px" DataSourceID="odsItems" EnableVirtualScrolling="true" DataTextField="ItemId" DataValueField="RowNum" EmptyMessage="--Select a value--" RenderMode="Lightweight" EnableAjaxSkinRendering="true">
</telerik:RadComboBox>
<telerik:RadButton RenderMode="Lightweight" runat="server" Text="Select" ID="btnFindItems" OnClick="btnFindItems_Click" EnableAjaxSkinRendering="true" />
<telerik:RadGrid ID="RadGridItems" RenderMode="Lightweight" runat="server" AllowPaging="True" DataSourceID="odsItems" AllowSorting="True" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True" OnUpdateCommand="RadGridItems_UpdateCommand" OnItemDataBound="RadGridItems_ItemDataBound" OnItemCommand="RadGridItems_ItemCommand" OnItemDeleted="RadGridItems_ItemDeleted" OnItemInserted="RadGridItems_ItemInserted" OnItemUpdated="RadGridItems_ItemUpdated" OnPreRender="RadGridItems_PreRender" CellSpacing="-1" GridLines="Horizontal" OnDetailTableDataBind="RadGridItems_DetailTableDataBind" AllowFilteringByColumn="true" OnInfrastructureExporting="RadGridItems_InfrastructureExporting">
....
....
</telerik:RadGrid>
</telerik:RadAjaxPanel>
When the page first renders, the ComboBox and Button render as expected:
<div class="RadAjaxPanel" id="ctl00_maincontent_ctl00_maincontent_RadComboItemsPanel" style="display: inline;">
Once the Button is pressed though, the rendering changes to Block:
<div class="RadAjaxPanel" id="ctl00_maincontent_ctl00_maincontent_RadComboItemsPanel">
Is there anyway to prevent this from happening, without having to specify this on the page:
<style type="text/css">
.RadAjaxPanel
{
display: inline !important;
}
</style>
Kind regards,
Richard
I was curious if there was a way to add a radcombobox with load on demand abilities within an exisiting radgrid. I really just need to have it that when you start typing it will then populate any items that start with the letter/numbers you are typing dynamically. For example, if I typed Batt it would autofill Battery or if I had done Serial Number it would populate all that apply. I have seen it outside of a grid but not within. In the picture below would like to have the asset_type autofill options from database that are in the asset_type column. Any examples would be great.
Imports System.Data Imports System.Data.SqlClient Imports System.Drawing Imports System.Web.UI Imports System.Configuration Imports System.Web.UI.WebControls Imports Telerik.Web.UI Partial Class RadGridEditCustomValidatorVB Inherits Page ' Page Load event Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then RadGrid.Rebind() End If End Sub ' Bind the grid to the data source Protected Sub RadGrid_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) RadGrid.DataSource = GetGridSource() End Sub ' Get data from the database Private Function GetGridSource() As DataTable Dim dataTable As New DataTable() ' Get the connection string from the web.config file Dim connectionString As String = ConfigurationManager.ConnectionStrings("Data_WarehouseConnectionString_PRODUCTION").ConnectionString Using connection As New SqlConnection(connectionString) Dim query As String = "SELECT [ID], [Asset_type], [PortalID], [asset_SN], [asset_model], [Maint_Date], [Fill_qty], [asset_location], [Active_indicator], [Asset_Notes] FROM [data_warehouse].[dbo].[ATracker]" Using command As New SqlCommand(query, connection) Using adapter As New SqlDataAdapter(command) adapter.Fill(dataTable) End Using End Using End Using Return dataTable End Function Protected Sub RadGrid_ItemCreated(sender As Object, e As GridItemEventArgs) If e.Item.IsInEditMode Then Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem) ' Add validator for Asset_type (Non-nullable) Dim assetTypeEditor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("Asset_type"), GridTextBoxColumnEditor) AddRequiredFieldValidator(assetTypeEditor.TextBoxControl, "Asset Type") ' Add validator for PortalID (Non-nullable) Dim portalIDEditor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("PortalID"), GridTextBoxColumnEditor) AddRequiredFieldValidator(portalIDEditor.TextBoxControl, "PortalID") ' Add validator for asset_sn (Non-nullable) Dim assetSNEditor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("asset_SN"), GridTextBoxColumnEditor) AddRequiredFieldValidator(assetSNEditor.TextBoxControl, "Asset Serial Number") ' Add validator for asset_model (Non-Nullable) Dim assetModelEditor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("asset_model"), GridTextBoxColumnEditor) AddRequiredFieldValidator(assetModelEditor.TextBoxControl, "Asset Model") ' Add validator for asset_location (Nullable) Dim assetLocEditor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("asset_location"), GridTextBoxColumnEditor) AddRequiredFieldValidator(assetLocEditor.TextBoxControl, "Location") ' Add validator for Fill_qty (Nullable but must be numeric if provided) Dim fillQtyEditor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("Fill_qty"), GridTextBoxColumnEditor) AddNumericValidator(fillQtyEditor.TextBoxControl, "Fill Quantity") Dim buttonName As String = If(TypeOf item Is IGridInsertItem, "PerformInsertButton", "UpdateButton") TryCast(item.FindControl(buttonName), Button).ValidationGroup = "gridFormValidation" End If End Sub Private Sub AddRequiredFieldValidator(textBox As TextBox, fieldName As String) Dim validator As New CustomValidator() validator.ID = "CustomValidator_" & fieldName.Replace(" ", "_") validator.ControlToValidate = textBox.ID validator.ValidateEmptyText = True validator.ErrorMessage = String.Format("* {0} is required", fieldName) validator.ForeColor = Color.OrangeRed validator.ClientValidationFunction = "requiredFieldValidation" validator.ValidationGroup = "gridFormValidation" AddHandler validator.ServerValidate, AddressOf RequiredField_ServerValidate textBox.Parent.Controls.Add(validator) End Sub Private Sub AddNumericValidator(textBox As TextBox, fieldName As String) Dim validator As New CustomValidator() validator.ID = "CustomValidator_" & fieldName.Replace(" ", "_") validator.ControlToValidate = textBox.ID validator.ValidateEmptyText = False validator.ErrorMessage = String.Format("* {0} must be numeric", fieldName) validator.ForeColor = Color.OrangeRed validator.ClientValidationFunction = "numericFieldValidation" validator.ValidationGroup = "gridFormValidation" AddHandler validator.ServerValidate, AddressOf NumericField_ServerValidate textBox.Parent.Controls.Add(validator) End Sub Protected Sub RequiredField_ServerValidate(source As Object, args As ServerValidateEventArgs) args.IsValid = Not String.IsNullOrWhiteSpace(args.Value) End Sub Protected Sub NumericField_ServerValidate(source As Object, args As ServerValidateEventArgs) Dim result As Decimal args.IsValid = Decimal.TryParse(args.Value.Trim(), result) End Sub Protected Sub RadGrid_ItemCommand(sender As Object, e As GridCommandEventArgs) If e.CommandName = RadGrid.UpdateCommandName Or e.CommandName = RadGrid.PerformInsertCommandName Then If Page.IsValid Then Dim editableItem As GridEditableItem = TryCast(e.Item, GridEditableItem) 'Runs Validation Code from RequiredField_ServerValidate and NumericField_ServerValidate Dim txtAssetType As TextBox = CType(editableItem("Asset_type").Controls(0), TextBox) Dim txtPortalID As TextBox = CType(editableItem("PortalID").Controls(0), TextBox) Dim txtSerialNum As TextBox = CType(editableItem("asset_SN").Controls(0), TextBox) Dim txtFillQty As TextBox = CType(editableItem("Fill_qty").Controls(0), TextBox) Dim rdpMaintDate As RadDatePicker = CType(editableItem("Maint_Date").Controls(0), RadDatePicker) Dim txtLocation As TextBox = CType(editableItem("asset_location").Controls(0), TextBox) Dim txtModel As TextBox = CType(editableItem("asset_model").Controls(0), TextBox) Dim chkActive As CheckBox = CType(editableItem("Active_indicator").Controls(0), CheckBox) Dim txtNotes As TextBox = CType(editableItem("Asset_Notes").Controls(0), TextBox) Dim objConnection As SqlConnection Dim strSQL As String objConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("Data_WarehouseConnectionString_PRODUCTION").ConnectionString) 'Testing DB connection 'objConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("masterConnectionString").ConnectionString) 'Determine if we are updating or inserting If e.CommandName = RadGrid.UpdateCommandName Then strSQL = "UPDATE [data_warehouse].[dbo].[ATracker] SET [Asset_type] = @asset_type, [PortalID] = @PortalID, [asset_SN] = @AssetSN, [Fill_qty] = @FillQty, [Maint_Date] = @MaintDate, [asset_location] = @Location, [asset_model] = @Model, [Active_indicator] = @Active, [Asset_Notes] = @Notes WHERE [ID] = @ID" Else strSQL = "INSERT INTO [data_warehouse].[dbo].[ATracker] ([Asset_type], [PortalID], [asset_SN], [Fill_qty], [Maint_Date], [asset_location], [asset_model], [Active_indicator], [Asset_Notes]) VALUES (@asset_type, @PortalID, @AssetSN, @FillQty, @MaintDate, @Location, @Model, @Active, @Notes)" End If 'Add parameters to the SQL command Dim cmd As New SqlCommand(strSQL, objConnection) cmd.Parameters.Add("@asset_type", SqlDbType.VarChar, 20).Value = txtAssetType.Text cmd.Parameters.Add("@ID", SqlDbType.Int).Value = If(e.CommandName = RadGrid.UpdateCommandName, editableItem.GetDataKeyValue("ID"), DBNull.Value) cmd.Parameters.Add("@PortalID", SqlDbType.VarChar, 10).Value = txtPortalID.Text cmd.Parameters.Add("@AssetSN", SqlDbType.VarChar, 20).Value = txtSerialNum.Text cmd.Parameters.Add("@FillQty", SqlDbType.Int).Value = If(String.IsNullOrEmpty(txtFillQty.Text), DBNull.Value, Convert.ToInt32(txtFillQty.Text)) cmd.Parameters.Add("@MaintDate", SqlDbType.Date).Value = If(rdpMaintDate.SelectedDate Is Nothing, DBNull.Value, rdpMaintDate.SelectedDate) cmd.Parameters.Add("@Location", SqlDbType.VarChar, 20).Value = txtLocation.Text cmd.Parameters.Add("@Model", SqlDbType.VarChar, 20).Value = txtModel.Text cmd.Parameters.Add("@Active", SqlDbType.Bit).Value = chkActive.Checked cmd.Parameters.Add("@Notes", SqlDbType.VarChar, -1).Value = txtNotes.Text Try objConnection.Open() cmd.ExecuteNonQuery() Catch ex As Exception System.Console.WriteLine(ex.ToString()) Finally objConnection.Close() End Try RadGrid.Rebind() Else e.Canceled = True End If End If End Sub 'CANT GET THIS TO TRIGGER Protected Sub RadGrid_ItemDeleted(sender As Object, e As GridCommandEventArgs) If e.CommandName = RadGrid.DeleteCommandName Then Dim item As GridDataItem = TryCast(e.Item, GridDataItem) If item IsNot Nothing Then ' Find the hidden field in the grid data item where ID is bound Dim atID As Integer = Convert.ToInt32(item.OwnerTableView.DataKeyValues(item.ItemIndex)("ID")) Dim objConnection As SqlConnection Dim strSQL As String objConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("Data_WarehouseConnectionString_PRODUCTION").ConnectionString) ' SQL command to delete the record where ID matches strSQL = "DELETE FROM [data_warehouse].[dbo].[ATracker] WHERE [ID] = @ID" Dim cmd As New SqlCommand(strSQL, objConnection) cmd.Parameters.Add("@ID", SqlDbType.Int).Value = atID Try objConnection.Open() cmd.ExecuteNonQuery() Catch ex As Exception System.Console.WriteLine(ex.ToString()) Finally objConnection.Close() End Try End If RadGrid.Rebind() End If End Sub 'Show a dropdown list of the asset types in the database Protected Sub RadGrid_ItemDataBound(sender As Object, e As GridItemEventArgs) If e.Item.IsInEditMode Then Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem) If Not (TypeOf e.Item Is IGridInsertItem) Then Dim combo As RadComboBox = DirectCast(item.FindControl("Asset_type"), RadComboBox) Dim preselectedAsset As New RadComboBoxItem() preselectedAsset.Text = item("Asset_type").Text preselectedAsset.Value = item("Asset_type").Text combo.Items.Insert(0, preselectedAsset) End If End If End Sub End Class
<form id="form1" runat="server">
<telerik:RadStyleSheetManager ID="RadStyleSheetManager2" runat="server"></telerik:RadStyleSheetManager>
<telerik:RadScriptManager ID="RadScriptManager2" runat="server"></telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
<telerik:RadGrid ID="RadGrid" runat="server" AllowPaging="True" Width="800px"
OnNeedDataSource="RadGrid_NeedDataSource" OnItemCommand="RadGrid_ItemCommand" onitemdatabound="RadGrid_ItemDataBound"
OnItemCreated="RadGrid_ItemCreated" OnDeleteCommand="RadGrid_ItemDeleted" Skin="MetroTouch">
<GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="ID">
<RowIndicatorColumn ShowNoSortIcon="False"></RowIndicatorColumn>
<ExpandCollapseColumn ShowNoSortIcon="False"></ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID" Visible="False"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Asset_type" FilterControlAltText="Filter Asset_type column" HeaderText="Asset_type" SortExpression="Asset_type" UniqueName="Asset_type" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PortalID" FilterControlAltText="Filter PortalID column" HeaderText="PortalID" SortExpression="PortalID" UniqueName="PortalID"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="asset_SN" FilterControlAltText="Filter asset_SN column" HeaderText="Serial Number" SortExpression="asset_SN" UniqueName="asset_SN"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="asset_model" FilterControlAltText="Filter asset_model column" HeaderText="Model" SortExpression="asset_model" UniqueName="asset_model"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="asset_location" FilterControlAltText="Filter asset_location column" HeaderText="Location" SortExpression="asset_location" UniqueName="asset_location"></telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="Maint_Date" FilterControlAltText="Filter Maint_Date column" HeaderText="Date of Service" SortExpression="Maint_Date" UniqueName="Maint_Date"></telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="Fill_qty" FilterControlAltText="Filter Fill_qty column" HeaderText="Fill Qty (Gallons)" SortExpression="Fill_qty" UniqueName="Fill_qty"></telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="Active_indicator" DataType="System.Boolean" FilterControlAltText="Filter Active_indicator column" HeaderText="Active?" SortExpression="Active_indicator" UniqueName="Active_indicator"></telerik:GridCheckBoxColumn>
<telerik:GridBoundColumn DataField="Asset_Notes" FilterControlAltText="Filter Notes column" HeaderText="Notes" SortExpression="Asset_Notes" UniqueName="Asset_Notes"></telerik:GridBoundColumn>
<telerik:GridEditCommandColumn EditText="Edit" />
<telerik:GridButtonColumn ConfirmText="Are you sure you want to delete this record?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" CommandName="Delete" Text="Delete" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
</form>
Hello,
How do I set the height of the actual input box? I have tried the following without success.
div.CustomCssClass .rcbInputCell INPUT.rcbInput
{
height: 25px;
width: 250px;
}
div.CustomCssClass {
height: 35px;
}
Thanks
I would like to know how to customize the "X items checked" text when I set CheckedItemsTexts="FitInInput" and have multiple items checked.
Thanks
The following code disables the combobox, but I cannot enable it by unchecking the checkbox again...howcome?
<telerik:RadComboBox Width="100%" ID="rcb_zorgverzekeraar" runat="server"></telerik:RadComboBox>
<asp:CheckBox ID="chk_verzekeraar" CausesValidation="false" AutoPostBack="true" OnCheckedChanged="chk_verzekeraar_CheckedChanged" Text="Ik weet het niet" runat="server" />
with:
Protected Sub chk_verzekeraar_CheckedChanged(sender As Object, e As EventArgs)
rcb_zorgverzekeraar.Enabled = Not chk_verzekeraar.Checked
End Sub
Marc
<
telerik:RadComboBox
ID
=
"FrmReferredBy"
runat
=
"server"
AllowCustomText
=
"false"
CausesValidation
=
"false"
/>
<
asp:RequiredFieldValidator
ID
=
"FrmReferredByValidator"
runat
=
"server"
Text
=
"*"
ControlToValidate
=
"FrmReferredBy"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
/>
We have a serious issue when using this feature, following code generates attached error. It occurs when scrolling or clicking the "Show more results"
<asp:SqlDataSource ID="sds_geneesmiddel" ConnectionString="<%$ connectionstrings:lef %>" SelectCommand="select Left(Naam, 70) as Naam, id from geneesmiddel order by Naam" runat="server"></asp:SqlDataSource>
<telerik:RadComboBox DataSourceID="sds_geneesmiddel" DataTextField="Naam" DataValueField="id"
EnableAutomaticLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
ItemsPerRequest="10" Width="100%" Height="150px" Filter="Contains" EmptyMessage="Typ de naam" DropDownAutoWidth="Enabled" ID="rcb_geneesmiddel" runat="server">
</telerik:RadComboBox>
This is something I have to solve today, please react urgently.
Marc
I'm using version 2022.2.622.45.
If the checkboxes are displayed in the RadComboBox, the NVAD cannot read out the actual items in the combo box, and only give out the sound 'blank'.
Maybe there's special key for the navigation?