Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
87 views
Hello,

I have the following scenario:
1. in the editor css file:
a.lightBox-link {
color:Red;
}
2. in the toolsfile.xml:
<classes>
<class name="Lightbox Link" value="a.lightBox-link" />
</classes>
3. Now open the editor in chrome (v. 26.0.1410.64) and check the ApplyCssClass drop down - it does not contain Lightbox Link. But it works fine in IE9
If I change the toolsfile.xml content to value="a.lightbox-link" (lowercase b) then it works in chrome but not in IE.

Does the editor treats css class names as case sensitive?
Can this be fixed?
Dobromir
Telerik team
 answered on 10 May 2013
1 answer
71 views
Hi,

I am using RadComboBox.Net2 Version 2.8.5.0. AutoComplete does not work correctly in IE9/10. The suggestions are not getting populated as per user input.

Is this a product version issue? If it is, what will be the best solution for me with minimal code changes?

Note: I am also using Telerik.Web.UI Version 2012.2.912.40 in some other areas.

Thanks





Nencho
Telerik team
 answered on 10 May 2013
0 answers
119 views
Hello to all(Image Table.jpg)

in first node Technology Name then Factor the SubFactor
Technology Name
    Factor Name
        SubFactor
So how to correct my query or bind Radtreeview For this.

Jack
Top achievements
Rank 1
 asked on 10 May 2013
