Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
136 views
Hi,

I need to show two RAdListViews under NestedViewTemplate of radgrid,
both are bound with 2 different datasources.

Is it possible to show data from both the datasources under  NestedViewTemplate of radgrid, in telerik documentation they are telling that we can define only datasource.

Or any alternative for this.
Plz if i get any sample code, it will be helpfull for me.


Radoslav
Telerik team
 answered on 09 Aug 2010
1 answer
85 views
I have a sinking feeling that I'm going to feel stupid after one of you helps me with this one...

I'm positioning a RadWindow via OffsetElementID. That's working exactly as I want it to (opening the window right beside where the link in the Radgrid is), but whenever I click the Details link the page scrolls back to the top (it's not  a page refresh), which often hides the window if it was further down the list. Anyway ideas on how to stop this?

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow  
                    id="RadWindow1"
                    offsetelementid="detailsLink" 
                    runat="server"
                    showcontentduringload="false"
                    width="600px"
                    height="600px"
                    title="" 
                    visiblestatusbar="false"
                    reloadonshow="True" 
                    behaviors="Close, Move" 
                    skin="WebBlue">
                </telerik:RadWindow>
            </Windows>
 </telerik:RadWindowManager
   
 <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
        DataSourceID="SqlDataSource1" GridLines=None Skin="WebBlue" PageSize="50" Width=100
        AllowFilteringByColumn=true ShowGroupPanel="True" OnItemCreated="RadGrid1_ItemCreated">
        <HeaderContextMenu EnableTheming="True" Skin="WebBlue">
            <CollapseAnimation Duration="200" Type="OutQuint" />
        </HeaderContextMenu>
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView GroupLoadMode=Client AutoGenerateColumns="False" DataKeyNames="pkRequestID" AllowMultiColumnSorting="True" DataSourceID="SqlDataSource1">
            <Columns>
                <telerik:GridBoundColumn  DataField="pkRequestID" HeaderText="ID" SortExpression="pkRequestID"
                    UniqueName="pkRequestID" FilterControlWidth="20px">
                    <HeaderStyle Width="5%" />
                       
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn  DataField="strTitle" HeaderText="Title" SortExpression="strTitle"
                    UniqueName="strTitle">
                    <HeaderStyle Width="50%" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="fullName" HeaderText="Submitted By" SortExpression="fullName"
                    UniqueName="fullName">
                    <HeaderStyle Width="15%" />
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="dteDate" HeaderText="Added" SortExpression="dteDate"
                    UniqueName="dteDate" DataFormatString="{0:MM/d/yy}">
                    <HeaderStyle Width="10%" HorizontalAlign=Center    />
                    <ItemStyle HorizontalAlign=Center />
                </telerik:GridDateTimeColumn>
                  
                <telerik:GridBoundColumn DataField="strStatus" HeaderText="Status" SortExpression="strStatus"
                    UniqueName="strStatus">
                     <HeaderStyle Width="10%" HorizontalAlign=Center  />
                     <ItemStyle HorizontalAlign=Center />
                </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="votes" HeaderText="Votes" SortExpression="votes"
                    UniqueName="votes" FilterControlWidth="20px">
                     <HeaderStyle Width="5%" HorizontalAlign=Center  />
                     <ItemStyle HorizontalAlign=Center />
                </telerik:GridBoundColumn>
                  
                <telerik:GridBoundColumn DataField="comments" HeaderText="Comments" SortExpression="comments"
                    UniqueName="comments" FilterControlWidth="20px">
                     <HeaderStyle Width="5%" HorizontalAlign=Center  />
                     <ItemStyle HorizontalAlign=Center />
                </telerik:GridBoundColumn>
                  
                <telerik:GridTemplateColumn UniqueName="pkRequestID" AllowFiltering="False">
                     <ItemTemplate>
                         <asp:HyperLink ID="detailsLink" runat="server" Text="Details"></asp:HyperLink>
                     </ItemTemplate>
                     <HeaderStyle Width="5%" HorizontalAlign=Center  />
                </telerik:GridTemplateColumn>
            </Columns>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
        </MasterTableView>
          
        <PagerStyle Mode=NextPrevNumericAndAdvanced Position="TopAndBottom" />
    </telerik:RadGrid>

Here's my codebehind:
Private Sub RadGrid1_Init(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles RadGrid1.Init
    Dim menu As GridFilterMenu = RadGrid1.FilterMenu
    Dim i As Integer = 0
    While i < menu.Items.Count
        If menu.Items(i).Text = "NoFilter" Or _
           menu.Items(i).Text = "Contains" Or _
           menu.Items(i).Text = "DoesNotContain" Or _
           menu.Items(i).Text = "StartsWith" Or _
           menu.Items(i).Text = "EndsWith" Or _
           menu.Items(i).Text = "EqualTo" Or _
           menu.Items(i).Text = "NotEqualTo" Or _
           menu.Items(i).Text = "GreaterThan" Or _
           menu.Items(i).Text = "LessThan" Then
            i = i + 1
        Else
            menu.Items.RemoveAt(i)
        End If
    End While
End Sub 'RadGrid1_Init
    
Protected Sub clrFilters_Click(ByVal sender As Object, ByVal e As EventArgs)
    For Each column As GridColumn In RadGrid1.MasterTableView.Columns
        column.CurrentFilterFunction = GridKnownFunction.NoFilter
        column.CurrentFilterValue = String.Empty
    Next
    RadGrid1.MasterTableView.FilterExpression = String.Empty
    RadGrid1.MasterTableView.Rebind()
End Sub
  
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs)
    If TypeOf e.Item Is GridDataItem Then
        Dim detailsLink As HyperLink = DirectCast(e.Item.FindControl("detailsLink"), HyperLink)
        detailsLink.Attributes("href") = "#"
        detailsLink.Attributes("onclick") = [String].Format("return openDetailsWin('{0}');", e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("pkRequestID"))
    End If
End Sub

Georgi Tunev
Telerik team
 answered on 09 Aug 2010
3 answers
106 views
Hi all,

I am using RadAjaxLoadingPanel and RadAjaxPanel with a Button which takes long time processing (Communicating with external machine), this is the code.

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server">
      <img alt="Loading..." src="loading.gif">
</telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanel="RadAjaxLoadingPanel1">
      <asp:Button ID="btn" runat="server" OnClick="btnClick" Text="Clieck here" />
</telerik:RadAjaxPanel>

protected void btnClick(object sender, EventArgs e)
{
      Foo() // function takes long time
}

After pressing this button it shows me this error message
Microsoft JScript runtime error: Sys.InvalidOperationException: A Control in already associated with the element

Is there anyway else to show loading image?????

another thing, that I tried to show loading with Gridview but it doesn't come. how to show loading with the GridView events???

Thank in advance
Maria Ilieva
Telerik team
 answered on 09 Aug 2010
1 answer
104 views

I have 3 separate grids on a page on a double click all 3 opens a same user control.

All 3 have <EditFormSettings UserControlName="~/BudgetPages/UserControls/BudgetItem.ascx" EditFormType="WebUserControl" />

All 3 call this function on double click

      function RowDblClick(sender, eventArgs) {

            sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());

      }

