Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
153 views
hi

how can i set  raddatepicker date input blank?

e.g.

if raddatepicker1.selecteddate = cdate(1/1/2010) then i want the date input to be blank

thanks in advance
robertw102
Top achievements
Rank 1
 answered on 15 Mar 2010
2 answers
89 views
I have a grid with the NoMasterRecordsText set. This text is always displayed, even when records are being displayed.

What can I do to fix this?

TIA
Dave Hayward
Top achievements
Rank 1
 answered on 15 Mar 2010
9 answers
425 views

Hi,
    I have to open a rad window on click of image button. But when I click on image button I get the error as
"Microsoft JScript runtime error: 'undefined' is null or not an object". I am not sure why I am getting this error.
I have declared the RadWindow as follows:

<telerik:RadWindow ID="TreatmentDetail" runat="server" Height="412px" Left="10px" ShowContentDuringLoad="false" 
      Modal="true" ReloadOnShow="True" Title="Edit Protocols"  Width="800px" NavigateUrl=""  
      SkinsPath="~/RadControls/Window/Skins" Top="10px" VisibleStatusbar="False" Behavior="None">    
</telerik:RadWindow> 

On image button Click:
Protected Sub imgAddNewTreat_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgAddNewTreat.Click  
            Try 
                Dim NewTreatID As Integer = CType(Session("NewTreatID"), Integer)  
                Session("TreatWindowTitle") = "Add New Treatment" 
                Session("TreatmentMode") = "Add" 
                Session("NewTreatID") = NewTreatID - 1  
                Session("TreatId") = NewTreatID  
                Dim scriptstring As String = "ShowEditForm('" & NewTreatID & "' , 'Add' );" 
                ScriptManager.RegisterStartupScript(Me, Me.GetType, "TreatmentWindow", scriptstring, True)  
            Catch ex As Exception  
 
            End Try 
End Sub 

My Script for getting RadWindow is as follows:
 function ShowEditForm(id, Mode) {  
 
            window.radopen("EditTreatmentProtocol.aspx?Id=" + id + "&Mode=" + Mode, "TreatmentDetail");  
            return false;  
        }  
 

Please help me regarding this.
Its very urgent.

From
Pinkey
Svetlina Anati
Telerik team
 answered on 15 Mar 2010
2 answers
108 views
Reference: http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx

As I have not delved too deeply into this just yet - this question may seem too simple. Based on this demo, how would one go about disabling the inline add function and making the modal show for all Add/Edit functions?  I have read the KB article and see how to manage the advanced template form - just seem to be missing the simple step of disabling inline functions? All noob jeers will be understood.

Thanks,
Kevin
Kevin Price
Top achievements
Rank 1
 answered on 15 Mar 2010
1 answer
122 views
Hi All,

I have a requirement where i need to add the controls to the page dynamically

here i have 5 sections under each section there will be fields that are to be added dynamically....

i am adding these 5 sections as radpanelitems....

and under each panel item i added a table in which the controls based on the datatype are added to the cells as rows to the table
dynamically.

in brief(that is if i have the datatype for a field as varchar(50) then i will add the textbox control... like wise..)

at the end of the page ... i have add button...

on the click of 'add' button i need to get the values entered in the controls by the end user.

how do i...

i tried using Request.Form["txtRequirementname"].toString()...

it isthrowing the exception 'object reference is not set to an instance"

did i do some thing mistake here... or is there any other way to retrieve the values of the controls.

below is the code written to add the controls to the table.

and also i attached a image of file 

 

private void AddControlstoRow(HtmlTableRow htRow, FieldDefinition fd, double labelwidth, double controlwidth, int colspan)

 