1 answer
379 views
Hi to all,
Sorry to bother you with what might seem beginners question, I tried  to use ListView1_ItemCommand to as shown in my code below, but nothing happened the insert command is not firing should I use OnCommandInserting, if there is a form or example on how this could be done I would deeply appreciated.
thanks.
Rasha. 
if (e.CommandName == RadListView.PerformInsertCommandName)
{
    SqlCommand cmd = new SqlCommand();
    try
    {
        SqlConnection con = DataAccess.Connection.GetDBConnection();
        if (con.State == ConnectionState.Closed)
        {
            con.Open();
        }
        cmd.CommandText = "INSERT INTO [Package] VALUES (@PackageName, @PackageDesc, @PricePerMonth, @discountPercent, @NumOfImg, @NumOfGIF, @NumOfFlash, @isHomePageIncluded)";
        cmd.Parameters.Add("@PackageName", SqlDbType.VarChar);
        cmd.Parameters.Add("@PackageDesc", SqlDbType.VarChar);
        cmd.Parameters.Add("@PricePerMonth", SqlDbType.Money);
        cmd.Parameters.Add("@discountPercent", SqlDbType.Float);
        cmd.Parameters.Add("@NumOfImg", SqlDbType.Int);
        cmd.Parameters.Add("@NumOfGIF", SqlDbType.Int);
        cmd.Parameters.Add("@NumOfFlash", SqlDbType.Int);
        cmd.Parameters.Add("@isHomePageIncluded", SqlDbType.Bit);
 
        cmd.Connection = con;
 
        int result = cmd.ExecuteNonQuery();
        con.Close();
    }
    catch (Exception exp)
    {
        Response.Write(exp +"in Command: " + cmd.ToString());
    }

Shinu
Top achievements
Rank 2
 answered on 10 May 2013
1 answer
57 views
Hi 

I have a grid with 10 columns that do not fit in one single screen and of which the first two columns represent vital data and the last two columns are my Command columns that needs to be shown all the time.

Please help me fix this.

Thanks
Arun
Shinu
Top achievements
Rank 2
 answered on 10 May 2013
2 answers
103 views
Hi 

I have two columns in my radgrid
Empid - readonly, mandatory
EmpName - dropdown column , datavaluefield= "EmpID", datatextfield="EmpName"

On selection of an Employee in my dropdownlist I need to set and pertain the value of the EmpID column based on the selection in the EmpName.
Arun
Top achievements
Rank 1
 answered on 10 May 2013
3 answers
143 views
Hi Guys,

This is my RadGrid:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" CellSpacing="0" GridLines="None">
        <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="ID" CommandItemDisplay="TopAndBottom">
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="imagebutton" />
                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Client_Name" FilterControlAltText="Filter Client_Name column" HeaderText="CLIENT_NAME" SortExpression="Client_Name" UniqueName="Client_Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Equipment" FilterControlAltText="Filter Equipment column" HeaderText="EQUIPMENT" SortExpression="Equipment" UniqueName="Equipment">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Serial_Number" FilterControlAltText="Filter Serial_Number column" HeaderText="SERIAL_NUMBER" SortExpression="Serial_Number" UniqueName="Serial_Number">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Reason" FilterControlAltText="Filter Reason column" HeaderText="REASON" SortExpression="Reason" UniqueName="Reason">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn UniqueName="ButtonColumn" Text="Delete" CommandName="Delete" ButtonType="imagebutton" />
            </Columns>
            <EditFormSettings>
                <EditColumn ButtonType="ImageButton" InsertText="Insert" UpdateText="Update" UniqueName="EditCommandColumn1" CancelText="Cancel">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
    </telerik:RadGrid>

And this is my datasource:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues" 
        ConnectionString="<%$ ConnectionStrings:ClarityConnectionString %>" 
        OldValuesParameterFormatString="original_{0}" 
        DeleteCommand="DELETE FROM invClientsEquipmentInOffice WHERE (ID = @original_ID)" 
        InsertCommand="INSERT INTO invClientsEquipmentInOffice(Client_Name, Equipment, Serial_Number, Reason) VALUES (@Client_Name,@Equipment,@Serial_Number,@Reason)" 
        SelectCommand="SELECT ID, Client_Name, Equipment, Serial_Number, Reason FROM invClientsEquipmentInOffice" 
        UpdateCommand="UPDATE invClientsEquipmentInOffice SET Client_Name = @Client_Name, Equipment = @Equipment, Serial_Number = @Serial_Number, Reason = @Reason where ID = @original_ID">
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Client_Name" Type="String" />
            <asp:Parameter Name="Equipment" Type="String" />
            <asp:Parameter Name="Serial_Number" Type="String" />
            <asp:Parameter Name="Reason" Type="String" />
            <asp:Parameter Name="original_ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Client_Name" Type="String" />
            <asp:Parameter Name="Equipment" Type="String" />
            <asp:Parameter Name="Serial_Number" Type="String" />
            <asp:Parameter Name="Reason" Type="String" />
        </InsertParameters>
        </asp:SqlDataSource>

There is nothing in the code behind.

Partial Class inventory
    Inherits System.Web.UI.Page

End Class

Ok. The problem is that when you click the edit icon on any Row the entire page posts back and is painfully slow. Is there any way to prevent this postback?

Is there any built in default AJAX functionality for CRUD operations? One would think that by default when you click the edit icon that everything would happen client side as all the information is in the row you just clicked?

How do I find out what is happening when this postback occurs? Is it rebinding to the datasource every time I wonder?

Note: It should be noted that this is the "out of the box" RagGrid, I have not written any custom code for this one it was entirely created in Design View.

Note: It should also be noted that the select query return only 35 rows and runs in SSMS in 00:00:00 time.



Princy
Top achievements
Rank 2
 answered on 10 May 2013
1 answer
123 views
I have used the RadRotator in my Sitefinity website. It displays news items from the backend. I have set an initial width when created the RadRotator. But it does not work well on all screen sizes. I need to resize the RadRotator depending upon the screen/browser size.
Please help me with it.

Thanks,
Prateek
Shinu
Top achievements
Rank 2
 answered on 10 May 2013
1 answer
73 views
Hello,

I'm trying to implement client-side validation on the RadTextBox within an EditForm (EditFormType="Template") on a RadGrid. The scenario is one where I need to validate that the value being entered does not result in the total value for that same column to exceed a value. 

For example, the RadGrid contains rows that hold an "Hours" column. When I insert or edit a new row, I want to validate that the newly entered Hours value is not going cause the total for the Hours, for the entire grid, to exceed 24 hours.

I need to do this on the client side as I need to force the validation to occur on the blur event of the text box being used in the edit form.

E.g.

<EditFormSettings EditFormType="Template">
  <FormStyle Width="100%"></FormStyle>
     <FormTemplate>
           <table border="0" style="width:100%;" >
              <tr>
                  <td>
                     <span style="color: Red">*</span>
                     <asp:Label ID="lblHoursLabel" runat="server" Text="Hours:"></asp:Label>
                  </td>
                   <td>
                      <telerik:RadTextBox runat="server" ID="rtbHours" Text='<%#DataBinder.Eval(Container, "DataItem.RegularHours")%>'  Width="100px" ClientEvents-OnBlur="validateEnteredHours"></telerik:RadTextBox>
                  </td>
                </tr>       
             </table>
     </FormTemplate>
 </EditFormSettings>

I have no problem getting at the hours for the dataitems in the grid...
function validateEnteredHours(sender, args) {
                var id = sender.get_id();
                var radInput = $telerik.findControl(document.forms[0], id);
                var hoursValue = radInput.get_value();
                if (hoursValue == null)
                    alert("An Hours Value is Required")
                else {
                    var grid = $find("<%=radGridTimesheetDetails.ClientID%>");
                    var totalHours = 0;
                    if (grid) {
                        var masterTable = grid.get_masterTableView();
                        var Rows = masterTable.get_dataItems();
                        
                        for (var i = 0; i < Rows.length; i++) {
                            var row = Rows[i];
                            var isInEditMode = row.get_isInEditMode();
                            if (isInEditMode = false);
                            {
                                var hoursCell = masterTable.getCellByColumnUniqueName(row, "Hours");
                                var hours = parseFloat(hoursCell.innerHTML);
                                 
                                totalHours = totalHours + hours;
                            }
                        }
                    }
                }
            }

My problem now is determining what the hours are for the data item currently being edited, so that I can subtract that from the total hours, and then evaluate if adding the entered hours to that total will exceed 24.

Any help is appreciated.


Angel Petrov
Telerik team
 answered on 09 May 2013
1 answer
187 views
I am unable to get the raddatepicker OnBlur event to fire. I was success calling the same function when I used the OnFocus event. Any ideas? I've noticed that others have run into this problem in the past, but none of the solutions offered is helping.

 

 

<td>

 

<telerik:RadDatePicker ID="rdpDOB" runat="server" Skin="Web20" AutoPostBack="false" CssClass="clsRadCalendar" MinDate="1/1/1900" MaxDate="1/1/9999" DateInput-DateFormat="M/d/yyyy" DateInput-ClientEvents-OnBlur="validateAge" />
</td>

Angel Petrov
Telerik team
 answered on 09 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?