Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
123 views
Hi everybody, i created, a site map dinamically, but all the nodes assume tha same navigateUrl.

Is possible to make that dinamically ? if so, how?
thnkz
<telerik:RadSiteMap runat="server" ID="RadSiteMap1"
    DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Text" ShowNodeLines="true">
    <DataBindings>
        <telerik:RadSiteMapNodeBinding NavigateUrl="#" />
    </DataBindings>
</telerik:RadSiteMap>
protected void Page_Load(object sender, EventArgs e)
       {
           RadSiteMap1.DataSource = SiteDataItem.GetSiteData();
           RadSiteMap1.DataBind();
       }
       /// <summary>
       /// Método que encapsula os atributos e monta a lista.
       /// </summary>
       public class SiteDataItem
       {
           private string _text;
           private int _parentId;
           private int prvID;
           private string prvLink;
 
           /// <summary>
           /// Descrição dos nodes
           /// </summary>
           public string Text
           {
               get { return _text; }
               set { _text = value; }
           }
           /// <summary>
           /// ID do node
           /// </summary>
           public int ID
           {
               get { return prvID; }
               set { prvID = value; }
           }
           /// <summary>
           /// ID de node pai
           /// </summary>
           public int ParentID
           {
               get { return _parentId; }
               set { _parentId = value; }
           }
           /// <summary>
           /// Atribui valor aos campos.
           /// </summary>
           /// <param name="ID"></param>
           /// <param name="nivel0"></param>
           /// <param name="nivel1"></param>
           /// <param name="nivel2"></param>
           /// <param name="nivel3"></param>
           /// <param name="nivel4"></param>
           /// <param name="text"></param>
           /// int ID, int nivel0, int nivel1, int nivel2, int nivel3, int nivel4,
           public SiteDataItem(int id, int parentId, string text)
           {
               //prvNivel0 = nivel0;
               //prvNivel1 = nivel1;
               //prvNivel2 = nivel2;
               //prvNivel3 = nivel3;
               //prvNivel4 = nivel4;
               prvID = id;
               _parentId = parentId;
               _text = text;
           }
           /// <summary>
           /// Monta a lista TreeView.
           /// </summary>
           /// <returns>Lista com dados TreeView.</returns>
           public static List<SiteDataItem> GetSiteData()
           {
               List<SiteDataItem> siteData = new List<SiteDataItem>();
 
               siteData.Add(new SiteDataItem(1, 0, "Products"));
               siteData.Add(new SiteDataItem(2, 1, "RadControls for ASP.NET Ajax"));
               siteData.Add(new SiteDataItem(3, 1, "RadControls for Silverlight"));
               siteData.Add(new SiteDataItem(4, 2, "RadGrid"));
               siteData.Add(new SiteDataItem(5, 2, "RadScheduler"));
               siteData.Add(new SiteDataItem(6, 2, "RadEditor"));
               siteData.Add(new SiteDataItem(7, 3, "RadGrid"));
               siteData.Add(new SiteDataItem(8, 3, "RadMenu"));
               siteData.Add(new SiteDataItem(9, 3, "RadEditor"));
 
               return siteData;
           }
       }
Peter
Telerik team
 answered on 09 Mar 2012
1 answer
106 views
Hi,
 In the following demo on telerik site if I click on html file in attachment column for downloading it in IE and click open option, it redirects me to that page instead of opening a new window. I have a requirement wherein new window should be opened for attachment if it is html file.

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/gridattachmentcolumn/defaultcs.aspx 

Regards,
mahesh
Andrey
Telerik team
 answered on 09 Mar 2012
2 answers
67 views
Hi,

We would like to change the forecolor of WeightItem of the tag cloud control, currently weightitem has been set with grey color, the issue is, we have background image(see the screen shot) for cloud control and it also has the grey color so weight item is not visible properly. we will be able to solve this if we can change the color of the weight item.

Thanks
Venkat
Venkatakrishna
Top achievements
Rank 1
 answered on 09 Mar 2012
5 answers
72 views
Hello,

I have a problem regarding the scheduler. I have bind the break data using in calender(see the attachment file which content data of break or block). In weekly view, i want to delete particular date from the calender. I used the (e.Appointment.Start.Date) or RadScheduler1.SelectedDate  to find the date. It is not delete the selected break or block date.

But no problem in day view. It is delete the selected date. But the problem in weekly view. In weekly view, RadScheduler1.SelectedDate not work because it only delete the today date.

Please help me as soon as possible

Thanks

Jiten Mutum
Plamen
Telerik team
 answered on 09 Mar 2012
1 answer
341 views
Good afternoon,

I am using the CSS div layout from 960.gs. Works like a charm with all ASP.Net AJAX controls apart RadButton.

When I set the button width to 100% to fill the div it always edges out ( see attached image ).

How can I avoid that ?

TIA,

S.R.
Bozhidar
Telerik team
 answered on 09 Mar 2012
3 answers
116 views
Hi,

While clicking on grid header for sorting an extra button becomes visible.Why this happens?

Help me.
Thnx in advance
Princy
Top achievements
Rank 2
 answered on 09 Mar 2012
1 answer
103 views
Hi

Well I finally came up with some client side code to enable and disable my TextBoxes and by extension I figured out how to manipulate NumericTextboxes.

Only to find the following gotcha.

