Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 views
Dear All,

I have a problem which I cannot solve at the moment.  I have a RadGrid with an ImageButton, called btnEdit, and basically what I want is once this is clicked, a Modal Popup appears with all the data populated in the Popup.  Without the RadAjaxManager, everything works fine and the Popup populates.  So that is why I am asking some help, because I do not know how to set this up.

So my code is as follows:-

                                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                                        <AjaxSettings>
                                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                                <UpdatedControls>
                                                    <telerik:AjaxUpdatedControl ControlID="pnlRadGrid" LoadingPanelID="RadAjaxLoadingPanel1"/>
                                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>
                                                </UpdatedControls>
                                            </telerik:AjaxSetting>
                                            <telerik:AjaxSetting AjaxControlID="btnEdit">
                                                <UpdatedControls>
                                                    <telerik:AjaxUpdatedControl ControlID="pnlRadGrid" LoadingPanelID="RadAjaxLoadingPanel1"/>
                                                    <telerik:AjaxUpdatedControl ControlID="btnEdit" LoadingPanelID="RadAjaxLoadingPanel1"/>
                                                </UpdatedControls>
                                            </telerik:AjaxSetting>
                                        </AjaxSettings>
                                    </telerik:RadAjaxManager>
                                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="50">
                                        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
                                    </telerik:RadAjaxLoadingPanel>

The RadGrid is something like this:-

                                   <asp:Panel ID="pnlRadGrid" runat="server">
                                        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"
                                        ShowGroupPanel="True" Skin="Sunset" AutoGenerateColumns="False"
                                        onitemdatabound="RadGrid1_ItemDataBound" GroupHeaderItemStyle-Font-Bold="true"
                                        GroupHeaderItemStyle-HorizontalAlign="Left" OnItemCommand="RadGrid1_ItemCommand">
                                        <MasterTableView DataKeyNames="productId,releaseId,projectid" >
                                        <GroupByExpressions>
                                            <telerik:GridGroupByExpression>
                                                <SelectFields>
                                                    <telerik:GridGroupByField FieldAlias="ReleaseName" FieldName="ReleaseName" HeaderText="Release" />
                                                </SelectFields>
                                                <GroupByFields>
                                                    <telerik:GridGroupByField FieldAlias="ReleaseName" SortOrder="Ascending" FieldName="ReleaseName"  />
                                                </GroupByFields>
                                            </telerik:GridGroupByExpression>
                                        </GroupByExpressions>
                                        <RowIndicatorColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                        </RowIndicatorColumn>

                                        <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                        </ExpandCollapseColumn>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="productID" DataType="System.Int16"
                                                HeaderText="productID" SortExpression="productID" UniqueName="productID" Visible="false">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="productName" HeaderText="productName"
                                                SortExpression="productName" UniqueName="productName" Visible="false">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="projectId" DataType="System.Int16"
                                                HeaderText="projectId" SortExpression="projectId" UniqueName="projectId" Visible="false">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn UniqueName="TemplateColumn2" GroupByExpression="ProjectName"
                                                    SortExpression="ProjectName" HeaderText="ProjectName">
                                                    <HeaderStyle Width="241px"></HeaderStyle>
                                                    <ItemStyle Height="35px"></ItemStyle>
                                                    <ItemTemplate>
                                                        <%# DataBinder.Eval(Container.DataItem, "ProjectName") %>
                                                    </ItemTemplate>
                                            </telerik:GridTemplateColumn>                
                                            <telerik:GridTemplateColumn UniqueName="TemplateColumn2" GroupByExpression="baseRefUrl"
                                                    SortExpression="baseRefUrl" HeaderText="baseRefUrl">
                                                    <HeaderStyle Width="241px"></HeaderStyle>
                                                    <ItemStyle Height="35px"></ItemStyle>
                                                    <ItemTemplate>
                                                        <%# DataBinder.Eval(Container.DataItem, "baseRefUrl")%>
                                                    </ItemTemplate>
                                            </telerik:GridTemplateColumn>                

                                            <telerik:GridTemplateColumn UniqueName="TemplateColumn2" HeaderText="Edit">
                                                    <HeaderStyle Width="241px"></HeaderStyle>
                                                    <ItemStyle Height="35px"></ItemStyle>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/images/edit.gif" CommandName="EditHandoff" />
                                                    </ItemTemplate>
                                            </telerik:GridTemplateColumn>   
                                            <telerik:GridTemplateColumn UniqueName="TemplateColumn2" HeaderText="Delete">
                                                    <HeaderStyle Width="241px"></HeaderStyle>
                                                    <ItemStyle Height="35px"></ItemStyle>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/images/delete.gif" CommandName="DeleteHandoff"
                                                            OnClientClick="if (!confirm('Are you sure you want to delete this Handoff?')) return false;" />
                                                    </ItemTemplate>
                                            </telerik:GridTemplateColumn>                
                                            <telerik:GridBoundColumn DataField="fk_projectStatus" DataType="System.Byte"
                                                HeaderText="fk_projectStatus" SortExpression="fk_projectStatus"
                                                UniqueName="fk_projectStatus" Visible="false">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                        </MasterTableView>

                                        <HeaderStyle Font-Bold="True" ForeColor="White" />

                                        <GroupHeaderItemStyle Font-Bold="True" HorizontalAlign="Left" />

                                        <FilterMenu Skin="Sunset" EnableTheming="True">
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </FilterMenu>
                                    </telerik:RadGrid>
                                    </asp:Panel>

