Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
681 views
Hi,

I have to validate the numeric text box with min and max value and display the error message. i am using a custom validator to check the condition. i am able to get the min and the max value but when the min value property is set and if i enter any value below the min value its automatically replacing the value with the minvalue. how to avoid this and display the message.

Pls. Guide me.

Jidesh
Attila Antal
Telerik team
 answered on 16 Sep 2019
1 answer
318 views

  Hi All,

I have a code in code behind where i am calling RadConfirm popup screen:

RadWindowManager1.RadConfirm("Are you sure you want to Delete interest record(s) and ready to proceed?", "confirmCallbackFn", 300, 180, null, "Confirmation Message");

<script type="text/javascript">

        function confirmCallbackFn(arg) {
            if (arg) //the user clicked OK
            {

                __doPostBack("<%=OkBtn.UniqueID %>", "");



            }
            else {
                __doPostBack("<%=CancelBtn.UniqueID %>", "");
            }
        }

    </script>

when i scroll all the way down and delete the record on the grid and click on link button, popup screen appear but all the way on top instead of the center when i scroll down. When screen is located up it is fine but when i scroll down to lets say delete last record on the screen popup window remains on the top.

Please help.

Thanks so much.

Peter Milchev
Telerik team
 answered on 16 Sep 2019
3 answers
1.5K+ views

Hi Telerik,

I have a very simple example with a RadNumericTextBox control set to allow a maximum or 20 numeric characters with a MaxValue of 99999999999999999999.  The issue is after entering 16 or more digits and then make the control lose focus causes the value to change.  For example, 88888888888888888888 changes to 88888888888888880000.  99999999999999999999 changes to 10000000000000000000.  Please help me make sense of what's going on.  In my opinion, the value shouldn't change.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RadTextBoxTest.aspx.vb" Inherits="Pages_RadTextBoxTest" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <div>
            <telerik:RadNumericTextBox runat="server" ID="txtDigits" Type="Number" MaxLength="20" MaxValue="99999999999999999999" Width="150px">
                <NumberFormat DecimalDigits="0" AllowRounding="false" GroupSeparator="" NegativePattern="n" />
            </telerik:RadNumericTextBox>
        </div>
    </form>
</body>
</html>

 

Thanks,

Rob

Attila Antal
Telerik team
 answered on 16 Sep 2019
1 answer
1.9K+ views

When exporting RadGrid to Excel (XLSX format), I get the following exception 

We found a problem with this formula. Try clicking Insert Function on the Formulas tab to fix it.\n\nNot trying to type a formula? When the first character is an equal (=) or minus (-) sign, RadSpreadsheet thinks it is a formula. For example, when you type =1+1 the cell shows 2.

I have read this KB article. The error occurs because some of my grid cells has value "++".

I can't prevent users from entering this value. So I want to set the cell format to a string for the excel export so the engine does not attempt to parse a formula. How do I do that?

Attila Antal
Telerik team
 answered on 16 Sep 2019
0 answers
159 views

Hi, i have problem whne click save in edit mode,  my problem when i click edit and fill text box after save click i got no change , no save to database and save don go back to edit mode in

my code is

<telerik:RadGrid ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" ClientSettings-EnablePostBackOnRowClick="true" OnUpdateCommand="RadGrid1_UpdateCommand" runat="server" Skin="Bootstrap" AutoGenerateColumns="False" AllowSorting="True" CellSpacing="-1" GridLines="Both" >

                    <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <MasterTableView EditMode="InPlace" CommandItemDisplay="Bottom" CommandItemSettings-ShowAddNewRecordButton="false" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center" DataKeyNames="ID"  >
                        <Columns>
                            <telerik:GridBoundColumn ReadOnly="true" DataField="da" DataType="System.DateTime" FilterControlAltText="Filter da column" HeaderText="date"  SortExpression="da" UniqueName="da">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn ReadOnly="true" DataField="GivenName" FilterControlAltText="Filter GivenName column" HeaderText="GivenName" SortExpression="GivenName" UniqueName="GivenName">
                            </telerik:GridBoundColumn>

                            <telerik:GridTemplateColumn  DataField="GateComment" HeaderText="GateComment" ItemStyle-Width="240px" UniqueName="GateComment" ShowFilterIcon="false" AutoPostBackOnFilter="true" SortExpression="GateComment">
                                <ItemTemplate>
                                    <%#DataBinder.Eval(Container.DataItem, "GComment")%>
                                </ItemTemplate>
                                <EditItemTemplate>

                                    <asp:TextBox ID="GateComment" runat="server" Text='<%# Bind("GComment") %>'>
                                    </asp:TextBox>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>

 

 

 