If I initially set the NumericTextBoxes to disabled in server side code I can never enable them.

If they are initially enabled in server side code I can disable and enable them to my hearts content.

Any ideas?

Here is the server side and client side code I'm using.

C#:

 

 

if (saParam[1] == 'Always')

 

{

AlwaysRadioButton.Checked =

 

true;

 

ConnectionNameTextBox.ReadOnly =

 

true;

 

InitiateConnectionCheckBox.Enabled =

 

false;

 

WaitRadNumericTextBox.Enabled =

 

false;

 

DelayRadNumericTextBox.Enabled =

 

false;

 

}

 

 

else if (saParam[1] == 'Any')

 

{

RunIfAnyRadioButton.Checked =

 

true;

 

ConnectionNameTextBox.ReadOnly =

 

true;

 

InitiateConnectionCheckBox.Enabled =

 

false;

 

WaitRadNumericTextBox.Enabled =

 

true;

 

DelayRadNumericTextBox.Enabled =

 

true;

 

}

 

 

else if (saParam[1] == 'Specific')

 

{

SpecificRadioButton.Checked =

 

true;

 

ConnectionNameTextBox.ReadOnly =

 

false;

 

InitiateConnectionCheckBox.Enabled =

 

true;

 

WaitRadNumericTextBox.Enabled =

 

true;

 

DelayRadNumericTextBox.Enabled =

 

true;

 

}

javascript:

 

function

 

 

DisableDelayWaitControls( bDisabled )

 

{

 

 

var ntbDelay = $find( "CriteriaDelayRadNumericTextBox" );

 

 

 

var ntbDelayUp = document.getElementById( "CriteriaDelayRadNumericTextBox" + "_SpinUpButton" );

 

 

 

var ntbDelayDown = document.getElementById( "CriteriaDelayRadNumericTextBox" + "_SpinDownButton" );

 

 

 

var ntbWait = $find( "CriteriaWaitRadNumericTextBox" );

 

 

 

var ntbWaitUp = document.getElementById( "CriteriaWaitRadNumericTextBox" + "_SpinUpButton");

 

 

 

var ntbWaitDown = document.getElementById( "CriteriaWaitRadNumericTextBox" + "_SpinDownButton" );

 

ntbDelay.disabled = bDisabled;

ntbWait.disabled = bDisabled;

ntbDelay._textBoxElement.disabled = bDisabled;

ntbDelayUp.disabled = bDisabled;

ntbDelayDown.disabled = bDisabled;

ntbWait._textBoxElement.disabled = bDisabled;

ntbWaitUp.disabled = bDisabled;

ntbWaitDown.disabled = bDisabled;

}

If the 'Always' code branch is executed I can never enable my controls in javascript.?????

Vasil
Telerik team
 answered on 09 Mar 2012
1 answer
354 views
Hi

I am simply trying to set a textbox to readonly on a client side button click.

I have seen examples that mention getting the _textBoxElement, but that doesn't work.
Or I should say attempting to use that mechanism says _textBoxElement isn't supported
on the client side object I have.

Here is my script:

var

 

 

tbConnectionName = document.getElementById( "ConnectionNameTextBox" );

 

 

 

var cbInitiate = document.getElementById( "InitiateConnectionCheckBox" );

 

 

 

var tb = $telerik.toTextBox( tbConnectionName );

 

 

 

//tb._textBoxElement.readOnly = true;

 

 

 


var
e = tb.get_element;

 

 

tbConnectionName.readonly =

 

true;

 

cbInitiate.disabled = bDisabled;

Disabling the cbInitiate object works fine, but none of my attempts to set readonly
on the tbConnectionName object have been successful.

BTW here is the corresponding HTML:

 

 

 

<div style="width:85%; float:right;">

 

 

 

 

<telerik:RadTextBox

 

 

 

ID="ConnectionNameTextBox"

 

 

 

ClientIDMode="Static"

 

 

 

MaxLength="80"

 

 

 

runat="server"

 

 

 

Width="300px" TabIndex="4" />

 

 

 

</div>

 

 

 

<div style="width:85%; float:right;">

 

 

 

 

<asp:CheckBox ID="InitiateConnectionCheckBox" runat="server"

 

 

 

AutoPostBack="True"

 

 

 

AccessKey="I"

 

 

 

ClientIDMode="Static"

 

 

 

OnCheckedChanged="InitiateConnectionCheckBoxClicked"

 

 

 

TabIndex="5" Text="Initiate a connection if not already connected" />

 

 

 

</div>

 


Right now I am considering maing an Ajax request in my onclick event and setting
the property in server side code. We can set ReadOnly quite successfully all over the place in server side code. Doing this seems excessive though.

Any help greatly appreaciated.

Vasil
Telerik team
 answered on 09 Mar 2012
7 answers
967 views
This might be an easy question but i can not find the answer.  If you have a radgrid with a filter on a numeric value it shows that value in the filter box with a comma if it is over 999 (NOT in the data itself).  I.E.  you want to filter on OrderID and that is numeric.  If you try to filter on OrderID and the value you are looking for is 12345 in the filter box it shows it as 12,345.  is there a way that the filter box will not show comma's? 
Naresh
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
342 views
Hi,

is there a way to fit my grid width to the parent DIV without using JS? I tried with Width="100%", but it overflow like 2-3 pixels out.

If not, how can I achieve this with JS?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 09 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?