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

I am using objectdatasource with my grid. And the data table is empty i want to see "No records to display." message but instead of that i see nothing.

Is there any way to see this message with objectdatasource.

Regards,
Shinu
Top achievements
Rank 2
 answered on 04 Jun 2008
1 answer
129 views
I built a gridview with an edit button on each row. The problem is, the edit form is always open (for the first row), before I press the edit button. How do I make it open only when I press edit button?
Shinu
Top achievements
Rank 2
 answered on 04 Jun 2008
5 answers
195 views
hello,

i have radchart that i create programmatically.  i add a few line series and 1 bubble series programmatically

i would like to control the point sizes of each series item individually in the bubble series.  i cannot seem to control the individual point sizes of either a point series or a bubble series.

i have autosize = false;  here is some code i am using.

               Telerik.Charting.ChartSeries rulecs = new Telerik.Charting.ChartSeries();
                rulecs.Name = Resources.MyGlobalResources.Rules;
                rulecs.Appearance.FillStyle.MainColor = Color.Green;
                rulecs.Appearance.FillStyle.SecondColor = Color.Green;
                rulecs.Appearance.BubbleSize = 4;
                rulecs.Type = Telerik.Charting.ChartSeriesType.Bubble;
                rulecs.Appearance.PointMark.FillStyle.MainColor = Color.Green;
                rulecs.Appearance.PointMark.FillStyle.SecondColor = Color.Green;
                rulecs.Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.Nothing;
                rulecs.Appearance.PointDimentions.AutoSize = false;          
                rulecs.Appearance.ShowLabels = false;
                rulecs.Appearance.LabelAppearance.Visible = false;

then

to control each individual points

                        if (cbl_rules.Items[0].Selected)
                        {
                            for (int i = 0; i < a.Length; i++)
                            {
                                if (a[i])
                                {
                                    if (rulecs.Items[i].ActiveRegion.Tooltip.Length > 0)
                                        rulecs.Items[i].ActiveRegion.Tooltip = rulecs.Items[i].ActiveRegion.Tooltip + "," + Resources.MyGlobalResources.R1;
                                    else
                                        rulecs.Items[i].ActiveRegion.Tooltip = Resources.MyGlobalResources.R1;
                                    rulecs.Items[i].PointAppearance.Dimensions.AutoSize = false;
                                    rulecs.Items[i].PointAppearance.Dimensions.Height = 6;
                                    rulecs.Items[i].Appearance.FillStyle.MainColor = Color.Red;
                                    rulecs.SetItemColor(i, Color.Red);
                                    rulecs.Items[i].Appearance.FillStyle.MainColor = Color.Red;
                                    rulecs.Items[i].Appearance.FillStyle.SecondColor = Color.Red;
                                    rulecs.Items[i].PointAppearance.Dimensions.Width = 6;
                                }
                            }
                        }

else leave the point as the original size and color.

the points only seem to change when i change the following code

rulecs.Appearance.BubbleSize = 4;

please help as i have looked through the help and forums but have not been able to control the sizing of each point individually.  that said, i can control the color.  please let me know, thanks.

questions.

1.  can i control the size and color of each individual point separately in a point and bubble series? if so, how, if not, why not?

thanks again,


avh
AVH
Top achievements
Rank 1
 answered on 03 Jun 2008
2 answers
202 views
Hello,

I'm working with a page that has a RadGrid and a RadChart that I want to tie to the same dataview so when I apply a filter to the dataview it is reflected on both the grid and the chart.

I'm having no trouble binding the view to the grid and using the Property Builder to format it.  But when I try to basically duplicate the process with the chart I'm getting an error creating the series.

The page load event loads the dataview like this (ignore the fact the the RadGrid references are missing, this is just a copy of the code for testing)...

