Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
99 views
I have a RadGrid whose MasterTable is being filled through the NeedDataSource() method of the grid. I have one child table, that is filled in the DetailTableDataBind() method.

I capture the ItemCommand event for the grid, check whether it is Delete, and then determine the OwnerTableView to check if I should delete from the MasterTable's DataSource or the ChildTable's DataSource.

When I delete a MasterTable row, it works fine.

When I delete a ChildTable row, the data store is updated, but after running NeedDataSource() (I call RadGrid1.MasterTableView.ReBind() from the ItemCommand event handler), only the ChildTable is updated. My MasterTable contains a total of a column in the ChildTable, and the change to the data store is not reflected on the grid.

The RadGrid is currently set up as an UpdatedControl when itself changes, e.g.

<telerik:AjaxSetting AjaxControlID="RadGrid1"
   <UpdatedControls>                             
        <telerik:AjaxUpdatedControl ControlID="RadGrid1"  
                 LoadingPanelID="RadAjaxLoadingPanel1" />                             
   </UpdatedControls> 
</telerik:AjaxSetting> 

Is there a way to "reset" the RadGrid, and refill it with data? Or is that what NeedDataSource() does? Anything that I can try that might remedy this situation?
Yavor
Telerik team
 answered on 12 Jan 2009
3 answers
231 views
Hello...

I am trying to place a GoogleMap inside of a Telerik RadToolTip (Q2 2008) Template and I am having issues with it rendering incompletely... (see photo in this example.

This issue comes down to both the RadToolTip and the RadMenuItem CSS using display: none; for their intial state of the hidden divs. From reading this post  on the googleapi forums, it seems that the suggested manner of solving this problem is by using either visibility: hidden; or by setting the z-index.

Since the CSS is emitted directly from the control... (here is a snippet of my page source)

<div id="ctl00_RadToolTipSiteMap" HideEvent="FromCode" style="display:none;">  
      

is there any way to change the way that the RadToolTip or the RadMenu renders hidden div's?

The .NET control for including a GoogleMap is available from http://googlemaps.subgurim.net/

My aspx looks like this... pretty simple...  Q2 2008, happens in both both IE6.0 and Firefox 2

<div style="float: left; width: 80px; height: 24px; border-top: 1px solid #383838;text-align: left;">  
 
<span style="margin: 2px;">  
<asp:Image ID="ImageSiteMapIcon" runat="server" ImageUrl="~/gearth.gif" /></span>  
<span id="sitemaplink" style="color: #fff; font: normal 12px Arial, sans-serif;">SiteMap</span></div>  
 
<telerik:RadToolTip ID="RadToolTipSiteMap" runat="server" HideEvent="FromCode" TargetControlID="sitemaplink" IsClientID="true" RelativeTo="Element" Skin="Default" Position="BottomRight" OffsetX="-15" Animation="Resize" Height="350px" Width="500px" ShowEvent="OnMouseOver" ManualClose="true" > 
 
<asp:UpdatePanel ID="upComments" runat="server">  
 
<ContentTemplate> 
 
<cc1:GMap ID="Map2" runat="server" Height="350px" Width="500px" /> 
 
</ContentTemplate> 
 
</asp:UpdatePanel> 
 
</telerik:RadToolTip> 
 

thank you in advance!!

jess

Svetlina Anati
Telerik team
 answered on 12 Jan 2009
2 answers
87 views
but its annoying the hell out of me right now

I simply need the text value of a rad toolbar item

I have no problem doing what I need in the ButtonClick event but I need the value based on other events on the page

any ideas?

Radtoolbar1.item.text doesnt do it for me
Peter
Telerik team
 answered on 12 Jan 2009
3 answers
154 views
I set XAxis label with property AlignedPositions.Left and outside of chart  . But some time , a label is too long  and this text display inside chart . How can I solve this problem ?
I want to do as  label can auto cut those text that display inside the chart and display it with "..."
Example . XAxis is "This is a label. It is too long ." I want to display as "This is label ..."  if it length is out of range of XAxis and display in to chart content .

Second, XAxis label with property AlignedPositions.Left  , i want to ask that how to resize  range  of XAxis , make it can display label more length .  I only start study about chart. Please show me solution!

Thanks very much !
Giuseppe
Telerik team
 answered on 12 Jan 2009
5 answers
199 views
Hi,

I am using Rad Upload control for uploading image.User can browse image by this.
Bt I dont want 'add' , 'delete' and 'remove' buttons below browse button which comes bydefault .user can upload only one image at a time.
How can i do this?..
I am saving  the image which user has browsed..I want to allow all image type to browse.Now it only allows me to browse .jpeg images... 
Here is my code...
 <telerik:RadUpload 
                                ID="UploadFile" runat="server"  
                                Skin="Vista" 
                                MaxFileInputsCount="5" 
                                TargetFolder="~/ProfileImage" 
                                OverwriteExistingFiles="false"  InitialFileInputsCount ="1"  /> 
 <asp:Button id="btnPreview"  style="font-weight:bold;height:22px; width: 80px;"  CssClass="btn" runat ="server"  
             Text ="Submit" OnClick="btnPreview_Click"  CausesValidation ="false" /> 
 
 
 protected void btnPreview_Click(object sender, EventArgs e) 
    { 
        foreach (UploadedFile f in UploadFile.UploadedFiles) 
        { 
            string ffilepath = f.GetName(); 
            ObjuserModelCs.proc_insert_UpdateLoginImage(Convert.ToInt32(Session["WebsiteUserId"].ToString()), filepath); 
            previewField.ImageUrl = filepath
        } 
     } 

Waiting for reply!!!

Thanks.
Rahul Khinvasara
Top achievements
Rank 1
 answered on 12 Jan 2009
1 answer
169 views
I have a web form with a bunch of telerik combo boxes on it that need to be populated with an array of numbers and then the selecteditem needs to be set equal to a db item. The problem I am having is that when I set the selected item equal to a db item, it replaces the first item in the array.

aspx code:

<

td ><telerik:RadComboBox ID="rcboNumAdultsFL" runat="server" Width="45px" BorderColor="#999999"></telerik:RadComboBox></td>

VB.NET code:

 

Private

Sub BindToNumberList(ByVal combo As RadComboBox)

 

 

Dim itemsList As String() = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}

 

