Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
176 views
I am looking at the the reference online that has this example:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
   ConnectionString="<$ ConnectionStrings>"
   SelectCommand="SELECT [ID] as [DataKeyID], [ID] as [InsertID], [Name], [Order] FROM [Cities] ORDER BY [Order]"
   DeleteCommand="DELETE FROM [Cities] WHERE [ID] = @ID">
<DeleteParameters>
   <asp:Parameter Name="ID" Type="Int32" />
<//DeleteParameters>
</asp:SqlDataSource>
<telerik:RadListBox ID="RadListBox1"
   runat="server"
   AllowAutomaticUpdates="true"   
   AllowTransfer="true"
   TransferToID="RadListBox2"
   AutoPostBackOnTransfer="true"
   DataKeyField="DataKeyID"             
   DataTextField="Name"  
   DataValueField="ID"                
   DataSourceID="SqlDataSource1" >
</telerik:RadListBox>

If you want to use the field, bound to the DataKeyField of the first RadListBox in the InsertCommands of the second ListBox, select it twice in the SelectCommand and give them different names. Then use the first one for the DataKeyField of the first RadListBox, and the second one for the InsertCommand of the second RadListBox.

Here is an example:

2. In the second RadListBox:

  • Set the AllowAutomaticUpdates="True" (so the DataSource is updated automatically)
  • Make sure that the DataSource has its InsertCommand set.

Here is an example:

     

<asp:SqlDataSource ID="SqlDataSource2" runat="server"
   ConnectionString="<$ ConnectionStrings>"
   SelectCommand="SELECT [ID], [Name], [Order] FROM [Cities] ORDER BY [Order]"
   InsertCommand="INSERT INTO [Cities] ([Name], [Order]) VALUES (@Name, @Order)">
<InsertParameters>
   <asp:Parameter Name="Name" Type="String" />
   <asp:Parameter Name="Order" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>
<telerik:RadListBox ID="RadListBox2"
   runat="server"
   AllowAutomaticUpdates="true"  
   DataKeyField="ID"            
   DataTextField="Name"  
   DataValueField="ID"                
   DataSourceID="SqlDataSource1" >
</telerik:RadListBox>


However I am failing to see where the [InsertID] column value is actually used in the second data source.  Could you clarify this?  This is exactly what I need to do for the project I am working on.

Thanks
Bozhidar
Telerik team
 answered on 26 Dec 2011
1 answer
92 views
I have an aspx page that include an ascx (bulletin.ascx) and also I'm using a RadToolTipManager
and loading its panel on OnAjaxUpdate. It works fine.
On that event I do somethig like this
Dim ctrl As Control = Page.LoadControl("/News/Bulletin/Bulletin.ascx")
panel.ContentTemplateContainer.Controls.Add(ctrl)
Dim myBulletin As ASP.Bulletin = DirectCast(ctrl, ASP.Bulletin)
ctrl = Nothing
 
myBulletin.showThisNews_IDNews = elementID
myBulletin.setCssStyleSheet = "/Preferences/News/Style/Bulletin/bulletinStyles.css"

it does not take the stylesheet (i guess it is too late)

so my problem is:
how to set a stylesheet on the RadToolTipManager? considering i also have the same ascx control, shown in the tooltip, somewhere else on the aspx page with a different stylesheet(this works)

hope it's clear.

ASPX
_
calendar with radtooltipmanager showing myAscx(1)
_
inlcuding myAscx(2)

each one sets a different style sheets

Thanks

Svetlina Anati
Telerik team
 answered on 26 Dec 2011
4 answers
109 views
Hi,

I have a RadWindowManager.

In the code behind I create a new window after a button click and set the OffsetElementID together with an animation effect (fade)

The animation effect does not seem to work whenever I use the OffsetElementID.

Has anyone come across this before?

Thanks.
Dobromir
Telerik team
 answered on 26 Dec 2011
0 answers
95 views
Hi all,
I used Splitter Control to develop my Project. I have a problem below:
1/ When the Text is very long=> the scrollbar is shown
2/ We click on the scrollbar and drag down=> 2 splitter is drag too

I want to fix the position of the splitter.

Please view some images in attached file.


Please help me to solve it

Thanks alot
Ky
Top achievements
Rank 1
 asked on 26 Dec 2011
6 answers
132 views

 Hi guys,

I'm facing the following issue on one of our SharePoint Front ends. Here is the what I'm getting in the logs:

