Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
When I use a RadEditor inside a RadWindow, then clicking the 'W3C' button (for example) opens a modal dialog window inside the RadWindow. When the enclosing RadWindow is fairly small (low resolution monitor), the W3C dialog window dimensions are larger than those of the enclosing RadWindow. The dialog window cannot then be closed because its top bar is outside the visible area of the RadWindow. Maximising the enclosing RadWindow does not bring the dialog window back into view, the top bar of the dialog window remains 'off-screen'.

Is there any way to force modal dialogs inside rad-windows to always open with dimensions that fit inside that RadWindow? I have tried using 'KeepInScreenBounds' but it does not work, as it seems to keep within the browser window, rather than the enclosing frame.
Svetlina Anati
Telerik team
 answered on 14 Jan 2010
5 answers
297 views
I am Using  Telerik V2008.3 1314 .
I am Using Radwindow to edit or Create an Appointment. But i have Problems with the start time Query Parameter.

The javascript on radscheduler is 
var start = formatDate(eventArgs.get_startTime());
for the above, i am getting the start time as 200903160200 where as my PC time is 12:52 pm

So how to get the exact time as clicked on the scheduler and convert to DateTime Object at serverside.?


Peter
Telerik team
 answered on 14 Jan 2010
1 answer
308 views

Hi ,

Hidden filed value not updated on server side if changed by java script

How do i confiqure Hidden Fields in RAdAjaxMAnager

Kali Raj P
Tsvetoslav
Telerik team
 answered on 14 Jan 2010
1 answer
108 views
Hiya. Within SharePoint I am now using the Editor Lite to give users an nicer interface while composing content - which I am then referencing within a Workflow when sending out newsletters. The Workflow is picking up all of the line breaks within the HTML and automatically appending BR tags to tne end of each line - is there anyway that I can extend Editor Lite to automatically remove all line breaks before an Item is saved? Many thanks.
Stanimir
Telerik team
 answered on 14 Jan 2010
2 answers
110 views
Hi,

How do I change the dates marked with red here:
http://test.co3.dk/rune/scheduler.jpg

I am not happy with the format, and need to change it to maybe "Monday, 1." maybe even "Monday 1. january.

I hope someone can help

Thanks
Rune
Rune
Top achievements
Rank 2
 answered on 14 Jan 2010
2 answers
231 views
Hi,

I am using a RadGrid. For this grid AutogenerateColumn = true. I will bind the grid dynamically.
And i am adding FilterTemplate for the columns in "rgridList_ColumnCreated" event.

I have customized the Filters i.e) For String Columns the filter may be 'TextBox' or 'Combo' based on a condition.
For numeric columns filter will be a slider. for this i am have created my own classes which will inherit "ITemplate"

i.e) I have created following classes
GridTextBoxFilterTemplate : ITemplate [ For Textbox Filter ]
GridComboFilterTemplate : ITemplate [ For Combo Filter ]
GridSliderFilterTemplate :ITemplate [ For Slider Filter ]

These filters are working properly

