Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hi

I need to exclude the button control from Ajax


If i add the control design time its working fine, but if i add the controls dynamatically its not working(button not exclude from the ajax)

This is my code.

 

RadAjaxPanel panel = new RadAjaxPanel();

 

 

this.Form.Controls.Add(panel);

 

 

Button btn = new Button();

 

btn.Text =

"Click";

 

btn.Click +=

new EventHandler(btn_Click);

 

 

//btn.Attributes.Add("onclick", String.Format("realPostBack(this, ''); return false;"));

 

RadScriptManager1.RegisterPostBackControl(btn);

panel.Controls.Add(btn);


What i needs to do?

Regards
Vairam

Daniel
Telerik team
 answered on 22 Jun 2009
1 answer
185 views
Hi,
I want to build RadMenu from an xml file and a dataset (xsd).
So I load my xml file into dataset.
Xml file:
<?xml version="1.0" encoding="utf-8"?>  
<MenuConfig xmlns="http://tempuri.org/MenuConfig.xsd">  
   <MenuDT> 
    <Id>1</Id>      
    <Text>House</Text> 
    <URL>URL1</URL> 
    <CnfgId>1</CnfgId> 
    <ParentId>null</ParentId> 
  </MenuDT> 
  <MenuDT> 
    <Id>2</Id>      
    <Text>Cars</Text> 
    <URL>URL2</URL> 
    <CnfgId>1</CnfgId> 
    <ParentId>1</ParentId> 
  </MenuDT> 
</MenuConfig> 
and:
MenuConfig menu = new MenuConfig();//dataset  

 

 


menu.ReadXml(MapPath(
"App_Code/MenuConfig.xml"), System.Data.XmlReadMode.IgnoreSchema);  
 
RadMenu1.DataSource = menu.Tables["MenuDT"];  
//Establish hierarchy:  
RadMenu1.DataFieldID = "Id";  
RadMenu1.DataFieldParentID = "ParentId";  
//Set Text, Value, and NavigateUrl:  
RadMenu1.DataTextField = "Text";  
RadMenu1.DataValueField = "Id";  
RadMenu1.DataNavigateUrlField = "URL";  
RadMenu1.DataBind(); 

And I have an error: This constraint cannot be enabled as not all values have corresponding parent values.

I think that ParentId column in xml (set to null) isn't null in c#, it's a normal string.
Is that any solutions to avoid this? At now I change ParentId (in xml) to 0 and set null in c# code (I think that it's not a good idea) :
for (int ii = 0; ii < menu.Tables["MenuDT"].Rows.Count; ii++)  
        {  
            if (Convert.ToInt32((menu.Tables["MenuDT"].Rows[ii]["ParentId"])) == 0)  
            {  
                menu.Tables["MenuDT"].Rows[ii]["ParentId"] = null;  
                menu.Tables["MenuDT"].AcceptChanges();  
            }  
        } 

ParentId column in code of xsd file:
 <xs:element name="ParentId" msprop:Generator_UserColumnName="ParentId" 
msprop:
nullValue="_null" msprop:Generator_ColumnVarNameInTable="columnParentId" 
msprop:
Generator_ColumnPropNameInTable="ParentIdColumn" 
msprop:
Generator_ColumnPropNameInRow="ParentId" type="xs:string" minOccurs="0" /> 
Any ideas how to proper make it?
Veselin Vasilev
Telerik team
 answered on 22 Jun 2009
1 answer
69 views
what i want to do is display the loading.gif image on the controls that i want to update
say i have a label and a button, when i click on a button, it will read database and then put the value on the label to display. but while getting data it display loading1.gif on the label to show that it is working to get the value. i can't seem to get that to work. can you help me? thanks. this is what i have
<telerik:RadScriptManager ID="ScriptManager1" runat="server" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server"> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Panel1" > 
                    <UpdatedControls > 
                        <telerik:AjaxUpdatedControl ControlID="Panel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting>                
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
         
 
            <asp:Panel ID="Panel1" runat="server" Width="350px" Height="275px"> 
                <asp:Label ID="Label1" runat="server"></asp:Label> 
                <asp:Button ID="Button1" runat="server" Text="Button" /> 
                 
            </asp:Panel>         
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server"> 
            <asp:Image id="Image1" runat="server" ImageUrl="loading1.gif"  > 
            </asp:Image> 
        </telerik:RadAjaxLoadingPanel> 

        

     
Princy
Top achievements
Rank 2
 answered on 22 Jun 2009
3 answers
148 views
Hi,

How can i able to enable the disabled date in the Rad Date Picker?

For ex; I have one drop down with some values. on the selection ofeach values i am disabling some date in the rad date picker.
When i change the selection previously disabled date should enable (rigt now its not enabling) and then disable the new set of date for that selection.


Thanks and Regards,
Sushanth Mathew.
Veli
Telerik team
 answered on 22 Jun 2009