Error on page: http://www.oursharepoint.com/_wpresources/RadEditorSharePoint/5.2.0.0__1f131a624888eeed/Resources/CssEditor.css System.Web.HttpException: Request timed out. We have verified the web.config entries using the following intstructions

1.       Instructions 11

2.       Instructions 22

Is anyone having idea why are we facing this issues?

I would appreciate any help


BR
Falak

Rumen
Telerik team
 answered on 26 Dec 2011
7 answers
304 views
These are my ASPX code and CSS code... i am unable to get the border color to appear even after i set the border width and border color manually ( on the aspx page )

                             <telerik:RadToolTipManager CssClass="ToolTipContent" ID="RadToolTipManager1" runat="server" 
                                    AutoCloseDelay="200000" ContentScrolling="Both" Height="360px" HideEvent="LeaveTargetAndToolTip" 
                                    MouseTrailing="True" OnAjaxUpdate="OnAjaxUpdate" Position="MiddleRight" 
                                    RelativeTo="BrowserWindow" ShowDelay="300" Width="410px" BackColor="Transparent" ManualClose="True"   > 
                                    </telerik:RadToolTipManager> 

CSS Class
   .ToolTipContent   
        {   
            background-color:#DCD2BE !important;       
                    color:Black !important;       
                    font-size:0.8em !important;    
                      
                    border-color:#DCD2BE !important;    
                    border-width:thick !important;  
        }  

Thankx in advance
Svetlina Anati
Telerik team
 answered on 26 Dec 2011
5 answers
290 views
Hello,

I'm experiencing some issues with RadChart when using time values in X axis.

I'm trying to develop a sample web for displaying measures that are periodically registered from a source. These measures are displayed using both a grid and a chart. I read the measures from the last minute and I show its values in the grid (date/time of the measure and its value), and in the chart (x axis show the time and y axis shows the value of the measures).

For example, supposing that every 5 seconds we have a new measure, we will show 13 measures in a full minute. with a timer, I'm reading the measures and updating the grid and the chart with the values of the last minute. The problem is that, sometimes, the chart is not displaying all the measures (only displays 11 values, while the grid displays 13 values).
The measures list object is the same for the grid and the chart (I use DataSource and DataBind() for both), and the chart sometimes doesn't work fine.

What is happening with this? Do you know if there is a known issue for causing this situation?