private void LoadDataView()  
    {  
        SqlConnection myConn = new SqlConnection(ConfigurationSettings.AppSettings["SQLConnectionString"]);  
        SqlDataAdapter da = new SqlDataAdapter();  
        DataSet ds = new DataSet();  
 
        try  
        {  
            myConn.Open();  
            da.SelectCommand = new SqlCommand("select *, DateDiff(d,TimeStamp,GetDate()) as DaysOld, DateDiff(m,TimeStamp,GetDate()) as MonthsOld,RANK() OVER (order by TIMESTAMP) as RowNumber from ReadHistory where CardID = 'ABC00002' order by TimeStamp", myConn);  
            da.Fill(ds, "ReadData");  
            DataView dv = ds.Tables["ReadData"].DefaultView;  
            Session["ReadData"] = dv;  
            RadChart2.DataSource = dv;  
            RadChart2.Series[0].DataYColumn = "Systolic";  
            RadChart2.DataBind();  
        }  
        catch (Exception ex)  
        {  
            MessageBox.Show("Error Loading Data: " + ex.Message.ToString());  
        }  
    } 

The RadChart2.Series[0].DataYColumn = "Systolic" line is thowing the error: "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index."

Is what I'm attempting to accomplish possible? (eg - 1 data view used by both objects?)

Any ideas?

Thanks in advance,
Rick


Rick
Top achievements
Rank 1
 answered on 03 Jun 2008
2 answers
105 views
I am not sure which scetion this posting should go under.
I have a user control page from whic i call a RadWindow.
The RadWindow returns some values.

I need to populate these values in controls on my user control page (textBox and Hyperlink controls)

I cannot set the hyperlink on clientside as on a postback it loses its value.So from the callback function i do postback to the page using 
_doPostBack("radWindow", args)

Then on Page_Load i populate the controls.

The issue i am facing is with my _doPostback my whole page flashes.
I tried using AJAXSettings -> UpdatedControls but it doesn't help.

Am i setting something wrong in the AJAXSettings or is it the _doPostBack that's causing the whole page flash?

Is there any way I can avoid it?
newbie
Top achievements
Rank 1
 answered on 03 Jun 2008
2 answers
241 views
Just started playing with your suite yesterday and I am very impressed, keep up the good work.

I noticed that while enabling or disabling a button on the client the button's style was not being updated.  Of course the exception being if the script ran before the page load, this makes sense since it was before the decorator starts doing its magic.

I created the following helper functions that I can call to disable/enable a button.
This wasn't my first choice, due to hard coding class names I have no control over but it works.
//disables a button that has been decorated with the RadFormDecorator 
function disableButton(button, decorator) 
{ 
    var btnDisabledClass = 'radfdSkinnedFormButton radfd_<%=ConfigurationSettings.AppSettings["Telerik.Skin"]%> radfdInputDisabled'; 
    button.disabled=true; 
    decorator.className = btnDisabledClass;  
} 
 
//enables a button that has been decorated with the RadFormDecorator 
function enableButton(button, decorator) 
{ 
    var btnEnabledClass = 'radfdSkinnedFormButton radfd_<%=ConfigurationSettings.AppSettings["Telerik.Skin"]%>'; 
    button.disabled=false; 
    decorator.className = btnEnabledClass;  
} 
 

I am having issues finding the decorator element that I pass as the second param. I have resorted to hardcoding the client IDs (eww).
var decRemoveMembersFromRole =  document.getElementById("Skinnedctl00_cphPage_ctl00_btnRemoveMembersFromRole"); 

Any suggestions, am I missing something?

Keep up the good work!
Marc

Jon
Top achievements
Rank 2
 answered on 03 Jun 2008
0 answers
126 views
Problem solved -- I just had not implemented all the necessary httpHandlers in the web.config file.
Charles
Top achievements
Rank 1
 asked on 03 Jun 2008
1 answer
129 views
Hi Telerik team,

I have a problem moving a project from RadControls to Prometheus.
In the original project, I used to force the update of some controls using ResolveUpdatedControls event, but now the event it's gone, so I'm using OnPreRender to register some updates.

I have done a separate project, trying to reproduce the behavior, but couldn't reproduce it. I was wondering if you have any ideas on why it doesn't do anything?

Basically, the website consists of dynamically loading user controls, depending on which RadTab was clicked, like in one of your examples.

I tested the site with ajax disabled, it worked like a charm.
With ajax enabled, it fails to update some controls, even though, if I look at the $create call to RadAjaxManager, the ajax settings are persisted ok on the client.

What am I doing wrong?

Thanks,
Raul
Maria Ilieva
Telerik team
 answered on 03 Jun 2008
4 answers
147 views
Hello,