3 answers
196 views
I followed your example and added the bottom and left panes with splitter so I could resize my chart but I can't figure out how to add the right pane and splitter.  Could you please help me?

Here is my layout:

 <telerik:RadSplitter ID="trsVertical" runat="server" Orientation="Vertical" >
        <telerik:RadPane ID="LeftPane" runat="server" Width="20px" Scrolling="none" BackColor="#f0f8ff">
        </telerik:RadPane>
        <telerik:RadSplitBar ID="trsVerticalEnd" runat="server" ></telerik:RadSplitBar>
        <telerik:RadPane ID="trpMiddlePane" runat="server" Height="500px" Width="925px" BackColor="#f0f8ff">
            <telerik:RadSplitter ID="trsHorizontal" runat="server" Height="100%" Width="100%" Orientation="Horizontal">
                <telerik:RadPane ID="trpChartPane" runat="server" Height="100%" Width="100%" Scrolling="none" BackColor="#f0f8ff"
                    OnClientResized="ResizeChart">
                    <telerik:RadChart ID="trcRadChart" runat="server">
                        ~~my chart definition goes here~~
                    </telerik:RadChart>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="trsHorizontalEnd" runat="server" ></telerik:RadSplitBar>
                <telerik:RadPane ID="BottomPane" runat="server" Height="20px"  BackColor="#f0f8ff">
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>
    </telerik:RadSplitter>



Here is the Ajax code for the resizing:

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

        <script type="text/javascript">
            function ResizeChart(sender, args)
            {
                var chart = $get("<%= trcRadChart.ClientID %>");
                var chartimg = chart.getElementsByTagName("img")[0];
                chartimg.style.setAttribute("width", sender.get_width() + "px");
                chartimg.style.setAttribute("height", sender.get_height() + "px");
           }
        </script>

</telerik:RadScriptBlock>



Svetlina Anati
Telerik team
 answered on 22 Jun 2009
2 answers
216 views
Dear Telerik Team,

I placed a script manager on the master page.
In the content page, I used the radwindow manager.
On clicking the Save button, i need to call the alert window for displaying the message," Data Saved successfully.."
the code doesn't work on the content page .Please help me regarding this urgently.Below is the code I have used.
**** I used vb with code-behind


Protected

 

Sub LnkSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LnkSave.Click

 

 


Dim
MyQuery As String

 

 

Dim MyCommand As sqlcommand

 

Dim scriptstring As String = "radalert('Saved Successfully', 230,110);"

 

 

 

//------------------My insert Query------------------//

 

 

  ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "radalert", scriptstring, True)
End
Sub

 



Regards,
Abdul kadar


Georgi Tunev
Telerik team
 answered on 22 Jun 2009
4 answers
453 views
When using the RadComboBox, I can begin typing and watch the list pear down.  It's very pretty. :-)  However, I have to use the "enter" key instead of the "tab" key to select the item.

It seems more intuitive to use the "tab" key to select the item and move to the next field in my form.  Is there a way to do this?  Can I attach to the OnClientKeyPressing JavaScript method to accomplish this?
Mark
Top achievements
Rank 2
 answered on 22 Jun 2009
1 answer
153 views
Hi,

I am using the RadEditor in MOSS and would like to replace the standard Link Manager with my own. I have created a toolbar button that loads my link manager, and now I need to replace the right click context menu for links with my own, or failing this remove the context menu for links.

I have updated the <contextMenus> section of the ListToolsFile.xml to add the following:

        <contextMenu forElement="A">  
            <tool name="MyLinkManager"/>  
        </contextMenu> 

however this seems to have no effect and the standard context link menu is displayed. Trying to remove the context menu entirely also seems to have no effect.

<contextMenu forElement="A" enabled="false">  
</contextMenu> 

Amendments to the <tools> section does work so I know I am editing the correct file

I have RadEditor version 5.0.0

Thanks
Stanimir
Telerik team
 answered on 22 Jun 2009
3 answers
128 views
Hi,

Since I updated from the Q3 2008 SP1 to the Q1 2009, my RadConfirm dialogs don't work anymore. The buttons don't appear, there is written "Yes No" underlined (like LinkButtons) but when I clicked it doesn't do anything. I try several skins (Office2007 is my normal skin) but the problem is still there. Is this a known issue ? Do you have an idea of what the problem is ? If I use ConfirmDialogType="Normal", there is no problem.

Thanks in advance,

[Nean]
Georgi Tunev
Telerik team
 answered on 22 Jun 2009
1 answer
62 views
Hi,

I have created a usercontrol with rad controls to dynamically create menus.
In My home page i have plased the user control and on clicking the menus inside the usercontrol, i would have the display the approprieate aspx page in the RadPane in the home page.
Pls. Suggest me how to do this. Share some code samples if possible

Thanks
Paul
Telerik team
 answered on 22 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?