and my code behind

 


        protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            String ConnString = ConfigurationManager.ConnectionStrings["TR"].ConnectionString;
            SqlConnection conn = new SqlConnection(ConnString);
            SqlDataAdapter adapter = new SqlDataAdapter();
            adapter.SelectCommand = new SqlCommand();

            adapter.SelectCommand.CommandText = "SELECT GComment, GivenName, da, ScID as ID from tblSC";


            adapter.SelectCommand.Connection = conn;
            var myDataTable = new DataTable();

            conn.Open();
            try
            {
                adapter.Fill(myDataTable);
            }
            finally
            {
                conn.Close();
            }

            RadGrid1.DataSource = myDataTable;
        }

 

 

 protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
        {
            //Get the GridEditableItem of the RadGrid    
            GridEditableItem editedItem = e.Item as GridEditableItem;
            //Get the primary key value using the DataKeyValue.    
            string ID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ID"].ToString();

        
            TextBox GateComment = (TextBox)editedItem.FindControl("GComment");
            string connectionString = ConfigurationManager.ConnectionStrings["TR"].ConnectionString;
            SqlConnection SqlConnection = new SqlConnection(connectionString);



            try
            {

                using (SqlCommand cmb = new SqlCommand())
                {
                    if ((e.Item is GridEditableItem) && e.Item.IsInEditMode)
                    {
                        //edit operation triggered   
                        cmb.CommandText = "update tblSC set GComment = '" + GComment.Text + "'  where ID = " + ID + "";
                    }






                    cmb.Connection = SqlConnection;

                    SqlConnection.Open();
                    cmb.ExecuteNonQuery();
                }
            }



            catch (Exception ex)
            {
                RadGrid1.Controls.Add(new LiteralControl("Unable to update the field. Reason: " + ex.Message));
                e.Canceled = true;
            }
        }

 

 

osman
Top achievements
Rank 1
 asked on 15 Sep 2019
3 answers
257 views
Hi
I am using in-line <GroupByExpression> and it is working well apart from the fact that I can't get the Group Header to show up.

The code I am using is below:

   <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None">  
        <HeaderContextMenu CausesValidation="False">  
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </HeaderContextMenu> 
        <MasterTableView GroupLoadMode="Client">  
                <Columns> 
                <telerik:GridBoundColumn  datafield="ThreadID" datatype="System.Int32" headertext="ThreadID" 
                    sortexpression="ThreadID" uniquename="ThreadID" readonly="True" visible="False">  
                 </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn  datafield="Title" datatype="System.Int32" headertext="Title" 
                    sortexpression="Title" uniquename="Title" readonly="True">  
                 </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn  datafield="Type" datatype="System.Int32" headertext="Type" 
                    sortexpression="Type" uniquename="Type" readonly="True">  
                 </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn  datafield="Publish" datatype="System.Int32" headertext="Publish" 
                    sortexpression="Publish" uniquename="Publish" readonly="True" visible="False">  
                 </telerik:GridBoundColumn> 
                   </Columns> 
            <GroupByExpressions> 
                <telerik:GridGroupByExpression> 
                    <GroupByFields> 
                        <telerik:GridGroupByField FieldAlias="Type" FieldName="Type" FormatString="" HeaderText="Type" /> 
                    </GroupByFields> 
                </telerik:GridGroupByExpression> 
            </GroupByExpressions> 
        </MasterTableView> 
        <FilterMenu> 
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </FilterMenu> 
        <ValidationSettings EnableValidation="False" /> 
    </telerik:RadGrid> 

Any help appreciated.

Thanks
R
Eyup
Telerik team
 answered on 13 Sep 2019
7 answers
340 views

Hi Team,

 

I'm experiencing some issues with the RadEditor, it is not responding to the height and width value and it is overlapping the editor below, Please see attached image.

When debugging,using the browser inspect, if the height is unchecked, it resizes accordingly and displays properly, but there is no inline- height specified on the editor, I have only Web20 skin as the style on the editor, no other style, but by the default it keeps adding height and width with value on it and I don't know how its generating the values or where it is specified.

 

Thanks in advance

Rumen
Telerik team
 answered on 13 Sep 2019
13 answers
421 views
Hi,
 I was wondering if there's any client-side event/function call that allows me to select multiple time slots in the scheduler.

I am implementing an application where I need to allow the user to

1. click and drag across the scheduler; when they release the mouse button,
2. open the advanced edit form for that dragged duration... and,
3. marking the duration on the scheduler with a different background color.

Is this possible on the client side? If not client side, would it be possible to do this server side?

- Sahil
Rumen
Telerik team
 answered on 13 Sep 2019
1 answer
180 views

I have an asp panel, that contains a toolbar and that toolbar contains a radbutton.

When the page loads, all is good.  I call a toolbar init on the client and an "onGridcreated" and I check if a row is selected in the grid.  If not, disable the button.  That works as expected.

After I select a row, a rowclick event fires, the button is enabled.  That works as expected.

If I click the button, which opens a radwindow, and do some editing to the data and save it and close my window, the ajax refreshes my main page.  During this, the toolbar init and onGridCreated are called.  It checks to see if a row is selected, there's not.  The code finds my button and calls set_enabled(false).

The button is then greyed out but I can still click it and it pops open a window.  Im expecting it to not be clickable.  Why would it fire events if it's not enabled?

Rumen
Telerik team
 answered on 13 Sep 2019
8 answers
576 views

I am trying to use a RadTextBox with TextMode="Password".

When I was testing it in Internet Explorer version 11 under Windows 7, there is a weird icon that shows up when typing something in the RadTextBox.

Attached is a screenshot with the icon circled in RED.

When you click on the icon and hold the mouse button, it shows the text of the password.

I have tested on Chrome and Firefox and no icon appears in the RadTextBox.

Is there any way to prevent that icon from appearing?

Please help!

Sincerely,

Keith Jackson

 

SSirica
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 12 Sep 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?