Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
88 views

I was updating the Telerik  controls and I installed the Telerik JustCode by mistake and I removed the JustCode.

Still my visual studio 2010 is not showing the automatic syntax checking and missing the squiggly line if there is any syntax  error. It happens after the installation  of Telerik  JustCode.

Can anyone tell me how can I get it back?

Thanks,

Jay

Zdravko
Telerik team
 answered on 25 Jan 2013
3 answers
1.6K+ views
Hi,

In my grid i would like to show Refresh button only,I don't like to show add new record button.For this what are the properties i need to set.

Please suggest me...
Claudia
Top achievements
Rank 1
 answered on 25 Jan 2013
1 answer
123 views
I found a curious issue just now.  I have a RadAsyncUpload control in an ASP.NET 4.5 project, and the upload works fine, but the FileFilter doesn't seem to be showing until after I've uploaded 1 file.

To be clear:
User clicks "Choose File", the dialog popups like in the attached "before.png" screenshot
or
User clicks Cancel on that popup and clicks "Choose File" again, and it appears again like in the attached "before.png" screenshot

However if the user actually selects a file and the file is uploaded, clicking on "Choose File" again, the user is presented with a dialog as shown in the "after.png" screenshot.

Plamen
Telerik team
 answered on 25 Jan 2013
1 answer
149 views
Hi,

I have a grid which is similar to the following demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/declarativerelations/defaultcs.aspx

In this grid I have Radbuttons which toggle on/off and adjust some figuress. On each toggle button I have a javascript function which calls a web service, which calls a store proc. After this I then attempt to rebind the grid on the client side like so
var masterTable = $find( result ).get_masterTableView();
            masterTable.rebind();

When I debug the project I get this error:
Specified argument was out of the range of valid values. Parameter name: ItemHierarchicalIndex

I'm also using the follow code to keep the nestedviews expanded, if I don't use it every change would cause the grid to collapse
void rg_ItemDataBound(object sender, GridItemEventArgs e)
    {
 
        //Expand all items using our custom storage
        string[] indexes = new string[this.ExpandedStates.Keys.Count];
        this.ExpandedStates.Keys.CopyTo(indexes, 0);
 
        ArrayList arr = new ArrayList(indexes);
        //Sort so we can guarantee that a parent item is expanded before any of
        //its children
        arr.Sort();
 
        foreach (string key in arr)
        {
            bool value = (bool)this.ExpandedStates[key];
            if (value)
            {
                rg.Items[key].Expanded = true;
                 
            }
        }
}
 
void rg_ItemCommand(object sender, GridCommandEventArgs e)
    {
         
        //if (e.CommandName == RadGrid.ExpandCollapseCommandName && !e.Item.Expanded)
        //{
        if (e.CommandName == RadGrid.ExpandCollapseCommandName)
        {
             
 
            this.ExpandedStates[e.Item.ItemIndexHierarchical] = true;
 
             
        }
    }
 
 private Hashtable _ordersExpandedState;
    private Hashtable ExpandedStates
    {
        get
        {
            if (this._ordersExpandedState == null)
            {
                _ordersExpandedState = this.Session["_ordersExpandedState"] as Hashtable;
                if (_ordersExpandedState == null)
                {
                    _ordersExpandedState = new Hashtable();
                    this.Session["_ordersExpandedState"] = _ordersExpandedState;
                }
            }
 
            return this._ordersExpandedState;
        }
    }


Thanks.




Andrey
Telerik team
 answered on 25 Jan 2013
7 answers
163 views

I'm experiencing an intermittent error when cancelling the loading of a RadChart. During the load of a chart I log out of the application which causes the session to clear. After that I do a redirect to a log in page. Sometimes it works with no problem and sometimes I get an error. It is not consistent and I am testing locally on my development server.

Here is the error:

Error loading Radchart image.
  You may also wish to check the ASP.NET Trace for further details.
  Display stack trace? 

Here are my configurations:

<!-- this is appsetting for chart image --> 
  <add key="ChartImage_axd" value="storage=session;timeout=20;dir=~\img\chartimage" />

<system.web>
    <httpHandlers>
      <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2011.1.413.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
    </httpHandlers>
    <httpRuntime maxRequestLength="2048000" executionTimeout="3600" />
    <sessionState timeout="60"/>

  </system.web>

<system.webServer>
    <handlers>
      <add name="ChartImage_axd" verb="*" preCondition="integratedMode" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" />
    </handlers>
  </system.webServer>

Do you have any ideas on how I can fix the intermittent error?

Thank you!

Ves
Telerik team
 answered on 25 Jan 2013
3 answers
83 views
How can editor mode tab buttons (preview, HTML, design) be changed in C# code?
- Toggle label on the button
- Change label text on button,
- Toggle icon,
- Change icon.
Rumen
Telerik team
 answered on 25 Jan 2013