{

 

if (!fd.FieldDataTypeReference.IsLoaded)

 

{

fd.FieldDataTypeReference.Load();

}

 

//for adding label control

 

 

HtmlTableCell htcell = new HtmlTableCell();

 

htcell.Width =

Unit.Percentage(labelwidth).ToString();

 

htcell.Align =

"left";

 

 

Label lblName = new Label();

 

 

if (fd.ListPageMandatory == "Y")

 

{

lblName.Text = fd.FieldLiteral +

":" + "<font color='red'>&nbsp;*</font>";

 

}

 

else

 

{

lblName.Text = fd.FieldLiteral +

":";

 

}

 

//lblName.ForeColor = System.Drawing.Color.Red;

 

 

//lblName.CssClass = strCellCss;

 

htcell.Controls.Add(lblName);

htRow.Cells.Add(htcell);

 

//adding control as per fielddatatypeid

 

 

HtmlTableCell htControlcell = new HtmlTableCell();

 

htControlcell.Width =

Unit.Percentage(controlwidth).ToString();

 

htControlcell.Align =

"Left";

 

htControlcell.ColSpan = colspan;

 

TextBox txtBox = new TextBox();

 

txtBox.EnableViewState =

true;

 

txtBox.ID =

"txt" + fd.FieldLiteral;

 

 

switch (fd.FieldDataType.FieldDataTypeID)

 

{

 

case 12:

 

txtBox.CssClass =

"TextBox";

 

htControlcell.Controls.Add(txtBox);

 

if ((fd.FieldLiteral.ToUpper().Trim().Contains("TIME") || fd.FieldLiteral.ToUpper().Trim().EndsWith("EFFORT") || fd.FieldLiteral.ToUpper().Trim().Contains("DURATION")) && (fd.FieldDataType.FieldDataTypeID != 16))

 

{

 

Label lblUnits = new Label();

 

lblUnits.Text =

"&nbsp;&nbsp;<I>[Hrs]</I>";

 

htControlcell.Controls.Add(lblUnits);

}

 

break;

 

 

case 13:

 

txtBox.CssClass =

"TextBox";

 

txtBox.TextMode = System.Web.UI.WebControls.

TextBoxMode.MultiLine;

 

txtBox.Width = System.Web.UI.WebControls.

Unit.Pixel(550);

 

txtBox.Height = System.Web.UI.WebControls.

Unit.Pixel(50);

 

htControlcell.Controls.Add(txtBox);

 

break;

 

 

case 14:

 

txtBox.CssClass =

"TextBox";

 

 

if ((fd.FieldLiteral.ToUpper().Trim().Contains("TIME") || fd.FieldLiteral.ToUpper().Trim().EndsWith("EFFORT") || fd.FieldLiteral.ToUpper().Trim().Contains("DURATION")) && (fd.FieldDataType.FieldDataTypeID != 16))

 

{

txtBox.Width = System.Web.UI.WebControls.

Unit.Pixel(60);

 

htControlcell.Controls.Add(txtBox);

 

Label lblUnits = new Label();

 

lblUnits.Text =

"&nbsp;&nbsp;<I>[Hrs]</I>";

 

htControlcell.Controls.Add(lblUnits);

}

 

else

 

{

txtBox.Width = System.Web.UI.WebControls.

Unit.Pixel(140);

 

htControlcell.Controls.Add(txtBox);

}

 

break;

 

 

case 18:

 

 

DropDownList ddlLOV = new DropDownList();

 

ddlLOV.ID =

"ddl" + fd.FieldLiteral;

 

ddlLOV.CssClass =

"DDL";

 

ddlLOV.EnableViewState =

true;

 

ddlLOV.Width = System.Web.UI.WebControls.

Unit.Pixel(185);

 

ddlLOV.Items.Add(

new ListItem("--Select--"));

 

 

List<ListOfValues> lstValues = new RequirementBO().SelectListOfValues(fd.FieldID, 4, 36);

 

 

for (int i = 0; i < lstValues.Count; i++)

 

{

 

ListItem li = new ListItem(lstValues[i].ListDescription, lstValues[i].ValueID.ToString());

 

ddlLOV.Items.Add(li);

}

htControlcell.Controls.Add(ddlLOV);

 

break;

 

 

case 24:

 

 

DropDownList ddsdlLOV = new DropDownList();

 

ddsdlLOV.ID =

"ddl" + fd.FieldLiteral;

 

ddsdlLOV.CssClass =

"DDL";

 

ddsdlLOV.EnableViewState =

true;

 

ddsdlLOV.Width = System.Web.UI.WebControls.

Unit.Pixel(185);

 

ddsdlLOV.Items.Add(

new ListItem("--Select--"));

 

 

List<Module> lstModules = new RequirementBO().selectModules(4);

 

 

for (int i = 0; i < lstModules.Count; i++)

 

{

 

ListItem li = new ListItem(lstModules[i].ModuleName, lstModules[i].ModuleCode.ToString());

 

ddsdlLOV.Items.Add(li);

}

htControlcell.Controls.Add(ddsdlLOV);

 

break;

 

 

case 16:

 

 

RadDatePicker rdPicker = new RadDatePicker();

 

rdPicker.Skin =

"Simple";

 

rdPicker.Width = System.Web.UI.WebControls.

Unit.Pixel(150);

 

htControlcell.Controls.Add(rdPicker);

 

if ((fd.FieldLiteral.ToUpper().Trim().Contains("TIME") || fd.FieldLiteral.ToUpper().Trim().EndsWith("EFFORT") || fd.FieldLiteral.ToUpper().Trim().Contains("DURATION")) && (fd.FieldDataType.FieldDataTypeID != 16))

 

{

 

Label lblUnits = new Label();

 

lblUnits.Text =

"&nbsp;&nbsp;<I>[Hrs]</I>";

 

htControlcell.Controls.Add(lblUnits);

}

 

break;

 

 

case 17:

 

 

RadDateTimePicker rdtPicker = new RadDateTimePicker();

 

rdtPicker.Skin =

"Simple";

 

rdtPicker.Width = System.Web.UI.WebControls.

Unit.Pixel(150);

 

htControlcell.Controls.Add(rdtPicker);

 

if ((fd.FieldLiteral.ToUpper().Trim().Contains("TIME") || fd.FieldLiteral.ToUpper().Trim().EndsWith("EFFORT") || fd.FieldLiteral.ToUpper().Trim().Contains("DURATION")) && (fd.FieldDataType.FieldDataTypeID != 16))

 

{

 

Label lblUnits = new Label();

 

lblUnits.Text =

"&nbsp;&nbsp;<I>[Hrs]</I>";

 

htControlcell.Controls.Add(lblUnits);

}

 

break;

 

 

case 23:

 

 

break;

 

 

case 25:

 

 

break;

 

 

case 15:

 

txtBox.CssClass =

"TextBox";

 

 

if ((fd.FieldLiteral.ToUpper().Trim().Contains("TIME") || fd.FieldLiteral.ToUpper().Trim().EndsWith("EFFORT") || fd.FieldLiteral.ToUpper().Trim().Contains("DURATION")) && (fd.FieldDataType.FieldDataTypeID != 16))

 

{

txtBox.Width = System.Web.UI.WebControls.

Unit.Pixel(60);

 

htControlcell.Controls.Add(txtBox);

 

Label lblUnits = new Label();

 

lblUnits.Text =

"&nbsp;&nbsp;<I>[Hrs]</I>";

 

htControlcell.Controls.Add(lblUnits);

}

 

else

 

{

txtBox.Width = System.Web.UI.WebControls.

Unit.Pixel(160);

 

htControlcell.Controls.Add(txtBox);

}

 

break;

 

}

htRow.Cells.Add(htControlcell);

}



