Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
193 views
I have a simple grid running in Batch Edit mode. Need to disable column "Division" and change its color by clicking an outside button. My code gets executed but nothing changes. This column's color gets set by applying custom CSS using 
background-color: white !important;. My code assigns a different CSS with another color.

ASPX:
<telerik:GridBoundColumn DataField="Division" HeaderText="Division" UniqueName="Division"></telerik:GridBoundColumn>

VB cb:
    Protected Sub btnApprove_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnApprove.Click
        Dim Item As GridDataItem
        For Each Item In RadGrid1.MasterTableView.Items
            If (Item.IsDataBound) Then
                Dim col As GridBoundColumn = CType(RadGrid1.MasterTableView.GetColumn("Division"), GridBoundColumn)
                col.ItemStyle.CssClass = "customGriglinesGray"
                col.ReadOnly = True
            End If
        Next
    End Sub
Attila Antal
Telerik team
 answered on 13 Dec 2022
1 answer
103 views

Hello friends

Scenario:

On hovering the textbox an alert is triggered from clientscript.

The controls are placed inside a RadAjaxpanel.

Question:

Why does this setup only works on inital load?

If I submit the page, the clientscript does not work anymore.

Check my demo below.

 

kind regards

Mark


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>

    <form id="form1" runat="server">

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI"
                    Name="Telerik.Web.UI.Common.Core.js"></asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI"
                    Name="Telerik.Web.UI.Common.jQuery.js"></asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI"
                    Name="Telerik.Web.UI.Common.jQueryInclude.js"></asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>

        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Metro" >
        </telerik:RadAjaxLoadingPanel>
        


        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

            <script type="text/javascript">

                $(document).ready(function () {

                    $("#TextBox1").hover(function () {
                        alert('test');
                    });
                });

            </script>

        </telerik:RadScriptBlock>


        <telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server" Height="100%" Width="100%">

            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Text="Submit" />

        </telerik:RadAjaxPanel>

    </form>
</body>
</html>

using System;

public partial class mytest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}


 

Rumen
Telerik team
 answered on 13 Dec 2022
1 answer
186 views

Hi,

How to change the size of the radio button icon. 

 

When I change the size of the font for the radio button the text size increase but not the icon.

 

Note: its not the radio button list, its the radio button control

 

Many thanks,

Omar

Valentin Dragnev
Telerik team
 answered on 13 Dec 2022
1 answer
149 views
Hi,

This one has been hard to find an answer for despite checking many posts. I have a radgrid with an embedded radcombobox. The fields in the grid look like this with a GridTemplateColumn that contains the radcombobox called cboGuageName:
<telerik:GridBoundColumn UniqueName="MeasureName" DataField="MeasureName" HeaderText="MeasureName" ReadOnly="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Min" DataField="Min" HeaderText="Min"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Max" DataField="Max" HeaderText="Max"></telerik:GridBoundColumn>
<%--<telerik:GridBoundColumn UniqueName="GuageName" DataField="GuageName" HeaderText="GuageName"></telerik:GridBoundColumn>--%>
<telerik:GridTemplateColumn UniqueName="GuageName" HeaderText="Guage Name" DataField="GuageName" HeaderStyle-Width="200px">
    <itemtemplate>
        <%# Eval("GuageName")%>
    </itemtemplate>
    <edititemtemplate>
        <telerik:RadComboBox ID="cboGuageName" OnLoad="cboGuageName_Load" AutoPostBack="true" DataTextField="GuageName" DataValueField="GuageName" SelectedValue='<%# Bind("GuageName") %>' runat="server" Width="140px"></telerik:RadComboBox>
    </edititemtemplate>
</telerik:GridTemplateColumn>


 I am able to set the radcombobox in the grid with the correct value and display the grid when not in edit mode using the following code in needdata source code event as follow:
if (lstDocType.SelectedIndex >= 0)
{
    using (var db = new SpecCheck.Models.TorqDevEntitiesNewTest())
    {
        string dbase = db.Database.Connection.ConnectionString;
        RadWindowManager1.RadAlert("Database is " + dbase + "-Need", 400, 180, "ALERT", null, null);

        Guid docId = new Guid(lstDocType.SelectedItem.Value.ToString());
        var measure = db.DocumentMeasureTypes.Where(d => d.DocumentTypeId == docId).Select(d => new { d.DocumentMeasureTypeId, d.MeasureName, d.Min, d.Max, d.GuageName, d.Sort }).OrderBy(d => d.Sort).ToList();
        RadGridMeasureType.DataSource = measure;
        //RadDropDownList ddl1 = edit1["Description"].FindControl("cboDocType") as RadDropDownList;
    }
}


When  click the edit link the code below executes which is in the itemdata event for the radgrid; it finds the right key, retrieves the correct grid data for the row, and sets the radcombobox selected with the value for that field. .However the code that grabs the combobox returns null so there is nothing to assign the gridrow's value to. Worst of all the program will not go  up into editable mode after clicking the edit link; it either does nothing or the cursor spins endlessly.
Here is the code in itemdata event for the grid:
described above: 
using (var dbMeasureType = new SpecCheck.Models.TorqDevEntitiesNewTest())
    //if (e.Item is GridDataItem)
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
        GridEditableItem editItem = (GridEditableItem)e.Item;
        //Access the RadDropDownList
        RadComboBox guageType = (RadComboBox)editItem.FindControl("GuageName");
        var key = (Guid)editItem.GetDataKeyValue("DocumentMeasureTypeId");
        //using (var db = new TorqDevEntitiesNewTest())
        //{
        var measures = dbMeasureType.DocumentMeasureTypes.Find(key);
        guageType.SelectedValue = (String)(measures.GuageName);
    }



 I've tried many things but nothing seems to work. Any advice would be appreciated.

