Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
165 views
Hi, I am using raddock with iframe inside. When I am drag'n'droping raddock to different position - iframe content disappears and when I release raddock to the target place - the page inside iframe is being reloaded! Why? I don't want this... How to prevent reloading iframe page and disappearing its content in the moment of dragging the raddock?
Slav
Telerik team
 answered on 04 Oct 2011
6 answers
77 views
Hai,

I have user control in which i have RadTabStrip with two tabs.

Under Each tab there is user control again. 

My concern is

when i load parent user control both the user controls are loading .

And both the user controls are having the grids
When i click the refresh button of Grid then also both the user controls are loading




Below is my code

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RCRAAIPermitBaseContent.ascx.cs" 
Inherits="CGI.ESG.TEMPO.Web.ContentControls.SubjectItemDetails.RCRAAIPermitBaseContent" %>


<%@ Register Src="~/ContentControls/SubjectItemDetails/RCRAAIPermitBaseOpContent.ascx"
    TagPrefix="OperationDatesandWasteStreams" TagName="RCRAAIPermitBaseOpContentControl" %>


<%@ Register Src="~/ContentControls/SubjectItemDetails/RCRAAIPermitBasePerContent.ascx"
    TagPrefix="ExistingPermitsandComments" TagName="RCRAAIPermitBasePerContentControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadTabStrip ID="pnlTab" runat="server" Align="Left" MultiPageID="RadMultiPage1"
    ReorderTabsOnSelect="true" SelectedIndex="0">
    <Tabs>
        <telerik:RadTab Text="Operation Dates and Waste Streams" runat="server">
        </telerik:RadTab>
        <telerik:RadTab Text="Existing Permits and Comments" runat="server">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>


<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">


    <telerik:RadPageView ID="OperationDatesandWasteStreamsPage" runat="server">
         <OperationDatesandWasteStreams:RCRAAIPermitBaseOpContentControl ID="RCRAAIPermitBaseOpContentControl"
            runat="server" />        
    </telerik:RadPageView>


    <telerik:RadPageView ID="ExistingPermitsandCommentsPage" runat="server">
       <ExistingPermitsandComments:RCRAAIPermitBasePerContentControl ID="RCRAAIPermitBasePerContentControl"
            runat="server" />       
    </telerik:RadPageView>


</telerik:RadMultiPage>


Please help to resolve the issue.
Princy
Top achievements
Rank 2
 answered on 04 Oct 2011
5 answers
185 views
The documentation for the grid filtering mechanism indicates that the IsEmpty filter option will return results where ColumnName = '', but I can't seem to get this to work.  Every time I select IsEmpty, it returns an empty grid.  All other filter options work but this one.  I'm populating the grid using NeedDataSource by populating a data table with the results from a SQL data table and setting the grid data source to the table.  Am I missing something or do I need to reconsider my approach to populating the data to get this filter to work?  It's critical to my clients to able to utilize this feature as a large portion of their use of the grid is to identify incomplete data records.

Matt DiPietro
Top achievements
Rank 1
 answered on 04 Oct 2011
4 answers
131 views
Hi,

    i am using radgrid with usercontrol edit form and modal popup edit mode. the popup is not getting displayed properly when i try to run the page in Internet Explorer 6. since the property is modal i cannot do any thing in the page. Kindly guide me incase any settings in the browser need to be changed. it is an important requirement.

Regards,
Saravanan K
July
Top achievements
Rank 2
 answered on 04 Oct 2011
2 answers
36 views
I have a problem with Popup EditMode.
In Ie doesnt work. The popup appear under gray..
How I can fix this?
July
Top achievements
Rank 2
 answered on 04 Oct 2011
3 answers
94 views
Hello,

I have a page in which I have placed couple of ASP.NET standard validators which work on text boxes and ask user to enter a value if its empty such as "enter name", there is also a custom validator which checks the RadUpload control for valid extentions, I have used this JavaScript function to cause extention validation.

 

function ValidateUpDetails(source, arguments) {

 

arguments.IsValid = getRadUpload(

'<%# upDetails.ClientID %>').validateExtensions();

 

}