Second and third on the page disappear when I double click.

Maria Ilieva
Telerik team
 answered on 09 Aug 2010
4 answers
291 views
I just put a RadFormDecorator control on my Master Page and have it styling ONLY CheckBoxes and RadioButtons. But now, when the page loads there is an obvious and annoying delay before all buttons and drop down lists are displayed. Textboxes and other form controls show display immediately. I've not using the decorator tool to style the dropdownlists nor the buttons, so why the delay? The demos do not seem to have this delay? Is there a fix or similar for this behavior? I'm using version 2010.1.519.20
Georgi Tunev
Telerik team
 answered on 09 Aug 2010
1 answer
58 views
Hai,

        I put a radgrid inside a radwindow, then call the window  and closed it.. again calling show a error says that Radgrid ID already exist , cant added to page


plzzzzzzzzz.help
Georgi Tunev
Telerik team
 answered on 09 Aug 2010
3 answers
109 views
Group,
I am sure there is an easy answer to this, but I am having trouble finding it.  I am using a RadGrid with filtering by columns.  One of the columns is a DateTime column.

for the filter I am using the GreaterthanOrEqualTo filter.  What I want to have happen is have the Grid sort by date descending on page load so the most recent transaction is first, but when a date is typed into the filter I want it to sort Ascending so the closes transaction to that date appears at the top of the list.

