Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
173 views
I have a radwindow in which I have a button execute some javascript which manipulates the css classes of some elements. I see that this works, but then the content posts back and refreshes and the changes that the javascript just made get wiped out. How can I stop the radwindow from reloading after I execute a javascript function?

Here is the code for the button on the page loaded in the RadWindow:
<div style="padding:10px 10px 10px 10px; position:fixed; background-color:white; width:100%; z-index:100; height:15px;">
    <table>
             <tr>
                <td>
                    <button id="btnModify" onclick="ShowModify(); return false;">Modify</button>
                </td>
             </tr>
  </table>
</div>


And here's the javascript I have in the RadWindow:
function ShowModify()
{
        var elems = document.getElementsByTagName("span");
        for (i in elems)
        {
             if (elems[i].className == "modifyField")
             {
                  elems[i].className = "modifyFieldVisible";
             }
         }
         return false;
}
Gary
Top achievements
Rank 1
 answered on 08 Aug 2013
2 answers
67 views
This is a rather vague question.  I have a classic join table situation.  I put a key from table A and a key from Table B in a join table.  The join table record either exists or it doesn't exist.  If it does exist another process selects the records from table A and B.  (This is a one to many situation.)

My concern is this.  I already have a working solution for this.  I have a popup in the screen for editing table A that creates/deletes join table records for a particular Table A record.  

The popup screen consists of a RadGrid with table B records and a checkbox for each record.  The grid loads from a view that loads all table B records and whether or not a join exists for them with Table A (to set the check boxes.)  Once displayed the users can check or uncheck boxes as they please.  When the Save button is hit, the codebehind adds/deletes join table records as needed. 

This works fine so far but I'm just wondering that if table B grows to some hundreds of records, this might become cumbersome.  I believe it would be simple to 'Ajaxify' the situation so that adds/deletes take place the instant the box is clicked but on the other hand I wonder if I need to maintain a user interface in which changes only take place as a whole.

Suggestions?
Boris
Top achievements
Rank 1
 answered on 08 Aug 2013
6 answers
309 views
I tried to browse thru various form but I couldn't find how to add custom validator to GridNumeric column

I need to have clientside validation and server side validation for gridnumeric columns

I have 4 columns ( Grid Numeric columns) and total column and I need to make sure the total of this cannot be less than zero

I tried to do this in  Item created event , but not successfull
<telerik:GridNumericColumn DataField="AMT1" UniqueName="AMT1" HeaderText="Amount1"

DataType="System.Int32" DataFormatString="{0:N0}" DecimalDigits="0" 

 

ForceExtractValue="Always" SortExpression="Amount1" AllowFiltering="false" EmptyDataText="0"

 

Aggregate="Sum" FooterAggregateFormatString="{0:c0}" FooterStyle-HorizontalAlign="Right" >

 

</telerik:GridNumericColumn>

 

Item created event

If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then

Dim edititem As GridEditableItem = CType(e.Item, GridEditableItem)

For Each GridColumn As GridColumn In edititem.OwnerTableView.Columns

If GridColumn.IsEditable Then

Dim editor As GridNumericColumnEditor = TryCast(edititem.EditManager.GetColumnEditor(GridColumn.UniqueName), GridNumericColumnEditor)

If editor IsNot Nothing Then ' This is mainly to skip the other type of columns and read only numeric columns

 

Dim cell As TableCell = CType(editor.NumericTextBox.Parent, TableCell)

 

Dim validator As CustomValidator = New CustomValidator

validator.ErrorMessage = "Total should be >0"

validator.Display = ValidatorDisplay.Dynamic

 

validator.ForeColor = Drawing.Color.DarkRed

validator.ControlToValidate =""

validator.ValidationGroup = "total"

validator.ClientValidationFunction =

"validatetotal"

cell.Controls.Add(validator)

 

End If

End If

Next

End If


--------------------------------------------------


I am not even seeing the "OnServerValidate" Property.


Please suggest a solution

Thanks


MRa
Top achievements
Rank 1
 answered on 08 Aug 2013
1 answer
156 views
Hello,
I have a Pie Chart whose slice names can be very long - so long that the legend ends up disproportionately large as compared to the actual pie. Is it possible to have the HtmlChart legend only display the first n characters in the category value and then display the full value in the htmlchart tooltip?
Danail Vasilev
Telerik team
 answered on 08 Aug 2013