And in the code behind I have the following:-

        if (e.CommandName == "EditHandoff")
        {
            //EditHandoff(iIndex);
            ModalPopupExtender mpe = ModalPopupExtender1;

            if (_productTreeList[iIndex].projectName != null)
                txtHandoffName.Text = _productTreeList[iIndex].projectName.ToString();
            if (_productTreeList[iIndex].baseRefUrl != null)
                txtBaseRefUrl.Text = _productTreeList[iIndex].baseRefUrl.ToString();
            if (_productTreeList[iIndex].url != null)
                txtUrl.Text = _productTreeList[iIndex].url.ToString();

            mpe.Show();

        }

In the Page_Load I also have:-
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(pnlRadGrid, RadGrid1, RadAjaxLoadingPanel1);

Can you please tell me what I am doing wrong?
Thanks a lof for your help and time

Johann






Pratik Bhatt
Top achievements
Rank 1
 answered on 15 Jun 2011
1 answer
90 views
I really like this feature of the DatePicker but I have a gripe.

I am working with British (en-GB) date format - day/month/year. If I enter the following string into the date input box, '12/32/2011' then this is seen as an invalid date string. If however I enter the following erroneous date string '12/13/2011'(meaning the twelth day of the thireteenth month of the year), the built-in validation mechanism seems to treat it as if it had been entered in en-US format (meaning the thirteenth day of the twelth month) and redisplays it as '13/12/2011'. It does not see this date string as invalid.

So, to catch this type of input error I have to validate the input string using the DateInput's client side 'OnValueChanged' event.

It would be so much nicer if Telerik could provide a user option which allowed me to select either the current 'corrective' behaviour or a 'strict' behaviour that trapped any inconsistencies in a date string.

Rgds

Len Jones
Maria Ilieva
Telerik team
 answered on 15 Jun 2011
4 answers
81 views
Hi, I'm having strange issue, which I don't know how to resolve.
I have 3 panels on my page: left, middle and right
On left there are combo with filters (rad combo ones), ajaxified with following way:


<telerik:RadAjaxManagerProxy ID="rAjaxManagerProxy" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="left">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="left" />
                <telerik:AjaxUpdatedControl ControlID="middle" LoadingPanelID="ralMain" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="middle">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="middle" />
                <telerik:AjaxUpdatedControl ControlID="right" LoadingPanelID="ralMain" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
Evewrything is working like a charm when I'm using firefox, chrome or IE 9. The problem starts with IE8. After search on left panel, everything is displayed but combo is loosing its items. It is not happening if I'm not using ajax. Without ajax everything is working exept it it is no ajaxified. I'm filling values from database on page_load:

protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack)
            {
                return;
            }
 
            this.rcbIndustry.DataSource = GetIndustries();
            this.rcbIndustry.DataBind();
            this.rcbIndustry.Items.Insert(0, new RadComboBoxItem());
         
            this.rcbCustomer.DataSource = GetCustomers();
            this.rcbCustomer.DataBind();
            this.rcbCustomer.Items.Insert(0, new RadComboBoxItem());
            
        }

On the beginning I thought it is related to not filling value if this is postback, but removing this check not helping. It is really strange because all comboboxes on such page are stopping working on IE.

I looked to the page code using F12 on IE 8, and it s look like whole section for drop down is such case is missing.
Do you have any advice?

I just notice that this happen on all my comboboxes with website. If there is any ajax request e.g. through the ajaxpanel, combobox dropdown disapears  in IE 8.

I'm using version: 2011.1.413.40

Update

I think I know what it is: I'm having folloing peace of code i master page in head section:

<!--[if !IE]>-->
    <link href="Non-IE_themes/Telerik_nonIE.css" rel="stylesheet" type="text/css" />
    <!--<![endif]-->
      <!--[if gte IE 9]>
    <link href="Non-IE_themes/Telerik_nonIE.css" rel="stylesheet" type="text/css" />
    <![endif]-->

which contains following css:
.RadComboBoxDropDown .rcbScroll
{
    height: 100% !important;
    max-height: 300px;
}

