Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
81 views
Hi All,

I am using client side exporting grid to excel, i dont want to export all the colums from grid, how can i do this.

Please help me regarding this.
pradeep k
Top achievements
Rank 1
 answered on 18 Nov 2009
2 answers
169 views

Hello,

I can't figure out how to reference a RadioButtonList in a RadGrid GRidtemplate column header template:

 

<Columns>  
<telerik:GridTemplateColumn DataField="cd_nr" HeaderText="cdNr" UniqueName="cdNr"> 
  
<HeaderTemplate>  
<asp:RadioButtonList ID="rbtnLst_cdNo" runat="server" RepeatDirection="Vertical"> 
  
<asp:ListItem Text="1" Value="1"></asp:ListItem>  
</asp:RadioButtonList> 
  
</HeaderTemplate> 

 

 

In codebehind, I have:
RadioButtonList selCd = rGrd_trckList.MasterTableView.FindControl("rbtnLst_cdNo") as RadioButtonList;

but that's just null.

What am I missing?
knut

 

 

 

 

 

 

 

 

Knut
Top achievements
Rank 1
 answered on 18 Nov 2009
3 answers
155 views
HI,

I am using 2008.3.1105.35 of the asp.net ajax controls.

I want to know if the Grid control can be created in such a way as to display any number of nested "child" or detail tables.  I need to represent a parent - child relationship where the children can have children, which can have children, and on and on. 

I also need to be able to insert / edit / delete another child table at any level in the grid.
An example will give you a clearer picture of what I want to do.  Here is an example of how my data might look:

-- ParentGroup1
      ChildGroup1
          Task1
          Task2
--ParentGroup2
       Task1
       ChildGroup1
             Task2
             ChildGroup2
                   ChildGroup3
                          Task1
--ParentGroup3
       ChildGroup1
         .....
             ChildGroupN
                   Task1

Users can add ChildGroups to ParentGroups or to other ChildGroups, at any level.  There is no restriction on the levels of groups.

I've seen the Self Referencing Hierarchy grid example below, but I don't see how that would be a solution to my problem. 
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx

Q.  Can I use the Telerik grid to accomplish this?

If so, would I need to do it all programatically?  Like, by adding detail tables on the fly?

Thanks In Advance.
sahil
Top achievements
Rank 1
 answered on 18 Nov 2009
2 answers
195 views
I have created a photo-upload feature for our website using radUpload. We want users to provide a title and description for each image. The 'Adding Additional Fields' example did the trick there.

How would one go about validating these additional fields so that we can require the title/description?

Anyone have an example?

Thanks.
Nikesh Bhagat
Top achievements
Rank 1
 answered on 18 Nov 2009
1 answer
123 views
I have a tooltip manager on my page that has 2 dropdowns and a textbox on it.  When the user clicks an edit button I display the tooltip and load the controls.  This works great the first time the button is clicked. However if the user closes the tooltip and clicks a second edit button on the page the tooltip shows with the information from the original item.  I have stepped through the code and it shows that the values of the controls are being set correctly all the way throughout.  However it doesn't seem that the actual controls are being updated on the page.  I would appreciate any help anyone could provide.

        protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)  
        {  
           
            string[] values = args.Value.Split('|');  
            if (values.Length > 0)  
            {  
                this.UpdateToolTip(values[0], args.UpdatePanel, int.Parse(values[1]));  
            }              
        }  
 
        private void UpdateToolTip(string section, UpdatePanel update, int index)  
        {              
            ToolTipContent ctl = (ToolTipContent)Page.LoadControl("tooltipcontent/" + section + ".ascx");              
            ctl.SetIndex(index); //This sets the values of the controls  
            update.ContentTemplateContainer.Controls.Add(ctl);           
            //At this point (and after) the controls look like they are set correctly in the code   
            //it is only when the tooltip is loaded that it shows incorrectly.  
        } 
Landon Martin
Top achievements
Rank 1
 answered on 18 Nov 2009