Neil
Attila Antal
Telerik team
 answered on 12 Dec 2022
0 answers
93 views
RadGrid running in batch edit mode. When selecting a value in dropdown "ddlPayrollId", I need to set  "StaffName" to a certain value, let's say 'Joe' . Can you please provide a VB example on how to do it!

ASPX:
 
<telerik:GridTemplateColumn UniqueName="PayrollId" DataField="PayrollId">
                        <ItemTemplate>
                            <%# Eval("PayrollId")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadDropDownList runat="server" ID="ddlPayrollId" DataValueField="PayrollId" DataTextField="PayrollId" DataSourceID="SqlDataSource1">
                            </telerik:RadDropDownList>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="StaffName" UniqueName="StaffName" ReadOnly="True"></telerik:GridBoundColumn>
Josif
Top achievements
Rank 1
 asked on 08 Dec 2022
0 answers
116 views
Hello!  I am troubleshooting why my RadScheduler is only showing about a months worth of events.  It is currently defaults to opening to the current month, but when navigating to the previous month it only populates the last week of that last month(November) and doesn't populate any events into next month(January).  I know there are events that should be populating outside of that, but not sure why it would be limited to only show those.  
James
Top achievements
Rank 1
 asked on 06 Dec 2022
1 answer
182 views

Cannot create an object of type 'Telerik.Web.UI.GridExcelExportFormat' from its string representation 'Xlsx' for the 'Format' property.
 <groupingsettings collapsealltooltip="Collapse all groups" />
Line 393:                <exportsettings exportonlydata="True">
Line 394:                    <Excel Format="Xlsx" />
Line 395:                </exportsettings>
Line 396:                <HeaderStyle BackColor="#614051" ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" />

Tanvir
Top achievements
Rank 1
Iron
 answered on 01 Dec 2022
0 answers
103 views

I have telerik:RadGrid like this, when I select page 8 then select row and update/delete the Grid reload to page 1. So I want after update/delete the Grid still select page 8 and data update will to appear on Grid.

Before update/delete

After update/delete

Thanks,

Tien
Top achievements
Rank 1
 asked on 30 Nov 2022
1 answer
123 views

Hi Telerik team,

One of our customer is asking adding a date filter in the file explorer.  Ideally, there will be another column list the file date and when user click the date title, it can sort files by date.  Is there any way we can implement this feature?

 

 

Thanks,

Lan

Rumen
Telerik team
 answered on 29 Nov 2022
0 answers
94 views

Hi,

I have this main <iframe> with many nested frame pages. Within nested <frame name="clientarea"> page I'm calling, I'm launching a radopen URL popup.  The issue is I cannot move the popup around outside the nested frame page. 

radopen example:

radopen(sUrl, "RadOrder", 900, 700, 100, 150);

HTML example:

   <iframe id="SearchIFrame" name="SearchIFrame" scrolling="NO" src="Main.asp">
             <frameset cols="100%" frameborder="0" border="0" rows="25,*%" name="mainFrame">
                 <frame align="TOP" frameborder="0" marginheight="0" marginwidth="0" name="namebar" scrolling="NO" src="namebar.asp" noresize="noresize"></frame>

                 <frameset cols="100%" frameborder="0" border="0" rows="25,*%" name="clientframeset">
                     <frame frameborder="0" marginheight="0" marginwidth="0" name="toolbar0" scrolling="NO" src="blank.asp"></frame>
                     <frameset cols="100%" frameborder="0" border="0" rows="25,*%" name="subframeset">
                         <frame frameborder="0" marginheight="0" marginwidth="0" name="tabbar" scrolling="NO" src="blank.asp" noresize="noresize"></frame>
                         <frame frameborder="0" marginheight="0" marginwidth="0" name="clientarea" src="blank.asp" noresize="noresize" scrolling="auto"></frame>
                     </frameset>
                     <frameset cols="100%" frameborder="0" border="0" rows="50,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10" name="subframeset2">
                         <frame frameborder="0" marginheight="0" marginwidth="0" name="bgprocess" scrolling="no" src="blank.asp"></frame>
                     </frameset>
                 </frameset>
             </frameset>
         </iframe>

 

Telerik nested frame page which calls radopen:

    <telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" 
        EnableShadow="true" Behaviors="Maximize,Move,Close" ShowOnTopWhenMaximized="true" RegisterWithScriptManager="True" KeepInScreenBounds="false">
        <Windows>
            <telerik:RadWindow RenderMode="Lightweight" ID="RadPageExample" runat="server" ShowContentDuringLoad="false" Width="800px"
                Height="600px" Left="100px" Top="55px" Title="RX New2" Behaviors="Move">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>     
Disposable Hero
Top achievements
Rank 1
Iron
 asked on 28 Nov 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?