combo.DataSource = itemsList

combo.DataBind()

 

End Sub

 

Protected

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 

 

If

Not Page.IsPostBack Then

 

BindToNumberList(

Me.rcboNumAdultsFL)

 

'Populate the datatable

 

 

 

Dim sConnString As String = ConfigurationManager.ConnectionStrings("PU89").ConnectionString

 

 

Dim objConnection As New SqlClient.SqlConnection(sConnString)

 

 

Dim strSQL As String = "SELECT * FROM tblRegistration WHERE ID='" & _ID & "';"

 

 

 

 

Dim dbComm As New SqlClient.SqlCommand(strSQL, objConnection)

 

 

Dim objDR As SqlClient.SqlDataReader

 

 

Try

 

 

 

objConnection.Open()

objDR = dbComm.ExecuteReader(System.Data.CommandBehavior.CloseConnection)

 

While objDR.Read()

 

 

With objDR

 

Me

.rcboNumAdultsFL.SelectedItem.Value = .Item("NumAdultsFL")

 

 

Me.rcboNumAdultsFL.SelectedItem.Text = .Item("NumAdultsFL")

 

End

With

 

 

 

 

End While

 

 

 

 

Catch ex As Exception

 

Response.Write(ex.Message)

Response.End()

 

Finally

 

 

 

 

If objConnection.State = ConnectionState.Open Then

 

 

 

objConnection.Close()

 

 

 

 

End If

 

 

 

 

End Try

 

 

 

 

End If
End Sub

This code results in the combo box showing the correct value from the db but it replaces the "0" in the array list. How do I get it to work properly?

Thanks,
Shelley

 

Shinu
Top achievements
Rank 2
 answered on 12 Jan 2009
5 answers
175 views
Hi,

Does anyone know if it is possible to move a node up or down by 1, relative to its adjacent nodes, using client side script? There are situations where drag and drop becomes difficult (many levels, etc) and we wish to give our end users an alternative. Any thoughts welcome.
Emmanuel Bougnon
Top achievements
Rank 1
 answered on 12 Jan 2009
0 answers
128 views
Hi,

I've created a panelbar (to populate my panel with an ADAM Autority) with custom code (see below) to obtain my own control .
All works well expect skin/css. after compiled i've a custom control(.dll file) wich I can  install in my own toobar. I drag'n drop my control from toolbox, and i obtain a panel bar with my params and the style is with 'bubbles' like winword bullets format .... and no css can be removed this.