3 answers
166 views
I have a RadCombo and I am parsing a list of sites {SiteName, SiteUID} in javascript and adding them to the radCombo..
The comboSiteList Object contains a list of Sites with a count of 300...  The javascript function seems to be running very slow.. Is there something below I can do to speed things up?
var siteCombo = $find("<%= RadComboBoxTransferSites.ClientID %>");
          var comboSiteList = transferCountsObject.SiteLists;
          for (var i = 0; i < comboSiteList.length; i++) {
            var comboItem = new Telerik.Web.UI.RadComboBoxItem();
            comboItem.set_text(comboSiteList[i].SiteName.toString());
            comboItem.set_value(comboSiteList[i].SiteUID.toString());
            siteCombo.trackChanges();
            siteCombo.get_items().add(comboItem);
          }
siteCombo.commitChanges();

Wired_Nerve
Top achievements
Rank 2
 answered on 08 Aug 2013
4 answers
136 views
Hello,

The first combobox below behaves as I would expect to, and resizes when the browser window is resized.  However, the second combobox does not resize when the browser window does.  They use the same skin.  The only real difference that I can see is that I use check boxes in the second one.  Is there some way I can get it to resize when the browser window does (even if it is somehow done with javascript)?  This is pretty important functionality for my customer...

Any help would be greatly appreciated!

<telerik:RadComboBox ID="ShapesRadComboBox" runat="server" Skin="SST_Touch"
    SkinID="SST_Touch" EnableEmbeddedSkins="False" AllowCustomText="false"
    ShowDropDownOnTextboxClick="true" Width="100%" />
 
<telerik:RadComboBox ID="FillMaterialRadComboBox" runat="server" Skin="SST_Touch"
    SkinID="SST_Touch" EnableEmbeddedSkins="False" AllowCustomText="false"
    CheckBoxes="True" EnableCheckAllItemsCheckBox="True"
    ShowDropDownOnTextboxClick="true" CheckedItemsTexts="DisplayAllInInput"
    Width="100%" />
Ivan Zhekov
Telerik team
 answered on 08 Aug 2013
1 answer
67 views
I am following the example shown at this link but trying to utilize unobtrusive validation found in .Net 4.5.  No matter what I get the validator showing me that the values I have entered are improper.  The compare validator works great with the Currency and Numeric input controls so the issue seems to be specific to the DateInput control.  

I dug into the actual Microsoft WebUIValidation.js file to try and see what may the issue and it appears they use a couple regular expressions to try and determine whether the date part is the first digits or the last.  But for some reason it never matches either regex so the values come back as not valid.  The value it retrieves it appears is "2013-08-30-00-00-00"  if i edit that value while debugging to remove the trailing zero's then (which I assume are for time?) then the validator works properly.
Vasil
Telerik team
 answered on 08 Aug 2013
15 answers
288 views
So I have a timeline view with many appointments that span many time slots.  When the user right clicks on an appointment and selects an item on the context menu, I need a way to tell on the client what time slot the right click originated from as well as which appointment.  In case they select to split the appointment into two separate ones, I need to know where on the timeline they opened the menu from to know where to split it.

Obviously I could open a dialog to allow them to do this, but it should be a one step operation rather than have them specify the same information again in a different manner.

I didn't see anything obvious, but I thought it might be buried in there somewhere.
Boyan Dimitrov
Telerik team
 answered on 08 Aug 2013
3 answers
81 views
Hi,

None of the Telerik Window controls are displaying in the Mobile Chrome browser in iPad.
Only if I select "Request Desktop Site" that the controls are visible.

Any idea how to fix this?

Thanks
Piyush Agarwal
Marin Bratanov
Telerik team
 answered on 08 Aug 2013
4 answers
567 views
Greetings

This is a really easy one to answer.

I'm using the RadMenu with the metro skin. It's all looking great but I want to change the selected menu item's background color.

Currently the background changes to blue and the text to white when a menu item is clicked. I have tried to override this with:

.RadMenu_Metro .rmItem a::selection
{
    background-color: #239300 !important;
}

But no luck. It's a tricky one to catch using the web browser developer tools as it changes on the click event.

Thanks in advance,
Matt
Matt
Top achievements
Rank 1
 answered on 08 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?