2 answers
201 views
I have a ToolTipManager on  a page when a button is clicked loads a UserControl based off of which item is clicked.  In this particular instance it has two dropdowns and a textbox.  It also has a save button.  The problem I am having is that I cannot get any event to trigger inside the tooltip.  When I click my save button the OnAjaxUpdate event fires but the button click event does not.  Here is what I have codewise:
In my page:
<telerik:RadToolTipManager ID="tltAvailability" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" 
                                                                           ShowEvent="OnClick" HideEvent="ManualClose" 
                                                                           Position="MiddleLeft" Animation=FlyIn RenderInPageRoot="true" Width="250" Height="200" 
                                                                            ></telerik:RadToolTipManager> 

The user control:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="repAvailability.ascx.cs" Inherits="cox.applications.web.ehealth.physicianreferral.AvailabilityToolTip" %> 
<%@ Reference Control="~/tooltipcontent/ToolTipContent.ascx" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<script type="text/javascript">  
 
</script> 
<asp:FormView ID="fvwAvailability" runat="server" OnItemCreated="CreatedFormItem" OnItemCommand="fvwAvailability_ItemCommand" > 
    <ItemTemplate>          
      
        Type of Availability:<br /> 
        <telerik:RadComboBox ID="ddlTypes" runat="server" DataValueField="ID" DataTextField="Description" ZIndex="10000"          
                              AutoPostBack="true" OnSelectedIndexChanged="SelectedType">                                 
                             </telerik:RadComboBox><br /> 
        Age Available:<br /> 
        <asp:TextBox ID="txtAge" runat="server" Width="75px" ></asp:TextBox><br /> 
        Range of Availbility:<br /> 
        <telerik:RadComboBox ID="ddlRange" runat="server" DataTextField="Description" DataValueField="ID" ZIndex="10000" >       
        </telerik:RadComboBox><br />                  
    </ItemTemplate>      
</asp:FormView> 
<asp:Button ID="btnSave" runat="server" OnClick="SaveClicked" Text="Save" UseSubmitBehavior="false" /> 
Here's the code AjaxCode:
        protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)  
        {  
            _currentPhysician = Shared.CurrentPhysician;  
            string[] values = args.Value.Split('|');  
            if (values.Length > 0)  
            {  
                Control saveButton = this.UpdateToolTip(values[0], args.UpdatePanel, int.Parse(values[1]));  
            }      
        }    
 
        private Control UpdateToolTip(string section, UpdatePanel update, int index)  
        {  
            ToolTipContent ctl = (ToolTipContent)Page.LoadControl("tooltipcontent/" + section + ".ascx");  
            ctl.SetIndex(index);  
            update.ContentTemplateContainer.Controls.Add(ctl);  
            return ctl.SaveButton;              
        }        
 
/* THIS CODE IS FROM THE USER CONTROL */ 
        public void SetIndex(int index)  
        {  
            _index = index;  
            SetDataSource();  
        }  
 
        protected override void SetDataSource()  
        {              
            if (this._index >= 0)  
            {  
                List<AvailabilityInfo> inf = Shared.CurrentPhysician.AvailabilityInfo;  
 
                fvwAvailability.DataSource = (from i in inf  
                                              where inf.IndexOf(i) == this._index  
                                              select i);  
 
                _baseInfo = (ApprovableItem)fvwAvailability.DataItem;  
            }  
            else 
            {  
                fvwAvailability.DataSource = null;  
                _baseInfo = new ApprovableItem(Null.NullInteger, StatusType.Pending, Null.NullInteger, Null.NullDate, Shared.User, Null.NullString);  
            }  
            fvwAvailability.DataBind();          
        }  
 
        protected void SaveClicked(object sender, EventArgs e)  
        {  
            SaveInfo();  
        } 

The code in SaveInfo is irrelevant because SaveClicked is not even firing! A huge thank you in advance for any help I can get as I'm pushing deadline.
Landon Martin
Top achievements
Rank 1
 answered on 18 Nov 2009
3 answers
132 views
Hi,

I have a grid with couple of columns, but only column with check box is editable. I want that editable column in edit mode all the time.

With the following code, whenever the page postbacks, editable column turns into non-editable.
protected void grdAnnouncements_PreRender(object sender, System.EventArgs e) 
        { 
            foreach (GridItem item in grdAnnouncements.MasterTableView.Items) 
            { 
                item.Edit = true;                
            }                         
        } 
 
 