Here's the code from a similar app that reproduces the issue using random values:
    public class Measure
    {
        private DateTime mtime; //time of measurement
        public DateTime Mtime
        {
            get { return mtime; }
            set { mtime = value; }
        }
 
        private double numericMtime; //for chart representation
        public double NumericMtime
        {
            get { return numericMtime; }
            set { numericMtime = value; }
        }
 
        private double value; //value of measurement
        public double Value
        {
            get { return this.value; }
            set { this.value = value; }
        }
 
        public Measure(DateTime dt, double v)
        {
            mtime = dt;
            numericMtime = dt.ToOADate();
            value = v;
        }
    }
 
 
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            GenerateMeasures();
 
            myTimer.Interval = 10 * 1000;
            myTimer.Enabled = true;
 
            startBtn.Enabled = false;
            stopBtn.Enabled = true;
        }
    }
 
    protected void myTimer_Tick(object sender, EventArgs e)
    {
        GenerateMeasures();
    }
 
    private void GenerateMeasures()
    {
        DateTime start, end;
        start = DateTime.Now;
        end = start.AddSeconds(60); //full period
 
        double interval = 5; //interval between measures
 
        //generate new random measures list
        Random r = new Random();
        Measure m;
        List<Measure> measureList = new List<Measure>();
        DateTime tcont = start;
        while (tcont <= end)
        {
            m = new Measure(tcont, r.Next(5, 95));
            measureList.Add(m);
 
            tcont = tcont.AddSeconds(interval);
        }
 
        //set data to grid
        myGrid.DataSource = measureList;
        myGrid.DataBind();
 
        //config chart (x axis)
        double tenSencondsStep = (1.0 / (24.0 * 60.0 * 60.0))*10.0;
        myChart.PlotArea.XAxis.AutoScale = false;
        myChart.PlotArea.XAxis.AddRange(measureList[0].NumericMtime, measureList[measureList.Count - 1].NumericMtime, tenSencondsStep);
         
        //set data to chart
        myChart.DataSource = measureList;
        myChart.DataBind();
    }
 
    protected void startBtn_Click(object sender, EventArgs e)
    {
        myTimer.Enabled = true;
 
        startBtn.Enabled = false;
        stopBtn.Enabled = true;
    }
 
    protected void stopBtn_Click(object sender, EventArgs e)
    {
        myTimer.Enabled = false;
 
        startBtn.Enabled = true;
        stopBtn.Enabled = false;
    }
}


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <asp:Timer ID="myTimer" runat="server" Interval="5000" ontick="myTimer_Tick">
    </asp:Timer>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
 
        <table style="width:100%;">
            <tr>
                <td style="width: 260px;">
                    <telerik:RadGrid ID="myGrid" runat="server"
                        AllowSorting="True" AutoGenerateColumns="False" Height="350px"
                        GridLines="None" Width="250px">
                        <ClientSettings>
                            <Scrolling AllowScroll="True" />
                        </ClientSettings>
                        <MasterTableView NoMasterRecordsText="No measures." GridLines="None"
                            TableLayout="Fixed">
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="Mtime"
                                    DataFormatString="{0:dd/MM HH:mm:ss}" HeaderText="Date/Time"
                                    UniqueName="Mtime">
                                    <HeaderStyle HorizontalAlign="Left" Width="70px"  Font-Size="7.9pt" Wrap="False" />
                                    <ItemStyle HorizontalAlign="Left" Width="70px" Font-Size="7.9pt" Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Value"
                                    DataFormatString="{0:0.#}" HeaderText="Value" UniqueName="Value">
                                    <HeaderStyle HorizontalAlign="Center" Width="35px"  Font-Size="7.9pt"/>
                                    <ItemStyle HorizontalAlign="Center" Width="35px"  Font-Size="7.9pt" ForeColor="80, 80, 80"/>
                                </telerik:GridBoundColumn>
                            </Columns>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                        </MasterTableView>
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"
                            EnableImageSprites="True">
                        </HeaderContextMenu>
                    </telerik:RadGrid>
                </td>
 
                <td>
                    <telerik:RadChart ID="myChart" runat="server" DefaultType="Line" 
                        Skin="LightGreen" Width="650px" Height="450px">
                                <Appearance>
                                    <FillStyle MainColor="Transparent">
                                    </FillStyle>
                                    <Border Color="DarkGreen" Visible="False" />
                                </Appearance>
                                <Series>
                                    <telerik:ChartSeries DataXColumn="NumericMtime"
                                        DataYColumn="Value" Name="Measure" Type="Line">
                                        <Appearance>
                                            <FillStyle FillType="Solid" MainColor="230,126,0">
                                                <FillSettings>
                                                    <ComplexGradient>
                                                        <telerik:GradientElement Color="243, 206, 119" />
                                                        <telerik:GradientElement Color="236, 190, 82" Position="0.5" />
                                                        <telerik:GradientElement Color="210, 157, 44" Position="1" />
                                                    </ComplexGradient>
                                                </FillSettings>
                                            </FillStyle>
                                            <LabelAppearance Visible="False">
                                            </LabelAppearance>
                                            <PointMark Visible="True" Dimensions-AutoSize="False" Dimensions-Height="5px" Dimensions-Width="5px">
                                                <FillStyle MainColor="196,108,0"  FillType="Solid">
                                                </FillStyle>
                                            </PointMark>
                                            <TextAppearance TextProperties-Color="112, 93, 56">
                                            </TextAppearance>
                                            <Border Color="176, 100, 75" />
                                        </Appearance>
                                    </telerik:ChartSeries>
                                </Series>
                                <Legend Visible="False">
                                    <Appearance Corners="Round, Round, Round, Round, 6" Overflow="Row"
                                        Position-AlignedPosition="Top">
                                        <ItemTextAppearance TextProperties-Color="113, 94, 57"                                                               
                                            TextProperties-Font="Segoe UI, 8pt">
                                        </ItemTextAppearance>
                                        <Border Color="225, 217, 201" />
                                        <Shadow Blur="50" />
                                    </Appearance>
                                </Legend>
                                <PlotArea>
                                    <EmptySeriesMessage>
                                        <TextBlock Text="No measures.">
                                            <Appearance TextProperties-Color="Gray"
                                                TextProperties-Font="Segoe UI, 9pt">
                                            </Appearance>
                                        </TextBlock>
                                    </EmptySeriesMessage>
                                    <XAxis AutoScale="True" LayoutMode="Normal">
                                        <Appearance Color="226, 218, 202" MajorTick-Color="88, 138, 77"
                                            ValueFormat="ShortDate" CustomFormat="HH:mm:ss">
                                            <MajorGridLines Color="177, 207, 170" />
                                            <LabelAppearance RotationAngle="90" Dimensions-AutoSize="True" Dimensions-Height="100px" Dimensions-Width="100px">
                                            </LabelAppearance>
                                            <TextAppearance TextProperties-Color="57, 78, 38"
                                                TextProperties-Font="Segoe UI, 8pt"
                                                Dimensions-Margins="1px, 1px, 1px, 20px">
                                            </TextAppearance>
                                        </Appearance>
                                        <AxisLabel Visible="False">
                                            <TextBlock>
                                                <Appearance TextProperties-Color="112, 93, 56">
                                                </Appearance>
                                            </TextBlock>
                                        </AxisLabel>
                                    </XAxis>
                                    <YAxis IsZeroBased="False" AutoScale="True" >
                                        <Appearance Color="226, 218, 202" MajorTick-Color="88, 138, 77"
                                            MinorTick-Color="114, 100, 61">
                                            <MajorGridLines Color="177, 207, 170" />
                                            <MinorGridLines Color="231, 225, 212" />
                                            <TextAppearance TextProperties-Color="57, 78, 38"
                                                TextProperties-Font="Segoe UI, 8pt">
                                            </TextAppearance>
                                        </Appearance>
                                        <AxisLabel Visible="True">
                                            <Appearance Visible="True">
                                            </Appearance>
                                            <TextBlock Visible="False">
                                                <Appearance TextProperties-Color="112, 93, 56">
                                                </Appearance>
                                            </TextBlock>
                                        </AxisLabel>
                                    </YAxis>
 
                                <Appearance>
                                <FillStyle MainColor="254, 255, 228" SecondColor="Transparent"></FillStyle>
 
                                <Border Color="226, 218, 202"></Border>
                                </Appearance>
 
                                </PlotArea>
                                <ChartTitle Visible="False">
                                <Appearance Visible="False">
                                <FillStyle MainColor=""></FillStyle>
                                </Appearance>
 
                                <TextBlock>
                                <Appearance TextProperties-Color="77, 153, 4"></Appearance>
                                </TextBlock>
                                </ChartTitle>
                            </telerik:RadChart>
 
                </td>
            </tr>
            <tr>
                <td style="width: 260px">
                     </td>
 
                <td>
                     </td>
            </tr>
            <tr>
                <td style="width: 260px">
                    <telerik:RadButton ID="startBtn" runat="server" onclick="startBtn_Click"
                        Text="Start">
                    </telerik:RadButton>
 <telerik:RadButton ID="stopBtn" runat="server" onclick="stopBtn_Click" Text="Stop">
                    </telerik:RadButton>
                </td>
 
                <td>
                     </td>
            </tr>
        </table>
 
    </div>
    </form>