and called this on ClientValidationFunction of custom validator. Now I have a requirement in which I would like to click on a button and that button takes text from email text box and checks the database for records containing that email address, Even if user does not fill other textboxes and only fill email textbox and click on check button it should bring the results via Ajax call and populate the Grid. I have designed all the functionality and it also works but the problem is on Ajax call the validators also work which I don't want and a javascript error also pop up saying 'null' is null or not an object and this error is because of the custom validation function shown above.

I am using AjaxManager and configured it to work on button click and selected the grid and sqldatasource as items for updating, in sqldatasource I decalared a variable @email for which I defined my email textbox as source control.

Is there anyway to make an ajax call without activating validators ? I hope I explained it properly, I am fairly new with ASP.NET and RadControls, I am/was a PHP programmer so all this stuff is new for me.

Thanks.

Kevin
Top achievements
Rank 2
 answered on 04 Oct 2011
2 answers
127 views
Hi,

I have Raddock with my custom logic as appointment form over Scheduler. It works well except for one little issue.

I have checkbox on the Raddock that fires full postback (I use event CheckedChanged event for hiding/showing more controls). For some reason upon that full postback my Raddock form shifts from the center to the upper left corner. I would appreciate if you could advise how to keep Raddock position intact upon full postbacks. Thanks! See below my design view of aspx page:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">


<script type="text/javascript">
function openForm() {
var dock = $find("<%= RadDock1.ClientID %>");
// Center the RadDock on the screen
var viewPort = $telerik.getViewPortSize();
var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);
var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);
$telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });


dock.set_closed(false);


Sys.Application.remove_load(openForm);
}


function hideForm() {
var dock = $find("<%= RadDock1.ClientID %>");
dock.set_closed(true);


return true;
}


function dockMoved(sender, args) {
//Return RadDock to his original HTML parent so it gets updated via ajax
$get("<%= DockPanel.ClientID %>").appendChild(sender.get_element());
}

</script>


</telerik:RadScriptBlock>
<asp:UpdatePanel runat="server" ID="UpdatePanel1" ChildrenAsTriggers="true" >
<ContentTemplate>
<asp:Panel runat="server" ID="DockPanel">
<telerik:RadDock runat="server" ID="RadDock1"  Skin="Windows7" Width="800px" Height="600px" Closed="true"
Style="z-index: 2000;" Title="Appointment" OnClientDockPositionChanged="dockMoved" >
  
<ContentTemplate>


<asp:CheckBox ID="chkAllDay" runat="server" Checked = "true" AutoPostBack="true" Text="All Day" />

</ContentTemplate>


</telerik:RadDock>
</asp:Panel>




<telerik:RadScheduler ID="RadScheduler1" runat="server"  Skin="Windows7" DataEndField="End" DataKeyField="ID"
DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" 
DataDescriptionField="Description"
DataSourceID="SqlDataSource1" DataStartField="Start" DataSubjectField="Subject"
HoursPanelTimeFormat="htt" OverflowBehavior="Expand" ValidationGroup="RadScheduler1" 
OnFormCreating="RadScheduler1_FormCreating"
StartEditingInAdvancedForm="false"
StartInsertingInAdvancedForm="false"                 
AppointmentContextMenuSettings-EnableDefault="true" 
TimeSlotContextMenuSettings-EnableDefault="true"  SelectedView="MonthView">

</telerik:RadScheduler>
</ContentTemplate>
</asp:UpdatePanel>
Slav
Telerik team
 answered on 04 Oct 2011