Is there a way to set a sort order when filtering?

Also, in the filter when I select a date from the date picker it doesn't post back.  I have to hit enter for it to apply the filter because I hid the filter button and defaulted it to GreaterthanOrEqualTo.  In my situation it would be ideal to fire the filter when picking a date.  Is there a way to change that?  I am sure I could do it with javascript but not sure if there is something already built in.

Any help is greatly appreciated.
Mira
Telerik team
 answered on 09 Aug 2010
5 answers
2.0K+ views
I would like to hide the arrow buttons and let the user type in the numbers in a RadNumericTextBox control. I don't see any method or property to do that. How can I remove those buttons then?

Thank you,
Vithiya
Daniel
Telerik team
 answered on 09 Aug 2010
1 answer
90 views
In the Telerik grid demo for drag and drop they show the "Move" cursor when you enter the first column (the drag column).  How are they doing this?  I don't see any stylesheet being applied to the column.  I tried this using the headerstyle and itemstyle properties to set a style which had cursor: move and this kind of worked, but just the edges of the column showed the move cursor, the middle still showed the hand. 

Any hints?
Dimo
Telerik team
 answered on 09 Aug 2010
1 answer
89 views
Here is what I'm using for my tabstrip.

<telerik:RadScriptManager ID="ScriptManager" runat="server" />
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<link href="css/navRe.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
    /* <![CDATA[ */
    function SelectMyTab(sender, eventArgs) {
        var tab = eventArgs.get_tab();
        tab.select();
    }

    function UnSelectMyTab(sender, eventArgs) {
        var e = eventArgs.get_domEvent();
        var tabStrip = $find('<%= RadTabStrip1.ClientID%>');
        if (!tabStrip) return;
        //Find the element which the mouse is over
        var destElement = e.relatedTarget || e.toElement;
        if ($telerik.isDescendant(tabStrip.get_element(), destElement))
            return;
        var initialTab = tabStrip.findTabByText(tabStrip.get_attributes().getAttribute("InitialTab"));
        initialTab.unselect();
        initialTab.selectParents();
    }
    /* ]]> */
</script>
</telerik:RadCodeBlock>

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

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" UnSelectChildren="True"
                        OnClientMouseOver="SelectMyTab"
                        OnClientMouseOut="UnSelectMyTab"
                        ClickSelectedTab="True"
                        SelectedIndex="2"
                        AutoPostBack="True" Skin="" >
    <Tabs>
        <telerik:RadTab runat="server" Text="HOME"
            CssClass="selectedNav">
            <Tabs>
                <telerik:RadTab runat="server" Text="Child RadTab 1" CssClass="childNav">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Child RadTab 2" CssClass="childNav">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="GROW YOUR BUSINESS"
            CssClass="unselectedNav">
            <Tabs>
                <telerik:RadTab runat="server" Text="test" CssClass="childNav">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="test 2" CssClass="childNav">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="INCREASE SALES" CssClass="unselectedNav"
            Selected="True">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>

c#:

protected void Page_Load(object sender, EventArgs e)
    {
        RadTabStrip1.Attributes["InitialTab"] = RadTabStrip1.InnermostSelectedTab.Text;
    }

The error I'm getting when I mouse out says this:

Microsoft JScript runtime error: 'parentNode' is null or not an object

I can't figure out what the issue is, any ideas?

-Kirk




Yana
Telerik team
 answered on 09 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?