Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
181 views
Hi,

I have a question regarding RadFilter and Radgrid. I have a RadFilter outside the Radgrid that manipulates the data that is shown on the grid. I want to be able click on 'Edit' in one of the records, and once I update it (which will rebind the grid and not show the record I updated because of the filter that is still set by the RadFilter may not include that record anymore because of the update) I want it to go to the next record that was below it before the record disappeared in the rebind. I am using vb.net not c#, and Visual Studio 2010. Right now, since it rebinds, it skips a couple records and set it into edit mode, but I want it to set the next record after the one I edited (whether it is still there or not) to be set to edit mode.

This is in my update_command:

'after updating the record, open the next record to edit
        Dim nextItemIdx As Integer = e.Item.ItemIndex + 1
 
        Dim maxCnt As Integer = grd.Items.Count
 
        If Not (nextItemIdx < maxCnt) Then
            Return
        End If
 
        Me.grd.MasterTableView.Items(nextItemIdx).Edit = True
        Me.grd.MasterTableView.Rebind()
Andrey
Telerik team
 answered on 01 Aug 2013
1 answer
378 views
Hi Guys,
I am using AJAX toolkit Q2 2013 version of Telerik AJAX controls. I am using RadTabStrip control and I am facing problem of Tab selection. My scenario is give below:

I've 5 Tabs of RadTabStrip control on my page and this tab strip control is associate with RadMultipage control. In RadMultipage control every page view is  a separate .aspx control and there is next button control in my page (Next button is the part of page.aspx page). By clicking on this next button I want to select next tab and also show it as a selected.

<telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" Width="100%" Height="100%" runat="server" MultiPageID="RadMultiPage1" CssClass="RadTabStrip_Default" Skin="Default" EnableEmbeddedSkins="false" >
< Tabs>
< tab>Tab1</Tab>
.
.
.
.
< /Tabs>

</telerik:RadTabStrip>

<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage">

<telerik:RadPageView runat="server" ContentUrl="Page.aspx"> </telerik:RadPageView>

.
.
.

</telerik:RadMultiPage>

Can anyone guide my that how I can achieve this??? Thanks in advance.

Regards,

Princy
Top achievements
Rank 2
 answered on 01 Aug 2013
1 answer
128 views

I have two nested gridviews inside two radtabs, for this two nested views, I have a simple JavaScript for Expand and Collapse.

<script type="text/javascript">
    function collapseExpand(obj) {
        var gvObject = document.getElementById(obj);
        var imageID = document.getElementById('image' + obj);

        if (gvObject.style.display == "none") {
            gvObject.style.display = "inline";
            imageID.src = "~/ims/Images/bullet_toggle_minus.jpg";
        }
        else {
            gvObject.style.display = "none";
            imageID.src = "~/ims/Images/bullet_toggle_plus.jpg";
        }
    }

The Java Script is working fine for the first RadGrid of the first tab. However, its not working with the second tab. I think the control is not able to transfer to the second grid. I think my problem is similar to

http://weblogs.asp.net/hajan/archive/2010/10/07/make-them-to-love-each-other-asp-net-ajax-updatepanels-amp-javascript-jquery-functions.aspx

I applied all the methods listed there but still its not working.

<script type="text/javascript">
    function load() {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(collapseExpand);
    } 
    function collapseExpand(obj) {
        var gvObject = document.getElementById(obj);
        var imageID = document.getElementById('image' + obj);

        if (gvObject.style.display == "none") {
            gvObject.style.display = "inline";
            imageID.src = "~/ims/Images/bullet_toggle_minus.jpg";
        }
        else {
            gvObject.style.display = "none";
            imageID.src = "~/ims/Images/bullet_toggle_plus.jpg";
        }
    }

Can somebody tell me what code to write to transfer or pass the control of javascript to the second tab?

Also, I am using Radtabs and RadPageView to display two grids in two tabs.