3 answers
101 views
I have a bit of java script on a master page that is checking a user control nested inside a grid (edit mode) that ensures the user has at-least selected one of the template items in a drop-down list.  
The template in the combo box contains a Check box and label....

If the user tries to submit the edited or new record, a custom validator with a client side event fire and should check to see if they user actually selected at-least 1 of the template check boxes, otherwise it displays an error and the validation control stops the post back to the server...

So if I run this in IE, I have no problems... But it does not seem to validate in chrome, safari and firefox.. I suspect it has to do with the line of code:
items.getItem(i).get_element().innerHTML.indexOf("CHECKED") > 0


Now I can get it  to work if I use a server postback, but I would like to avoid a trip to the server... (see server method c# at the end of the post...)

MASTER PAGE Javascript
<script type="text/javascript">
         function ClientListBoxItemsCountValidate(source, arguments) {
            var listbox = $find(source.controltovalidate);
            var itemsCount = listbox.get_items().get_count();
  
            if (itemsCount < 1)
                arguments.IsValid = false;
            else if (itemsCount > 0)
                arguments.IsValid = true;
        }
  
        function ClientComboCountValidate(source, arguments) {
            var comboBox = $find(source.controltovalidate);
            var items = comboBox.get_items();
  
            for (var i = 0; i < items.get_count(); i++) {
                if (items.getItem(i).get_element().innerHTML.indexOf("CHECKED") > 0) {
                    arguments.IsValid = true;
                } else {
                    arguments.IsValid = false;
                 }
             }
        }      
     </script>


ComboBox and Validator in usercontrol nested in a radgrid 
<telerik:RadComboBox ID="RadComboDepartments" runat="server" DataTextField="DepartmentName"
    DataValueField="DepartmentUid" EmptyMessage="Please select" CausesValidation="True">
        <ItemTemplate>
            <asp:CheckBox ID="CheckBox" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DepartmentName") %>' />
         </ItemTemplate>
 </telerik:RadComboBox>
     <asp:CustomValidator ID="CustomValidator2" ValidateEmptyText="true" ControlToValidate="RadComboDepartments"
         Display="Dynamic" ClientValidationFunction="ClientComboCountValidate" ErrorMessage="<br />One department must be selected"
         CssClass="Error" runat="server"  />



Not the desired solution:  Server Side Validation...
protected void CustomValidator2_ServerValidate(object source, ServerValidateEventArgs args)
        {
            foreach (RadComboBoxItem item in RadComboDepartments.Items)
            {
                CheckBox chk = (CheckBox)item.FindControl("CheckBox");
                if (chk.Checked)
                {
                    args.IsValid = true;
                    return;
                }
            }
 
            args.IsValid = false;
        }


Nencho
Telerik team
 answered on 25 Jan 2013
4 answers
113 views
Hi,

I am having a RadGrid on my page which is bounded in client-side to populate retrieving data from a WCFAjaxEnabledService.
Everything works well to populate data., but the HeaderContextmenu operations(like filtering and sorting etc.) are not working.

Also while sorting operation through the HeaderContextMenu, it does not find the MasterTableView for the particular grid while trying to populating the grid again after the reloading and nothing happens with filter through HeaderContextMenu operation.

Do anybody is having any suggestions regarding this, Please help me ?

Can i handle the click event of this HeaderContestMenu on client-side ?

Thanks in advance..
Vasil
Telerik team
 answered on 25 Jan 2013
1 answer
78 views
How can I set the BannersPath by using javascript?
var r1 = $find("<%= RadRotator1.ClientID %>");

 

if (r1 != null) r1.BannersPath = "../../Photos/" + Homes[homeindex].replace(" ", "");

<telerik
:RadRotator ID="RadRotator1" runat="server" Width="370px" Height="219px" RotatorType="SlideShowButtons" BannersPath="~/Photos/Bayview"

 

ItemHeight="219px" ItemWidth="330px" FrameDuration="3000" ScrollDirection="Left, Right">

Thanks

 

 

Slav
Telerik team
 answered on 25 Jan 2013
8 answers
81 views
I facing problem in opera while selecting multiple contacts on radgrid. While holding ctrl key it always opens new window/tab of ajaxMap. As on single click in radgrid; i am showing addresses of contacts on AjaxMap which is implemented in my page. And on multiple clicks on radgrid it shows multiple addresses of contacts on Ajaxmap. But in opera it opens ajaxMap in new window instead of showing contact address on Ajaxmap in same page where i implement it.   Except opera it works fine in all browsers. But why i facing this issue in opera. Can anyone please help me.
Vasil
Telerik team
 answered on 25 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?