When this is section is added it is causing problems on IE 8. (IE 7 compatibility is working). When removed IE 8 is working... but other browsers have issue related to this css fix. :(

Update 2

Even removing this sentense from css won't help. Problem is on master page conditional statement. Only removing from master page helps.
Marcin
Top achievements
Rank 1
Veteran
 answered on 15 Jun 2011
1 answer
125 views
Hi everybody,
I am using a Radgrid in my application with multiple type of data,I want to use a password GridBoundColumn and do not show the entering password to the user.
It can be done in RadTextBox with this attribue:
TextMode="Password"
but I didnt found the similar way for RadGrid Data Columns.
Princy
Top achievements
Rank 2
 answered on 15 Jun 2011
2 answers
98 views
hello

I use radnumericTextbox in mode Currency

in this mode,after numbers,it put currency Sign near numbers

I want users don't see this symbol.numbers group by with comma but didn't put symbol
for example user enter 125000 and see 125,000$ but I want users see 125,000

please help me how can I do that
Maria Ilieva
Telerik team
 answered on 15 Jun 2011
1 answer
65 views
Currently I'm facing a strange issue with RadGrid and  RadAjaxManager. While using the paging functionality everything works fine as after the page is loaded or refreshed. But as soon as I start using the pager and change the pages the page size drop down gets disabled.

It does not happen if I don't use RadAjaxManager, but in return I get an annoying page refresh which I'm trying to avoid.
At the moment I was able to solve this issue with ajax UpdatePanel but I'd rather stick with Telerik components if I can.

Do you have any idea what's going on here?

Thanks,
Sam
Pavlina
Telerik team
 answered on 15 Jun 2011
1 answer
115 views
Hi,

I've got a RadScheduler with a customized Advanced Edit Form in place, and everything works fine when adding/editing appointments via double-clicking. However, I now need to launch the Advanced Form server-side, and I'm unable to do so successfully. I'm using ShowAdvancedEditForm() to launch it, and when tracing through execution I can see that everything in AdvancedForm.ascx is being run as expected, but the Form is never displayed. Instead, the user is returned to the RadScheduler without any visible change.

Any suggestions as to what I might be doing wrong? I've attached the relevant server-side method below, along with my RadScheduler definition from the page itself. I'm guessing it's because I'm not handling the server-side OnFormCreated event, but after looking at the demos and documentation, I'm at a loss at to what I'd have to do in order to handle it.

private bool EditAppointment(string appointmentID)
{
    // Load the existing Appointment
    Guid appointmentGuid = new Guid(appointmentID);
    Appointment editApt = RadScheduler_Main.Appointments.FindByID(appointmentGuid);
    if (editApt == null)
    {
        return false;
    }
    RadScheduler_Main.ShowAdvancedEditForm(editApt);
    return true;
}

<telerik:RadScheduler ID="RadScheduler_Main" runat="server" StartInsertingInAdvancedForm="true" MinutesPerRow="15"
            Height="80%" SelectedView="TimelineView" FirstDayOfWeek="Monday" OnAppointmentInsert="RadScheduler_Main_AppointmentInsert"
            OnClientFormCreated="schedulerFormCreated" GroupingDirection="Vertical" OnClientAppointmentClick="OnClientAppointmentClick"
            OnAppointmentUpdate="RadScheduler_Main_AppointmentUpdated" OverflowBehavior="Scroll" AppointmentContextMenuSettings-EnableDefault="true"
            OnFormCreated="RadScheduler_Main_OnFormCreated">
            <AdvancedForm Modal="true" />
            <Reminders Enabled="false" />
            <TimelineView NumberOfSlots="5" />
              
            <ResourceStyles>
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryOrange" Text="ELN" />
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryGreen" Text="Reporting" />
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryYellow" Text="Stability" />
                <telerik:ResourceStyleMapping Type="App" ApplyCssClass="rsCategoryBlue" Text="Sample Tracker" />
            </ResourceStyles>
            <AdvancedEditTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
                    Subject='<%# Bind("Subject") %>'
                    Start='<%# Bind("Start") %>'
                    End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                    ApplicationID = '<%# Bind("Applicationid") %>'
                    Task='<%# Bind("Taskid") %>' />
            </AdvancedEditTemplate>
            <AdvancedInsertTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Insert"
                    Subject='<%# Bind("Subject") %>'
                    Start='<%# Bind("Start") %>'
                    End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' 
                    ApplicationID = '<%# Bind("Applicationid") %>'/>
            </AdvancedInsertTemplate>
        </telerik:RadScheduler>
Plamen
Telerik team
 answered on 15 Jun 2011
1 answer
176 views
Hi

I have a master/detail ASP.NET setup with a grid in the middle cell of the master/detail setup. Below is the setup of the grid. When I drag a column up to be grouped, the grid shrinks from a horizontal scrollable grid to one where all the columns are shrunk so that they fit without scrolling. Searched high and low for the necessary setting but to no avail.

Before and after images attached

Help appreciated

   <telerik:RadGrid ID="RadGridData" runat="server" 
    AllowFilteringByColumn="True" AllowSorting="True" GridLines="None" 
    ShowGroupPanel="True" AllowPaging="True" 
        onneeddatasource="RadGridData_NeedDataSource" PageSize="25" 
        ShowStatusBar="True" ViewStateMode="Enabled">
        <MasterTableView Width="100%" Height="100%">
        </MasterTableView>
       <ClientSettings AllowDragToGroup="True" AllowAutoScrollOnDragDrop="False">
           <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" />
       </ClientSettings>
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
</MasterTableView>
  
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
    </telerik:RadGrid>
Pavlina
Telerik team
 answered on 15 Jun 2011
1 answer
76 views
Hello,

We have recently added the following functionality to a radgrid per the example below:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandcombo/defaultcs.aspx?product=grid

This is working perfectly, however we would like the column filtering to be limited to the available results after a filter.
With the current setup the column filter options are for the entire dataset.

Is it possible for us to limit to the column results to allow for further filter granularity?

One way we thought may work would be to grab the data from the grid after the filter and allow the column to query it for the column filtering options... we were not able to get the datasource of the grid after the filter.

Any suggestions?

Thanks.
Pavlina
Telerik team
 answered on 15 Jun 2011
1 answer
52 views
Please take a look at the pic below, as you can see, I have resized my page to fit within the windows, however, the horizontal scroller (as I have marked red), still show up like that (looks like my page is so so horizontally large), it makes my Visual Studio become hang sometime, due to the fact the page is so "large". Please help me how to fix it.

http://imageshack.us/f/577/screenshotva.png

* I noticed that it's happen whenever I drop in any RadComboBox in the page. (The problem is gone after I remove ALL the RadComboBox on the page). Is it a bug within RadComboBox?
Dimitar Terziev
Telerik team
 answered on 15 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?