I am calling the Collapse Expand inside radtab

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" MultiPageID="RadMultipage1">
<Tabs>
<telerik:RadTab Text="Tab1" PageViewID="RadPageView1" OnLoad="Load1">
  </telerik:RadTab>
  <telerik:RadTab Text="Tab2" PageViewID="RadPageView2" >
 </telerik:RadTab>
 </Tabs>
 </telerik:RadTabStrip>
 <telerik:RadMultiPage ID="RadMultipage1" runat="server">
<telerik:RadPageView ID="RadPageView1" runat="server" Width="100%" TabIndex="0">
<telerik:RadGrid ID="View1" runat="server" AutoGenerateColumns="False" Width="100"
    BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" 
      OnItemDataBound="RadGrid2_ItemDataBound" >
   <MasterTableView DataKeyNames="id">
   <Columns>
   <telerik:GridTemplateColumn>
   <ItemTemplate>
   <a href="javascript:collapseExpand('id_<%# Eval("id") %>');">
   <img id="imageSubId_<%# Eval("id") %>" alt="Click to show/hide orders" border="0" src="Images/bullet_toggle_plus.jpg" />
   </a>
   </ItemTemplate>
   </telerik:GridTemplateColumn>
   <telerik:GridBoundColumn DataField="id" HeaderText="ID"/>
   <telerik:GridBoundColumn DataField="fname" HeaderText="First Name"/>
   <telerik:GridBoundColumn DataField="lname" HeaderText="Last Name"/>
   <telerik:GridBoundColumn DataField="DOB" HeaderText="Date of Birth"/>
   <telerik:GridTemplateColumn>
   <ItemTemplate>
            <tr>
            <td colspan="100%">
            <div id="id_<%# Eval("id") %>" style="display: none; position: relative; left: 10px;">
            <telerik:RadGrid ID="View2" runat="server" AutoGenerateColumns="false" Width="400"
                    GridLines="None" >
            <MasterTableView >
                    <Columns>
                    <telerik:GridBoundColumn DataField="fname" HeaderText="First Name" />
                    <telerik:GridBoundColumn DataField="mname" HeaderText="Middle Name" />
                    <telerik:GridBoundColumn DataField="lname" HeaderText="Last Name" />
                    <telerik:GridTemplateColumn>
                    <ItemTemplate>
                    <asp:CheckBox ID="checkselect" runat="server" />
                    </ItemTemplate>
                    <HeaderTemplate>
                    <asp:Button ID="Button4" runat="server" Text="Remove"  CommandName="Split" OnClick="Button4_Click" />
                    </HeaderTemplate>
                    </telerik:GridTemplateColumn>
                    </Columns>
                    </MasterTableView >
             </telerik:RadGrid>
             </div>
             </td>
             </tr>
 </ItemTemplate>
 </telerik:GridTemplateColumn>
 </Columns>
 </MasterTableView>
 </telerik:RadGrid>
   </telerik:RadPageView>
<telerik:RadPageView ID="RadPageView2" runat="server" Width="100%">
 Same Code
 </telerik:RadPageView>
   </telerik:RadMultiPage>
Nencho
Telerik team
 answered on 01 Aug 2013
1 answer
78 views
Hello,

i have a master page and a page with a radwindowmanager
includes the fileexplorer.
The master page includes a script manager.
When accessing the page i receive the following error:
"The registration of UpdatePanel with ID "ajax panel" can not be
canceled
because it was not registered with the ScriptManager.
This can happen if the UpdatePanel was removed from the control
tree
and later added again. This operation is not supported.
Parameter name: updatepanel"

Here is my html code:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" style="display:none;">
                <ContentTemplate>
                    <telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server" Language="de-DE" Skin="Windows7">
    </telerik:RadFileExplorer>
                    </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadWindowManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </asp:Content>

 Where is my mistake?

Thanks
Konstantin Spielmann
Top achievements
Rank 1
 answered on 01 Aug 2013