Similarly i have created a class(GridDatePickerFilterTemplate), to filter grid records based on a DateTime column
If i add Filter template for a datetime column it is not added. I don't know y?

 
protected void rgridList_ColumnCreated(object source, Telerik.Web.UI.GridColumnCreatedEventArgs e){ 
            switch (e.Column.ColumnType) {   
                case "GridBoundColumn": 
                    GridBoundColumn boundColumn = e.Column as GridBoundColumn; 
                    GridTextBoxFilterTemplate lObjTextBoxFilterTemplate; 
                    GridComboFilterTemplate lObjComboFilterTemplate; 
                    GridSliderFilterTemplate lObjSliderFilterTemplate; 
                    GridDatePickerFilterTemplate lObjRadDateTimePicker; 
  
                            if (boundColumn.DataType == Type.GetType("System.String")){ 
  
                                if(dtSource.DefaultView.ToTable(true, boundColumn.UniqueName).Rows.Count > WebConfig.TextBoxFilter){ 
                                    //To add textbox as in filter template for string columns 
                                    lObjTextBoxFilterTemplate = new GridTextBoxFilterTemplate(); 
                                    lObjTextBoxFilterTemplate.ColumnName = boundColumn.UniqueName; 
                                    if (htFilter[boundColumn.UniqueName] != null) 
                                    //To maintain existing filter value 
                                    lObjTextBoxFilterTemplate.FilterValue = Convert.ToString(htFilter[boundColumn.UniqueName]); 
                                    else 
                                        lObjTextBoxFilterTemplate.FilterValue = ""; 
                                    lObjTextBoxFilterTemplate.TableViewClientId = rgridList.MasterTableView.ClientID; 
                                    boundColumn.FilterTemplate = lObjTextBoxFilterTemplate; 
                                } 
                                else{ 
                                //To add combo as in filter template for string columns 
                                lObjComboFilterTemplate = new GridComboFilterTemplate(); 
                                dtSource.DefaultView.Sort = boundColumn.UniqueName; 
                                lObjComboFilterTemplate.DataSource = dtSource.DefaultView.ToTable(true, boundColumn.UniqueName); 
                                lObjComboFilterTemplate.DataTextField = boundColumn.UniqueName; 
                                lObjComboFilterTemplate.DataValueField = boundColumn.UniqueName; 
                                  
                                if (htFilter[boundColumn.UniqueName] != null) 
                                    //To maintain existing filter value 
                                    lObjComboFilterTemplate.FilterValue = Convert.ToString(htFilter[boundColumn.UniqueName]);//boundColumn.CurrentFilterValue 
                                lObjComboFilterTemplate.TableViewClientId = rgridList.MasterTableView.ClientID; 
  
                                boundColumn.FilterTemplate = lObjComboFilterTemplate; 
                                } 
                            } 
                            else if (boundColumn.DataType == Type.GetType("System.Int16") || 
                                boundColumn.DataType == Type.GetType("System.Int32") || 
                                boundColumn.DataType == Type.GetType("System.Int64") || 
                                boundColumn.DataType == Type.GetType("System.Decimal") || 
                                boundColumn.DataType == Type.GetType("System.Double")){ 
                                //To add slider in filter template for numeric columns 
                                lObjSliderFilterTemplate = new GridSliderFilterTemplate(); 
                                lObjSliderFilterTemplate.ColumnName = boundColumn.UniqueName; 
                                lObjSliderFilterTemplate.StartValue = Convert.ToInt32(Session["startSlider"]); 
                                lObjSliderFilterTemplate.EndValue = Convert.ToInt32(Session["endSlider"]); 
                                  
                                dtSource.DefaultView.Sort = boundColumn.HeaderText + " DESC"; 
                                //DataRow dr = dtSource.Select("Max('[" + boundColumn.HeaderText + "]')")[0]; 
                                lObjSliderFilterTemplate.MaxValue = Convert.ToInt32(dtSource.DefaultView[0][boundColumn.HeaderText]); 
                                boundColumn.FilterTemplate = lObjSliderFilterTemplate; 
                            } 
                    break; 
                case "GridDateTimeColumn": 
                    //To assign DataFormatString for DateTime columns 
                    GridDateTimeColumn dateColumn = e.Column as GridDateTimeColumn; 
                    dateColumn.DataFormatString = "{0:MM/dd/yyyy}"; 
  
                                    //To add filter template 
                                    lObjRadDateTimePicker = new GridDatePickerFilterTemplate(); 
                                    lObjRadDateTimePicker.ColumnName = dateColumn.UniqueName; 
                                    if (htFilter[dateColumn.UniqueName] != null) 
                                    //To maintain existing filter value 
                                    lObjRadDateTimePicker.FilterValue = Convert.ToString(htFilter[dateColumn.UniqueName]); 
                                    else 
                                        lObjRadDateTimePicker.FilterValue = ""; 
                                    lObjRadDateTimePicker.TableViewClientId = rgridList.MasterTableView.ClientID; 
                                    dateColumn.FilterTemplate  = lObjRadDateTimePicker; 
  
                    break; 
            } 
        }  


Help me in this.........
How to add a FilterTemplate for a 'GridDateTimeColumn' by programmatic?

Thanks,
Ravi AG
Rohit
Top achievements
Rank 1
 answered on 14 Jan 2010
1 answer
243 views
I have a RadDatePicker that if the user changes the date I have a confirm message to ask if the want to change the date.
If they click no I want to change the date back to its original value.
In my java script I have
var datepicker = $find("datePicker");
datepicker.set_selectedDate(args._oldDate);

