Telerik Forums
UI for ASP.NET AJAX Forum
21 answers
896 views
I'm curious why an asp:Textbox that is decorated with RadFormDecorator looks different than a RadTextBox.  Regular textboxes cannot always be replaced with the radTextbox (if they are generated by a third-party control, for example, including edit forms in radGrid), and sometimes it just isn't necessary.  I would expect that if I used some radControls, I should be able to use form decorator to take care of everything else, and I would see a consistent styling across the board, but that is not the case.

If I use radTextBox or radInputManager on an asp:Textbox, I get a nice sqared-off look (I am using the Simple theme applied globally in web.config).  If I use form decorator, though, I get rounded corners.  I don't find them attractive at all, especially since it seems to decrease the height of the textbox as well, but more importantly, they simply do not match!  (I haven't tried all of the skins, but this seems to be the case for what I have looked at.)

There really should be some uniformity here!
Joel
Niko
Telerik team
 answered on 12 Aug 2011
1 answer
214 views

I have a Rad grid bound to a sqldatasources  using hierarchical Declarative relations which works fine. However I would like to have only specific rows expanded on load based on the value in one of the columns of the master table. I have tried the following code which does target the correct rows but does not expand them on load.

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
        If (TypeOf e.Item Is GridDataItem) Then
            If (e.Item.OwnerTableView.DataSourceID = "SqlDSmaster") Then
                'process requested operations
                Dim DataItem As GridDataItem = CType(e.Item, GridDataItem)
 
                If DataItem("Status").Text = "Hasdetailrows" Then
                    DataItem.BackColor = Drawing.Color.Red
                    DataItem.FireCommandEvent("ExpandCollapse", DataItem)
                    DataItem.Expanded = True
                End If
 
            End If
 
        End If
    End Sub




Any help would be appreciated.
Kind Regards
Ross

Shinu
Top achievements
Rank 2
 answered on 12 Aug 2011
2 answers
154 views
Hello,
I have a bunch of radComboBox inside a userControl that is use as a editForm. To fill those comboBox, I'm using WebMethod witch works fast, but if the user click to expand a second comboBox while the first haven't finish to load it's items, I receive a "Unspecified error.". I tried to deactivate all animation to accelerate the switch, but no luck. The error only happen if both comboBox haven't been filled before. After the error happened, Internet Explorer give me a debugging option. Here's where the error happened