1 answer
58 views
I am trying to create a grid within a radwindow modal popup.  I have placed a grid within the Content Template tags of the radwindow but when I add settings with the smart tags, they are not added to the design.  Oddly, the grid retains the settings but when I go into run mode, the control does not have them.  Basically, no matter what I do, this is all I ever get:

<telerik:RadWindow ID="radwdwActions" runat="server" Skin="Forest">
                    <ContentTemplate>
                   <telerik:RadGrid ID="radgvwXrefActions" runat="server" CellSpacing="0" GridLines="None"></telerik:RadGrid>
                    
                  
                    </ContentTemplate>
                </telerik:RadWindow>

If I move this grid outside of the radwindow, smart tags work correctly.  I've restarted VS2012 but the issue remains, even if I start over with a new radgrid.
Danail Vasilev
Telerik team
 answered on 01 Aug 2013
11 answers
2.0K+ views
Hi,

I am trying to filter a radgrid from code behind. I have come across two approaches. The first one doesn't work and the second does.

1. This doesnt show the filtered results. It shows all rows. HOwever when I look in the filter control of this column it seems to have set it.

GridColumn
rowStateColumn = rgvFlightsEdit.MasterTableView.GetColumnSafe("RowState");
rowStateColumn.CurrentFilterFunction = GridKnownFunction.NotEqualTo;
rowStateColumn.CurrentFilterValue = "Existing";

rgvFlightsEdit.Rebind();

2. This works:

rgvFlightsEdit.MasterTableView.FilterExpression =
"([RowState] LIKE '%Existing%')";
rgvFlightsEdit.Rebind();

I would prefer the 1st option because it seems to give a little bit more control on the filter function. If I can't get it to work and have to use the second option, where can I find the allowable filter expressions i.e. what else can I use besided 'LIKE'?

Thanks!

Eyup
Telerik team
 answered on 01 Aug 2013
1 answer
137 views
I am using  a RadDatePicker on my page and its working fine. But the probem is when I scroll the page down and then click on the calendar image it displays the calendar somewhere at the top of the page rather then displaying at bottom right of the calendar image. Its only happening in IE, no problem in Firefox though. Not sure what property do I need to set so that even if i scroll the page down and click on caledar image it show display ot the bottom right of the calendar image. Please see below the code I am using.

<telerik:RadDatePicker ID="calFrom" runat="server" Width="140px" AutoPostBack="true" DateInput-EmptyMessage="MinDate" MinDate="01/01/2000" Skin="WebBlue"  PopupDirection="BottomRight" >
   <Calendar>
     <SpecialDays>
        <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday">
        </telerik:RadCalendarDay>
      </SpecialDays>
   </Calendar>
</telerik:RadDatePicker>

Your help is much appreciated.
Thanks
Eyup
Telerik team
 answered on 01 Aug 2013
4 answers
263 views
I have a grid page (using RadControls Q1 201) which has 2 slightly different searches.  One works fine.  The other just displays a single horizontal line instead of the grid.  The code all looks fine, the datasource is being defined correctly, the data retrieval stored procedure returns data if I run it manually.  Is there any way to diagnose this kind of problem where the grid just doesn't render?

Frustrated in Ohio
Andrey
Telerik team
 answered on 01 Aug 2013
4 answers
193 views

Hi Telerik Team,

is the a chance to fake the click at the select-button from JavaScript?
Reason: The user should simply click on an Image (RadBinaryImage) to start uploading Progress (and browse for Image file, of course).

I mean something like this:

function UploadImage() {               
    var upload = $find('<%=RadAsyncUpload1.ClientID%>');
    upload.click();
}

 

Thank you

 

Shinu
Top achievements
Rank 2
 answered on 01 Aug 2013
3 answers
171 views

How to Hide Month Cell in RadMonthYearPicker while datepopupbutton focussed.

 

 

 

 

 

 

 

 

 

 

Eyup
Telerik team
 answered on 01 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?