when I set the selected date the function is called again and I am stuck in an Infinate loop since everytime I am setting the selected date in javascript the function is calling its self. I just want it so that if the user clicks no that the date will not change. I haven't been able to find anything on this site to fix it.

Thanks
Shinu
Top achievements
Rank 2
 answered on 14 Jan 2010
2 answers
110 views
I have RadRotator in my Home page and here is the following code.

                    <telerik:RadRotator ID="RadRotator1" runat="server" Width="400" ItemWidth="400" Height="300" ItemHeight="300"
                        RotatorType="AutomaticAdvance" SlideShowAnimation-Duration="1000">
                        <ItemTemplate>
                            <asp:Image CssClass="itemTemplate" ID="Image1" runat="server" ImageUrl='<%# "images/SlideShow/" & DataBinder.Eval(Container.DataItem, "cd_value") %>' AlternateText='<%# DataBinder.Eval(Container.DataItem, "ds_description") %>' />
                        </ItemTemplate>
                    </telerik:RadRotator>

Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
             'Load Slide Show Images
            RadRotator1.DataSource = Dataset.Tables(0)
            RadRotator1.DataBind()
    End Sub

When i visit the home page first time everything works fine but if i navigate to contactus page and come back to Home page i can't see the RadRotator image again but HTML has entry for images. I also see Javascript error invalid argument.



Any help will be really helpful, as we are close to project deadline. Thanks
Harah Day
Top achievements
Rank 1
 answered on 13 Jan 2010
1 answer
78 views

 

 

Version: 2009.3.1208.35

Dim
FindNode As RadTreeNode = Me.RadTreeViewTerritories.Nodes.FindNodeByValue(46)

Comes back set to Nothing, but if I set a break point and debug the object using the Immediate Window
this is the results, it finds it.  Node has 3 levels.

 

? RadTreeViewTerritories.Nodes.FindNodeByValue(46)

Nothing

? RadTreeViewTerritories.Nodes(0).Nodes(0).Nodes.FindNodeByValue(46) .Text

"Node 5"

Looks like it won't transverse the node tree.
What I'm doing wrong?

FYI: What I'm trying to do is rename the Node from a textbox and have it refresh (Server Side)

Thanks
John

 

 

John Adkins
Top achievements
Rank 1
 answered on 13 Jan 2010