Using any skin, the tabstrip loads with the first tab appearing as the currently selected tab.  The status remains even if another tab has been selected.  Also, the selection hand does not appear for the first tab, the tab that is in the selected state.  Also, the first tab appears selected despite the SelectedIndex being set to a value greater than 0.  How is this resolved?  What client-side code might reset the state based on the selection event?

Any help/guidance would be greatly appreciated.

Thank you.

Doug
Kevin
Top achievements
Rank 1
 answered on 03 Jun 2008
2 answers
316 views

I have used the example in MultiColumn Combo  to make the RADComboBox work with LINQ. I cannot extend the example to show the records in a related table which is used as a lookup.

Have two tables:
    Parent [table1] - List of records  [parentfield1 and parentfield2] parentfield2 links to childfield1 in table2
    Child  [table2] - List of related records by parentfield2 to childfield1 [want to show these records in the ComboBox...childfield1 and childfield2]

What is described below does work in a fashion. It only lists the key field in table 1 (parentfield1).

Code is as follows:

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%
@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server"><title>Untitled Page</title></head>

<

body>

<form id="form1" runat="server">

<div>

<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px" width="784px">

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True" AutoGenerateEditColumn="True" DataMember="DefaultView" DataSourceID="LinqDataSource1" GridLines="None" Skin="Mac">

<ExportSettings><Pdf FontType="Subset" PaperSize="Letter" /><Excel Format="Html" /><Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" /></ExportSettings>

<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" DataMember="DefaultView" DataSourceID="LinqDataSource1" Dir="LTR" Frame="Border" TableLayout="Auto" DataKeyNames="ParentField1"> 

<RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False"> <HeaderStyle Width="20px" /> </RowIndicatorColumn>

 <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Resizable="False" Visible="False"> <HeaderStyle Width="20px" /></ExpandCollapseColumn> 

<Columns>
<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ParentField1" DataType="System.Int32" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="ParentField1" ReadOnly="True" SortExpression="ParentField1" UniqueName="ParentField1"> </telerik:GridBoundColumn>

<telerik:GridTemplateColumn CurrentFilterFunction="NoFilter" DataField="ParentField2" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="ParentField2" SortExpression="ParentField2" UniqueName="ParentField2"> 

<EditItemTemplate> <telerik:RadComboBox ID="RadComboBox1" Runat="server" DataSourceID="LinqDataSource1" Height="100px" RadComboBoxImagePosition="Right" SelectedValue='<%# Bind("ParentField2") %>' Skin="Mac" Width="208px" EnableLoadOnDemand="true" DataTextField="ParentField2" DataValueField="ParentField2"  OnItemsRequested="RadComboBox1_ItemsRequested">
<CollapseAnimation Duration="200" Type="OutQuint" />
<ExpandAnimation Type="OutQuart" />
</telerik:RadComboBox>

</EditItemTemplate>

<ItemTemplate>  <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ParentField2") %>'>  </asp:Label>  </ItemTemplate>

 </telerik:GridTemplateColumn>  

 </Columns>

 <EditFormSettings>

 <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">

 </EditColumn>

 </EditFormSettings>

 </MasterTableView>

 </telerik:RadGrid>

 <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" height="75px" width="75px"> <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0px;" /> </telerik:RadAjaxLoadingPanel>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="DataClassesDataContext" EnableUpdate="True"  TableName="Table1"> </asp:LinqDataSource>

 </telerik:RadAjaxPanel>

  </div>

 </form>

</

body>

</

html>

Default.aspx.cs

using

System; using System.Configuration; using System.Data; using System.Linq; using  system.Web; using System.Web.Security; using System.Web.UI; using  system.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.IO; using Telerik.Web.UI; using System.Collections;

public

partial class _Default : System.Web.UI.Page {

protected void Page_Load(object sender, EventArgs e) { }

protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)

{

DataClassesDataContext db = new DataClassesDataContext();

var initstatus = from s in db.table2

group s by s.childfield1 into x

select new { field1 = x.Key, field2 = x };

RadComboBox combobox = (RadComboBox)sender;

combobox.Items.Clear();

foreach(var table2 in initstatus)

{

RadComboBoxItem item = new RadComboBoxItem();

combobox.Items.Add(item);

} } }

oVan
Top achievements
Rank 2
 answered on 03 Jun 2008
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?