somebody can help me ?

thanks

---

 

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.UI;
using my.Common;
using my.Common.Securities;

namespace my.Common.AjaxComponents
{
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:myPanelBarMenu runat=server></{0}:myPanelBarMenu>")]
    public class myPanelBarMenu : Telerik.Web.UI.RadPanelBar
    {
        private string panelDataTextField;
        private string panelDataFieldID;
        private string panelDataFieldParentID;
        private string panelDataNavigateURL;
        private int panelRowSecurityLevel;
        private string panelAzManConnectionStringName;
        private string panelAzManApplicationStringName;
       

        private int panelRowText;
        private int panelRowID;
        private int panelRowParentID;

       
        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the text that will display by the control")]
        public string myDataTextField
        {
            get
            {
                return panelDataTextField;
            }
            set
            {
                panelDataTextField = value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the name of the Azman Application stored in web.config file section <appSettings> . If unspecfified key='myAzManServerCS'")]
        public string myAzManConnectionStringName
        {
            get
            {
                return panelAzManConnectionStringName;
            }
            set
            {
                panelAzManConnectionStringName= value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the name  of the Azman Application. This parameter is required")]
        public string myAzManApplicationStringName
        {
            get
            {
                return panelAzManApplicationStringName;
            }
            set
            {
                panelAzManApplicationStringName= value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the column ID of the Row that contains SecurityLevel stored in Database")]
        public int myRowSecurityLevel
        {
            get
            {
                return panelRowSecurityLevel;
            }
            set
            {
                panelRowSecurityLevel = value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the column ID of the Row that contains Text stored in Database")]
        public int myRowText
        {
            get
            {
                return panelRowText;
            }
            set
            {
                panelRowText = value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the column ID of the Row that contains ID stored in Database")]
        public int myRowID
        {
            get
            {
                return panelRowID;
            }
            set
            {
                panelRowID = value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the column ID of the Row that contains ParentID stored in Database")]
        public int myRowParentID
        {
            get
            {
                return panelRowParentID;
            }
            set
            {
                panelRowParentID = value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the column ID of the Row that contains navigateURL stored in Database")]
        public string myDataNavigateURL
        {
            get
            {
                return panelDataNavigateURL;
            }
            set
            {
                panelDataNavigateURL = value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the ID that will be used to populate root within hierachical PanelBar the control")]
        public string myDataFieldID
        {
            get
            {
                return panelDataFieldID;
            }
            set
            {
                panelDataFieldID = value;
            }
        }

        [Bindable(true)]
        [Category("my")]
        [DefaultValue("")]
        [Localizable(true)]
        [Description("Specifies the ParentID that will be used to populate all sub-level within hierachical PanelBar the control")]
        public string myDataFieldParentID
        {
            get
            {
                return panelDataFieldParentID;
            }
            set
            {
                panelDataFieldParentID = value;
            }
        }
       
        protected override void OnPreRender(EventArgs e)
        {
            base.RegisterScriptControl();
            GetMenus _menu = new GetMenus();
            DataTable dt = _menu.GetAllItemsMenus().Tables[0];
            Security.AzManAuthenticationMethod Auth_method = new Security.AzManAuthenticationMethod();
            Security.AzManAuthenticationMethod.AzManConnectionStringName = this.panelAzManConnectionStringName;
            string _AzManConnection = Security.AzManAuthenticationMethod.GetAzManConnectionStringName();
            string _AzManApplication = Security.AzManAuthenticationMethod.GetAzmanApplicationStringName();
            try
            {
                Auth_method.LoadApp(_AzManConnection, _AzManApplication);
                Auth_method.LoadCtx();
            }
            catch (System.Runtime.InteropServices.COMException x)
            {
                throw new Security.AzManAuthenticationMethod.AzMethodException(x, "IAzClientContext.AccessCheck");
            }
            SimpleMenu _myMenu = new SimpleMenu();
            foreach (DataRow row in dt.Rows)
            {
                _myMenu.Add(new MenuItem(row[myRowSecurityLevel].ToString(), row[myRowText].ToString(), row[myRowID].ToString(), row[myRowParentID].ToString(),row[myDataNavigateURL].ToString()));
            }
            ArrayList al_GetAutorizedOperationsAZMAN = new ArrayList();
            foreach (Security.AzManAuthenticationMethod.AccessCheckResult op_ok in Auth_method.AccessAll())
            {
                if (op_ok.result == 0)
                {
                    al_GetAutorizedOperationsAZMAN.Add(op_ok.id.ToString());
                }
            }
            DataSet aSet = new DataSet();
            DataTable aTable = new DataTable();
            aSet.Tables.Add(aTable);
            aSet.Tables[0].Columns.Add("Text", typeof(String));
            aSet.Tables[0].Columns.Add("Security_Level", typeof(String));
            aSet.Tables[0].Columns.Add("ID", typeof(String));
            aSet.Tables[0].Columns.Add("Parent_ID", typeof(String));
            aSet.Tables[0].Columns.Add("Navigate_url", typeof(String));
            if (_myMenu.Count != 0)
            {
                foreach (object co in al_GetAutorizedOperationsAZMAN)
                {
                    if (_myMenu.Contains(co.ToString()))
                    {
                        DataRow aRow = aSet.Tables[0].NewRow();
                        aRow[0] = _myMenu[co.ToString()].Text;
                        aRow[1] = _myMenu[co.ToString()].Security_Level;
                        aRow[2] = _myMenu[co.ToString()].ID;
                        if (_myMenu[co.ToString()].Parent_ID == "")
                        {
                            _myMenu[co.ToString()].Parent_ID = null;
                        }
                        aRow[3] = _myMenu[co.ToString()].Parent_ID;
                        aRow[4] = _myMenu[co.ToString()].Navigate_url;
                        aSet.Tables[0].Rows.Add(aRow);
                    }
                }
               

                this.DataTextField = this.myDataTextField; ;
                this.DataFieldID = this.myDataFieldID;
                this.DataFieldParentID = this.myDataFieldParentID;
                this.DataNavigateUrlField = this.myDataNavigateURL;
                                this.DataSource = aSet;
                this.DataBind();

            }
          
        }
    }
      
}

 

 

 

 

nicolas98000
Top achievements
Rank 1
 asked on 12 Jan 2009
1 answer
88 views
Hi,

I'm lost using Tooltip onDemand to make similar that load one page aspx inside one panel using prototype ajax. Could you make some sample to compare two methods and understand how to obtains this result using RadTooltipManager and Ondemand ajax.
I have read all post and tested the sample OnDemand from demo site, but is not clear for me. I understand that i need one iframe in place of UC. I have one page with std divs and img with onclick event. This page is build in another ajax event using reponse.write and added scripts but no codebehind. Some way to make client side the RadtooltipManager onDemandAjax?

new Ajax.Update( 'mydiv', 'my.aspx', { OnCreate:function(){}, OnComplete:function(){}
parameters:{ var:val1,var2,val2}});
Regards 
Svetlina Anati
Telerik team
 answered on 12 Jan 2009
1 answer
149 views
Hi,

I am databinding multiple series to my chart.  Each series is money spent per month per person.

So, say I have three people a, b, and c.  I am trying to plot their spending over aperiod of 6 months (all the same months Jan 2008 through June 2008).

My data is coming back via an ObjectDataSource with these fields:

Person | Amount | Month

The key portion of my code looks like this:
       
        //add a series for each person 
        for (int i = 0; i <= (selectedPersons.Count - 1); i++) 
        { 
            ChartSeries chartSeries = new ChartSeries(); 
            chartSeries.Name = selectedPersonNames[i].ToString(); 
            chartSeries.Type = ChartSeriesType.Line; 
            chartSeries.DataYColumn = "$"
            usageChart.Series.Add(chartSeries); 
        } 
         
 
        //set the x axis labels, adjust any appearance, and bind the data 
        usageChart.DataSource = personExpenses
        usageChart.PlotArea.XAxis.DataLabelsColumn = "Month"
        usageChart.DataBind(); 


The problem I am running into is that the x-axis is adding a total of 18 months (6 for each of the three people).  The x-axis looks like this:

Jan Feb Mar Apr May Jun Jul Jan Feb Mar Apr May Jun Jul Jan Feb Mar Apr May Jun Jul

I want 6 months and three series -- How can I get the x-axis to display only unique values?

Thanks,

Mike
Ves
Telerik team
 answered on 12 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?