3 answers
203 views
I am working with emulating the RadGrid demo found here: Grid Demo - Hierarchy.  I am able to attach to the w3wp.exe process to debug and even get inside the event 'ItemDataBound' when it is raised.  Instead of using the control SQLDataSource I in turn am using a DataSet populated with DataTables.  Here is my code for my webpart:

        protected override void CreateChildControls()  
        {  
            base.CreateChildControls();  
 
            try 
            {  
                da = new DataAccess();  
 
                strArea = "SubSite Name";  
                strListName = "List Name";  
                strView = "All Documents";  
 
                ds = da.GetListData(strArea, strListName, strView);  
 
                this.EnsureUpdatePanelFixups();  
                UpdatePanel up = new UpdatePanel();  
                up.ID = "UpdatePanel1";  
                up.ChildrenAsTriggers = true;  
                up.UpdateMode = UpdatePanelUpdateMode.Conditional;  
                this.Controls.Add(up);  
 
                //  Example of adding RadGrid to Moss 2007 site using a RadGrid  
                // *************************************************************  //  
                rdDocs = new RadGrid();  
                rdDocs.ID = "rdDocs";  
 
                rdDocs.DetailTableDataBind += new GridDetailTableDataBindEventHandler(rdDocs_DetailTableDataBind);  
                rdDocs.ItemCommand += new GridCommandEventHandler(rdDocs_ItemCommand);  
                rdDocs.ItemDataBound += new GridItemEventHandler(rdDocs_ItemDataBound);  
 
                rdDocs.PageSize = 30;  
                rdDocs.AllowPaging = true;  
                rdDocs.AllowSorting = true;  
                rdDocs.GridLines = GridLines.None;  
                rdDocs.ShowStatusBar = true;  
                rdDocs.PagerStyle.Mode = GridPagerMode.NumericPages;  
 
                rdDocs.AutoGenerateColumns = false;  
 
                GridBoundColumn gbcID = new GridBoundColumn();  
                GridBoundColumn gbcLinkFileName = new GridBoundColumn();  
                GridBoundColumn gbcPrimaryPOC = new GridBoundColumn();  
 
                gbcID.DataField = "ID";  
                gbcID.HeaderText = "Document ID";  
                gbcID.Visible = false;  
 
                gbcLinkFileName.DataField = "LinkFilename";  
                gbcLinkFileName.HeaderText = "Documents";  
 
                gbcPrimaryPOC.DataField = "Primary_x0020_POC";  
                gbcPrimaryPOC.HeaderText = "Primary POC";  
 
                rdDocs.Columns.Add(gbcID);  
                rdDocs.Columns.Add(gbcLinkFileName);  
                rdDocs.Columns.Add(gbcPrimaryPOC);  
 
                rdDocs.Width = Unit.Percentage(95);  
                rdDocs.DataSource = ds.Tables[0];  
                rdDocs.DataBind();  
 
                up.ContentTemplateContainer.Controls.Add(rdDocs);  
 
                // *************************************************************  //  
 
                //  Example of adding RadGrid to Moss 2007 site using a RadGrid  
                // *************************************************************  //  
                GridTableView rdSndPOCs = new GridTableView();  
                GridTableViewRelation gtvrSndPOCs = new GridTableViewRelation();  
 
                rdSndPOCs.ID = "rdSndPOCs";  
                rdSndPOCs.Caption = "Secondary POCs";  
 
                GridRelationFields grfSndPOCs = new GridRelationFields();  
                grfSndPOCs.DetailKeyField = "ID";  
                grfSndPOCs.MasterKeyField = "ID";  
 
                rdDocs.MasterTableView.ParentTableRelation.Add(grfSndPOCs);  
 
                gtvrSndPOCs.Add(grfSndPOCs);  
 
                rdSndPOCs.PageSize = 30;  
                rdSndPOCs.AllowPaging = true;  
                rdSndPOCs.AllowSorting = true;  
                rdSndPOCs.GridLines = GridLines.None;  
                rdSndPOCs.PagerStyle.Mode = GridPagerMode.NumericPages;  
 
                rdSndPOCs.AutoGenerateColumns = false;  
 
                gbcID = new GridBoundColumn();  
                GridBoundColumn gbcSecondaryPOC = new GridBoundColumn();  
 
                gbcID.DataField = "ID";  
                gbcID.HeaderText = "Document ID";  
                gbcID.Visible = true;  
 
                gbcSecondaryPOC.DataField = "SecondaryPOC";  
                gbcSecondaryPOC.HeaderText = "Secondary POC";  
 
                rdSndPOCs.Columns.Add(gbcID);  
                rdSndPOCs.Columns.Add(gbcSecondaryPOC);  
 
                rdSndPOCs.Width = Unit.Percentage(95);  
                rdSndPOCs.DataSource = ds.Tables[1];  
                rdSndPOCs.DataBind();  
 
                rdDocs.MasterTableView.DetailTables.Add(rdSndPOCs);  
                 
            }  
            catch (Exception ex)  
            {  
                Context.Response.Write(ex.Message);  
            }  
        }  
 
 void rdDocs_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)  
            {  
                string str = "";  
            }  
 
            void rdDocs_ItemDataBound(object sender, GridItemEventArgs e)  
            {  
                strTest += e.Item.ItemIndex + "<br>";  
            }  
 
            void rdDocs_ItemCommand(object source, GridCommandEventArgs e)  
            {  
                //throw new NotImplementedException();  
                if (e.CommandName == "ExpandCollapse")  
                {  
                    DataTable dt = (DataTable)e.Item.OwnerTableView.DataSource;  
                    if ((dt != null) && (dt.TableName == "DocTable"))  
                    {  
                        GridTableView detailView = (e.Item as GridDataItem).ChildItem.NestedTableViews[1];  
                        detailView.Visible = false;  
                    }  
                }  
            } 

The link between the two tables (Tables are named "DocTable" and "SPOCTable") is the column "ID".  When this control is displayed on the page, the first table shows up fine.  The second table however, doesnt show up at all.  The hierarchal demo is really cool and useful for what we want but I just do not understand what is going on.

J
J
Top achievements
Rank 1
 answered on 13 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?