</body>
</html>

Regards,
John.
john
Top achievements
Rank 1
 answered on 26 Dec 2011
1 answer
175 views
Hi,

  I want to apply filter expression for radgrid for two columns like

RadGrid1.MasterTableView.FilterExpression = "([column1 ] NOT IN ('America') AND [column2] NOT IN ('Male'))"

I tried with above expression but the result excludes all 'America' irrespective of second condition.

Is the above filter expression is correct?

Thanks,
Pavan

Shinu
Top achievements
Rank 2
 answered on 26 Dec 2011
5 answers
138 views
I have to print a report with the data in the grid, I first create the file replace the merge fields with the required fields and then I need to show the radgrid data..
with the export to pdf or word function, it creates a word or pdf file in which the radgrid data gets placed,
I want to place the radgrid data into that file itself how do I do it?

Thanks ,

Sneha
Daniel
Telerik team
 answered on 26 Dec 2011
7 answers
93 views
Hello Telerik Team,

Am using a Rad Window, with some divs as shown

When i select any div at first time, it got focused and selected.But when select other , it is not getting focused and selected.



This is working fine in IE7,8 but not working in IE9. Am using RadWindow.Net2.dll with a version 1.9.1.0 and asp.net 2.0

But this works fine , when there are more than one tab opened in IE9 browser. Dont know whether this is related to IE or Rad issue.
Please help me on this.

Thanks for your time,
Vinay
Dobromir
Telerik team
 answered on 26 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?