Thanks in Advance
Regards:
Chaitanya.E

Schlurk
Top achievements
Rank 2
 answered on 15 Mar 2010
5 answers
308 views
Hello,

I have a CustomLinkManager to handle the link creation in my editor but when I select a created link to edit it, it create an other <a> tag witch contain the one selected. My problem is that I need to replace the current selection, is there something like editor.ReplaceSelection(html) ?

 Thanks for the help!

Vincent

My code looks like this : 

Telerik.Web.UI.Editor.CommandList["CustomLinkManager"] = function(commandName, editor, args) { 
                    var elem = editor.getSelectedElement(); //returns the selected element. 
 
                    if (elem.tagName == "A") { 
                        editor.selectElement(elem); 
                        argument = elem; 
                    } 
                    else { 
                        var content = editor.getSelectionHtml(); 
                        var link = editor.get_document().createElement("A"); 
                        link.innerHTML = content; 
                        argument = link; 
                    } 
 
                    var myCallbackFunction = function(sender, args) { 
                        var html = String.format("<a href=\"{0}\" target=\"{1}\" class=\"{2}\" title=\"{3}\">{4}</a>", args.url, args.target, args.className, args.title.replace("'", "\'"), args.name); 
                        editor.pasteHtml(html) 
                         
                    } 
 
                    editor.showExternalDialog('<%= Page.ResolveUrl("~/aspx/cms/CustomLinkManager.aspx") %>', argument, 600, 600, myCallbackFunction, null, 'Insérer un lien', true, Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, false, true); 
                }; 


Dobromir
Telerik team
 answered on 15 Mar 2010
1 answer
109 views
Schlurk
Top achievements
Rank 2
 answered on 15 Mar 2010
1 answer
213 views
hi
i have a radwindow with skin default.
i want  overwirte the css class to obtain a custom style that have for example the property top and right sets by me.
in which way can i make it?
thank in advice
Schlurk
Top achievements
Rank 2
 answered on 15 Mar 2010
1 answer
378 views
Hi All,

How to set Line Chart Series Line color through Properties options or in Inline code, Please help me regarding this.
Schlurk
Top achievements
Rank 2
 answered on 15 Mar 2010
3 answers
171 views
I was setting up some properties in the codebehind for the file explorer, and I came across some properties that don't seem to work as expected.

 

fileExplorer.Upload.AllowedFileExtensions  
fileExplorer.Configuration.SearchPatterns  
 
fileExplorer.Upload.MaxFileSize  
fileExplorer.Configuration.MaxUploadFileSize  
 
It appears to me that the properties for .Upload do not work, and they seem to be redundant if there are configuration properties that seem to have the same purpose. Were they accidentally left in when the configuration properties were created?
I believe I am using the 2009 Q3 release, but it could be Q2

When I added values to the AllowedFileExtensions, they did not show up on the upload form file extensions list, but when I used the SearchPatterns property, they showed up.

Sorry if this has already been fixed.
Lini
Telerik team
 answered on 15 Mar 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?