_onReadyStateChange=function(){if(a._xmlHttpRequest.readyState===4){try{if(typeof a._xmlHttpRequest.status==="undefined")return}catch(b){return}a._clearTimer();a._responseAvailable=true;try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{
 
***** debugger stop here *********************
 
if(a._xmlHttpRequest!=null){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=null}}}};this._clearTimer=function(){if(a._timer!=null){window.clearTimeout(a._timer);a._timer=null}};this._onTimeout=function(){if(!a._responseAvailable){a._clearTimer();a._timedOut=true;a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest.abort();a._webRequest.completed(Sys.EventArgs.Empty);a._xmlHttpRequest=null}}};Sys.Net.XMLHttpExecutor.prototype={get_timedOut:function(){return this._timedOut},get_started:function(){return this._started},get_responseAvailable:function(){return this._responseAvailable},get_aborted:function(){return this._aborted},executeRequest:function(){this._webRequest=this.get_webRequest();var c=this._webRequest.get_body(),a=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var e=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(e,this._webRequest.getResolvedUrl(),true);this._xmlHttpRequest.setRequestHeader("X-Requested-With","XMLHttpRequest");if(a)for(var b in a){var f=a[b];if(typeof f!=="function")this._xmlHttpRequest.setRequestHeader(b,f)}if(e.toLowerCase()==="post"){if(a===null||!a["Content-Type"])this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");if(!c)c=""}var d=this._webRequest.get_timeout();if(d>0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a="";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf("MSIE")!==-1)a.setProperty("SelectionLanguage","XPath");if(a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName==="parsererror")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName==="parsererror")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;this._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler


I personally have no idea how to use this information... How can the problem be solved? Should the loading call of the first comboBox get cancel or maybe prevent all other comboBox to initiate their items loading while loading is already in progress?

Thank you for your time,
Louis-Philippe Giroux
Dimitar Terziev
Telerik team
 answered on 12 Aug 2011
1 answer
79 views
Is there anyway to dynamically change the Expand direction of a Groupsetting by using a databind.

My menu is generated by a datasource/databing and we wanted to simulate a "windows" like Start menu but dynamically setting up the expand direction is a problem.

If I set it to "up" all the items overflow its parents, and the right direction should only happen after you expand the first set of items.

Kate
Telerik team
 answered on 12 Aug 2011
4 answers
284 views
Hi Telerik Team,

I am new to RadCharts, I want to set my radchart visible =false, when there are no records in it or when the radchart shows "

There is no or empty series

". 
 
waiting for your early reply.

Thanks
Gopi Krishna

GK
Top achievements
Rank 1
 answered on 12 Aug 2011
4 answers
191 views
Using ASP.Net 4.0;

Hello,
I am working in the edit form of a RadGrid, and I have built a RadComboBox with 5 values set in its datasource in its PreRender function, with a selected value preselected when the user opens the edit form. Everything is working fine: the selected value is being loaded into the control, and when the user saves the form, the correct value is saved to database.

However, when the form is first opened, the displayed text is of the first value in the box: not the selected value. For example, the item at index 3 is marked as selected and is saved when the form save is fired, however when the form is opened the text of the item at index 0 is displayed.

Anyone have experience with an issue like this? Thanks!

Eric
Dimitar Terziev
Telerik team
 answered on 12 Aug 2011
7 answers
224 views
Telerik,

I am trying to access a cell in a radgrid while using that value as querystring parameter to open a radwindow.  The radgrid is contained in a radpanelbar.  Please let me know what I am doing wrong.

Thanks,

Al

<%@ Page Language="C#" MasterPageFile="~/loggedin.master" AutoEventWireup="true"
    CodeFile="AdvancedSearch.aspx.cs" Inherits="AdvancedSearch" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    function ViewClick(obj)
    {
        var grid = document.getElementById("<%=rpAdvancedSearch.FindItemByValue("GripsPanelItem").FindControl("pGrips").FindControl("rgGrips").ClientID %>");
        var master = grid.ClientID.get_masterTableView();
        var rowElement = obj.parentElement.parentElement;
        
        var cell = master._getCellByColumnUniqueNameFromTableRowElement(rowElement, "GripId");
        var id = cell.innerHTML;           
        var wnd = window.radopen("RequestiView.aspx?Id=" + id, null);         
    }
    </script>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgGrips" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgGrips">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgGrips" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadPanelBar runat="server" ID="rpAdvancedSearch" ExpandMode="MultipleExpandedItems"
        Width="100%">
        <Items>
            <telerik:RadPanelItem Text="Grips" Value="Grips" Expanded="false">
                <Items>
                    <telerik:RadPanelItem Value="GripsPanelItem">
                        <ItemTemplate>
                            <asp:Panel ID="pGrips" runat="server" Height="300px">
                                <telerik:RadGrid ID="rgGrips" GridLines="None" runat="server" AutoGenerateColumns="False"
                                    ShowHeader="true" OnInit="rgGrips_Init" >
                                    <MasterTableView>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="GripId" Visible="False" UniqueName="GripId">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn UniqueName="gtcView" HeaderText="View">
                                                <ItemTemplate>
                                                    <asp:LinkButton runat="server" ID="lbView" Text="View" OnClientClick="return ViewClick(this)" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                            </asp:Panel>
                        </ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>
    <telerik:RadWindowManager ID="Singleton" runat="server" Width="1100px" Height="750px"
        VisibleStatusbar="false" Behavior="Close,Move,Resize,Pin,Reload" Modal="true"
        Skin="Telerik" Style="z-index: 7001">
    </telerik:RadWindowManager>
</asp:Content>
Marin Bratanov
Telerik team
 answered on 12 Aug 2011
1 answer
146 views
Hi,

I am having a problem with RadWindow control. On the click of server side button control, radwindow is opened which is fine. User closes it. When Page Postback happens, it automatically opens which is undesirable. How can I get rid of this behaviour?

Code Snippet - Html Source...

<telerik:RadWindowManager ID="ExclusionWindow" runat="server" Skin="Office2007" Width="500"
        Height="400" Visible="true">
    </telerik:RadWindowManager>
..................


Code behind ..


 protected void btnSetExclusion_Click(object sender, EventArgs e)
        {
            if (Master == null) return;
            Label lblPortfolio = (Label)Master.FindControl("lblPortfolioID");
            int orgID = Convert.ToInt32(lblPortfolio.Text);
            RadWindow window = new RadWindow()
            {
                ID = "Exclusion Window",
                VisibleOnPageLoad = true,
                NavigateUrl = "frmCMExclusions.aspx?OrgID=" + orgID,
                Modal = true,
                DestroyOnClose = true,
                Behaviors = WindowBehaviors.Close
            };
            ExclusionWindow.Visible = true;
            ExclusionWindow.Windows.Add(window);
            ExclusionWindow.DestroyOnClose = true;
        }


Many thanks.

Milan G



Marin Bratanov
Telerik team
 answered on 12 Aug 2011
1 answer
55 views
Hello people,

I'm using 3 RadListBoxes with 2 RadGrids on the same page aspx, but i' d'ont know how to arrange them in the page...

I'm using a <table> to group them in columns but it's not working...I d'ont like the appearence

Can you help me?

My code aspx is the next:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AssignInvoices.aspx.cs" Inherits="iConnect.InvoicesScaling.Views.AssignInvoices" 
    Title="AssignInvoices" MasterPageFile="~/Shared/Silver.master" %> 
    
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" runat="Server"
    <script src="../Shared/js/jquery-1.6.2.min.js" type="text/javascript"></script
    <script src="../Shared/js/jquery.tooltip.js" type="text/javascript"></script
    <script type="text/javascript" src="../Silverlight.js"></script
    <h1 style="text-align: center;"
        Assign Invoices</h1
    <br /> 
    <table
        <tr
            <td
                <telerik:RadListBox ID="RadListBox1" runat="server" AllowReorder="True" Skin="Black"
                    Sort="Ascending" Height="400px" Width="250px" EnableDragAndDrop="True"
                    <ButtonSettings TransferButtons="All"></ButtonSettings
                    <HeaderTemplate
                        <h5 style="color: White; text-align: center"
                            USERS</h5
                    </HeaderTemplate
                </telerik:RadListBox
            </td
            <td
                <telerik:RadListBox ID="RadListBox2" runat="server" SelectionMode="Multiple" EnableDragAndDrop="True"
                    Height="400px" Width="150px" AllowReorder="True" Skin="Black"
                    <ButtonSettings TransferButtons="All"></ButtonSettings
                    <HeaderTemplate
                        <h5 style="color: White; text-align: center"
                            GROUPS</h5
                    </HeaderTemplate
                </telerik:RadListBox
            </td
            <td
                <telerik:RadListBox ID="RadListBox3" runat="server" EnableDragAndDrop="True" Height="400px"
                    Width="150px" AllowReorder="True" Skin="Black"
                    <ButtonSettings TransferButtons="All"></ButtonSettings
                    <HeaderTemplate
                        <h5 style="color: White; text-align: center"
                            STAGING</h5
                    </HeaderTemplate
                </telerik:RadListBox
            </td
            <td
                <telerik:RadButton ID="RadButton1" runat="server" Text="Assign" Skin="Black" Width="100px"
                    Height="50px" OnClick="RadButton1_Click"
                </telerik:RadButton
                <br /> 
                <br /> 
                <telerik:RadButton ID="RadButton2" runat="server" Text="Unassign" Skin="Black" Width="100px"
                    Height="50px" OnClick="RadButton2_Click"
                </telerik:RadButton
            </td
            <td
            </td
            <td
            </td
            <td
                <h1
                    Total Invoices Resume </h1
                <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Windows7"
                </telerik:RadGrid
            </td
        </tr
        <tr
            <td
            </td
            <tr
                <td
                </td
                <td
                    <telerik:RadGrid ID="RadGrid2" runat="server" Skin="Windows7"
                    </telerik:RadGrid
                    <h1
                    Total Invoices Resume </h1
                <telerik:RadGrid ID="RadGrid3" runat="server" Skin="Windows7"
                </telerik:RadGrid
                </td
            </tr
        </tr
    </table
    <br /> 
    <br /> 
</asp:Content>
Ricardo
Top achievements
Rank 1
 answered on 12 Aug 2011
1 answer
100 views
Hi, to get all edit row values I'm using hashtable as I found somewhere in the forum (can not know how many columns I'll have and their names).
The problem, and to me is a very big issue, is that when i iterate the hasttable, column order is completely lost (actually I don't even understand what kind of sorting it does). How can I have them in the original columns order?

Protected Sub RadGrid1_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
       
            Dim editItem As GridEditableItem = CType(e.Item, GridEditableItem)
            Dim newValues As Hashtable = New Hashtable()
            e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editItem)
 
            For Each entry In newValues
                'LogManager.WriteToDebugLog("c:\log\qwe\", "- newValues key" & entry.key & "  value" & CType(entry.value, String))
            Next
 
End Sub

Thank you
Mira
Telerik team
 answered on 12 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?