4 answers
80 views
Hi,
I create a server control that inherits the grid, I create the templatecolumn dinamically with ItemTemplate and EditItemTemplate
AutoPostBackOnFilter = true;
                      CurrentFilterFunction = Telerik.Web.UI.GridKnownFunction.Contains;
                      ShowFilterIcon = false;
                        
                      HeaderStyle.Width = _width;
                      ItemStyle.Width = _width;
                      ItemStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Right;
                      HeaderTemplate = new MyHeaderTemplate(_type, DataField, _width.Value - CommonParameters.GridFilterWidthDistances, LabelText);                        
                      ItemTemplate = new MyTemplateText(new GridTemplateColumnParameter()
                          .SetColumnType(CommonParameters.RadGridTemplateColumnType.ItemTemplate)
                          .SetDataField(DataField)
                          .SetDataFieldItem(DataFieldItem)
                          .SetWidth(_width.Value - CommonParameters.GridFilterWidthDistances)
                          .SetReadOnlyOn(_readOnlyOn)
                          );
                      EditItemTemplate = new MyTemplateText(new GridTemplateColumnParameter()
                          .SetColumnType(CommonParameters.RadGridTemplateColumnType.EditItemTemplate)
                          .SetDataField(DataField)
                          .SetDataFieldItem(DataFieldItem)
                          .SetWidth(_width.Value - CommonParameters.GridFilterWidthDistances)
                          .SetReadOnlyOn(_readOnlyOn)
                          .SetRequired(_required)
                          .SetCodice(_codice)
                          .SetMaxLength(_maxLength)
                          .SetLabelText(LabelText)
                          );

The code that create the MyTemplateText is:
private class MyTemplateText : IBindableTemplate
       {
           private TextBox _txb;
           private Label _lbl;
           private GridTemplateColumnParameter _gtcp;
           public MyTemplateText(GridTemplateColumnParameter pGtcp)
           { // Parametert to create label ant text box of the template column
               _gtcp = pGtcp;
           }
           #region IBindableTemplate Members
           public System.Collections.Specialized.IOrderedDictionary ExtractValues(System.Web.UI.Control pContainer)
           {
               OrderedDictionary data = new OrderedDictionary();
               switch (_gtcp.ColumnType)
               {
                     
                   case CommonParameters.RadGridTemplateColumnType.ItemTemplate:
                                           data.Add(_gtcp.DataField, _lbl.Text);
                        break;
                   case CommonParameters.RadGridTemplateColumnType.EditItemTemplate: data.Add(_gtcp.DataField, _txb.Text); break;
               }
               return data;
           }
           #endregion
           #region ITemplate Members
           public void InstantiateIn(System.Web.UI.Control pContainer)
           {
               switch (_gtcp.ColumnType)
               {
                   case CommonParameters.RadGridTemplateColumnType.ItemTemplate:
                       {
                           _lbl = new Label();
                                                     _lbl.CssClass = "ColumnText";
                           _lbl.Width = new System.Web.UI.WebControls.Unit(_gtcp.Width);
                           _lbl.ParentType = CommonParameters.BloccoParentType.RadGrid;
                           _lbl.DataBinding += new EventHandler(Lbl_DataBinding);
                           pContainer.Controls.Add(_lbl);
                       }
                       break;
                   case CommonParameters.RadGridTemplateColumnType.EditItemTemplate:
                       {
                           _txb = new TextBox();
                           _txb.ID = "txb" + _gtcp.DataField;
                           _txb.Width = new System.Web.UI.WebControls.Unit(_gtcp.Width);
                           _txb.DataBinding += new EventHandler(Txb_DataBinding);
                           _txb.MaxLength = _gtcp.MaxLength;
                           switch (_gtcp.ReadOnlyOn)
                           {
                               case CommonParameters.ReadOnlyTemplateMode.All:
                                   {
                                       _txb.ReadOnly = true;
                                   } break;
                               case CommonParameters.ReadOnlyTemplateMode.Item:
                                   {
                                   } break;
                               default: throw new NotImplementedException("ReadOnlyOn non ancora gestita in tutte le tipologie");
                           }
                           pContainer.Controls.Add(_txb);
                           if (_gtcp.Required)
                           {
                               RequiredFieldValidator rfv = new RequiredFieldValidator();
                               rfv.ID = "rfv" + _gtcp.DataField;
                               rfv.CssClass = "ValidatorStyle";
                               rfv.ControlToValidate = "txb" + _gtcp.DataField;
                               rfv.Text = "!";
                               rfv.ErrorMessage = _gtcp.LabelText + " è obbligatorio!";
                               rfv.Display = ValidatorDisplay.Static;
                               pContainer.Controls.Add(rfv);
                                                                                                                     }
                           if (_gtcp.Codice)
                           {
                               RegularExpressionValidator rev = new RegularExpressionValidator();
                               rev.ID = "rev" + _gtcp.DataField;
                               rev.ControlToValidate = "txb" + _gtcp.DataField;
                               rev.Text = "!";
                               rev.CssClass = "ValidatorStyle";
                               rev.ErrorMessage = _gtcp.LabelText + " contiene caratteri non validi!";
                               rev.Display = ValidatorDisplay.Static;
                               rev.ValidationExpression = "^[^\\/*?\"<>|]*$";
                               pContainer.Controls.Add(rev);
                           }
                       } break;
               }
           }
           void Lbl_DataBinding(object sender, EventArgs e)
           {
               Telerik.Web.UI.GridDataItem item = _lbl.NamingContainer as Telerik.Web.UI.GridDataItem;
               if (DataBinder.Eval(item.DataItem, _gtcp.DataField) != null)
               {
                   _lbl.Text = DataBinder.Eval(item.DataItem, _gtcp.DataField).ToString();
                     
                    
               }
           }
           void Txb_DataBinding(object sender, EventArgs e)
           {
               Telerik.Web.UI.GridItem item = _txb.NamingContainer as Telerik.Web.UI.GridItem;
               if (item is Telerik.Web.UI.GridDataItem)
               {
                   object value = DataBinder.Eval(item.DataItem, _gtcp.DataField);
                   if ((value != DBNull.Value) && (value != null))
                   {
                       _txb.Text = value.ToString();
                   }
                   else
                   {
                       _txb.Text = "";
                   }
               }
           }
           #endregion
       }