Any help is appreciated.

Veshala
Top achievements
Rank 1
 answered on 17 Nov 2009
4 answers
214 views
I have a line chart with 2 series.  series1 will always have less values than series2.   The last value of series1 causes the line do drop to the x axis, I would like it to just end.

  Private Sub MakeGraph(ByVal myyear As Int32, ByVal _Val1 As String, ByVal _val2 As String) 
        Dim table As DataTable 
        table = Get52WeekGraph 
        rctrend.DataSource = table 
        rctrend.DataBind() 
        rctrend.PlotArea.XAxis.DataLabelsColumn = "weekname" 
        Dim series1 As New Telerik.Charting.ChartSeries() 
        Dim series2 As New Telerik.Charting.ChartSeries() 
        rctrend.Series.Clear() 
        Dim minval As Double = 1000000 
        Dim maxval As Double = 0 
        For Each rowView As DataRowView In table.DefaultView 
            Dim seriesItem1 As New Telerik.Charting.ChartSeriesItem() 
            seriesItem1.Label.Visible = False 
            If Not IsDBNull(rowView("tyval")) Then 
                seriesItem1.YValue = CDbl(rowView("tyval")) 
                If seriesItem1.YValue < minval Then minval = seriesItem1.YValue 
                If seriesItem1.YValue > maxval Then maxval = seriesItem1.YValue 
                series1.DataLabelsColumn = rowView("weekname") 
            End If 
 
            series1.AddItem(seriesItem1) 
            Dim seriesItem2 As New Telerik.Charting.ChartSeriesItem() 
            seriesItem2.Label.Visible = False   
            If Not IsDBNull(rowView("lyval")) Then 
                seriesItem2.YValue = CDbl(rowView("lyval")) 
                If seriesItem2.YValue < minval Then minval = seriesItem2.YValue 
                If seriesItem2.YValue > maxval Then maxval = seriesItem2.YValue 
                series1.DataLabelsColumn = rowView("weekname") 
            End If 
            series2.AddItem(seriesItem2) 
        Next 
 
        series1.Name = _Val1 
        series2.Name = _val2 
 
        Dim valdiff As Double 
        Dim mybuff As Double 
        Dim mystep As Double 
        valdiff = maxval - minval 
 
 
        mybuff = valdiff * 0.2 
        minval = CInt(minval - mybuff) 
        maxval = CInt(maxval + mybuff) 
        mystep = (maxval - minval) / 10 
 
        rctrend.Series.Add(series1) 
        rctrend.Series.Add(series2) 
        rctrend.PlotArea.Chart.DefaultType = Telerik.Charting.ChartSeriesType.Line 
        rctrend.PlotArea.YAxis.AutoScale = False 
        rctrend.PlotArea.YAxis.IsZeroBased = False 
        rctrend.PlotArea.YAxis.MinValue = minval 
        rctrend.PlotArea.YAxis.MaxValue = maxval 
        rctrend.PlotArea.YAxis.Step = mystep 
        rctrend.PlotArea.XAxis.MaxValue = 52 
 
        rctrend.ChartTitle.TextBlock.Text = "Score" 
End Sub 
d with the last real value. 
Schlurk
Top achievements
Rank 2
 answered on 17 Nov 2009
1 answer
214 views
I have a RadListBox that is filled in the code behind when the SelectedIndex of a RadDropDown is changed.  On the same screen is  a button the will open a rad window that will allow the user to edit the information that is show in the RadListBox.  I am trying to set up client side script that will reload the RadListBox when the RadWindow is closed.  There does not seem to be a set_datasource.  Is there anyway to do this?
Schlurk
Top achievements
Rank 2
 answered on 17 Nov 2009
3 answers
184 views
Im editing using advancetemplate with a user control who binds the properties (start, end, subject and id).

In the updatecommand event i can see the appointment and modified appointment has changed accordingly.  but the radscheduler doesnt get refreshed.

btw im using radajaxmanager indicating the radscheduler.

any hints in this?
robertw102
Top achievements
Rank 1
 answered on 17 Nov 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?