I use entity framework with automatic insert/update/delete. 
Insert and  Update operations works fine, but Delete NOT ! , the entity tells me a concurrency message ... but it's a false messagge.
Because doing a debug after the "DeleteComand"  the grid "executes"  public System.Collections.Specialized.IOrderedDictionary ExtractValues(System.Web.UI.Control pContainer) "  the grid know the DAtaKeyName and it's the one i choose to delete, but on this function i see the return the LAST ITEM of the page i'm watching on the grid.
Then The entity Class receive a bad information...
So, the question is where is the mistake, ??? I try a telerik standar grid with automatic CRUD operations with entity datasource and everything works as expected, the entity class received information ok.
I hope someone undertand my problem.
Thanks !!!!
archimede
Top achievements
Rank 1
 answered on 04 Oct 2011
1 answer
73 views
Hi,

I realize there is this weird bug happening whenever i use radajaxmanager together with radwindow.

Here is the problem.

whenever i click on the radgrid row, the following function fires :
function show(sender, args){
    winIBRouteRF = $find("<%=winIBRouteRF.ClientID%>");        

    winIBRouteRF.show();

 

}

This works fine until i introduced RadAjaxManager. I couldn't find the reference to the window anymore.
It keeps returning null. The solution to this is if i place the above function outisde of the form tag,
just below </form>. I cannot place this function on the bottom page due to my project requirement.

Actually, not only radwindow, but sometimes, other objects just cannot be found using $find. I have to use
onclientload event in order to get the reference. But unfortunately for radwindow, this event doesn't exist.

I've tried to place the function in Sys.Application.add_load but it doesn't help.

Any suggestions?

Thanks.

PS: I'm not using RadWindowManager, just RadWindow.

Regards,
Dexter

 

 

 

Marin Bratanov
Telerik team
 answered on 04 Oct 2011
1 answer
143 views
Hi

I need to build a custom Appointment Form in a Web-Service based application.
Any Advanced Form sample I found, creating or canceling the edit form produces a postback events (flickering).

Is there any sample how I can create and edit appointments on the client-side using a custom advanced form, without any postback?

Cheers,
Jani
Ivana
Telerik team
 answered on 04 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?