Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
115 views
Hi,
I am using a ajax tool modalpopup in a ascx page which is having update panel and also the aspx page that is having this usercontrol(ascx) is having the updatepanel.
 
In this modalpopup we need to have a Radgrid that display various results based on the search.

But when a Radgrid is placed in the modalpopup then it is throwing me the follwoing error

" Sys.InvalidOperationException: A control is already associated with the element "

FYI: If i am using a normal(visualstudio) GridView then everything is working fine.

Please let me know how do we fix the issue?

Thanks,
Chaitanya
Yavor
Telerik team
 answered on 07 Jul 2010
1 answer
142 views
Hi,

Need help to bind version name against Date. Normal value we can bind. But version value come as "Name:SARA Version:1.59.25.2" and "Name:SARA Version:1.59.25.3". How to plot this value against Date. Is there any way? I attached sample code.



.aspx

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="cc1" %>

 

<!

 

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></title>

 

</

 

head>

 

<

 

body>

 

 

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

 

 

<div>

 

 

<telerik:RadChart ID="testPlot" runat="Server" Width="700px"

 

 

AutoLayout="True" Skin="Office2007"

 

 

DefaultType="Line">

 

 

<PlotArea>

 

 

<XAxis>

 

 

<Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">

 

 

<MajorGridLines PenStyle="Solid" Color="209, 222, 227" Width="0"></MajorGridLines>

 

 

<TextAppearance TextProperties-Color="51, 51, 51"></TextAppearance>

 

 

</Appearance>

 

 

<AxisLabel>

 

 

<TextBlock>

 

 

<Appearance TextProperties-Color="Black"></Appearance>

 

 

</TextBlock>

 

 

</AxisLabel>

 

 

</XAxis>

 

 

<YAxis>

 

 

<Appearance Color="134, 134, 134" MinorTick-Color="134, 134, 134" MinorTick-Width="0" MajorTick-Color="134, 134, 134">

 

 

<MajorGridLines Color="209, 222, 227"></MajorGridLines>

 

 

<MinorGridLines Color="233, 239, 241"></MinorGridLines>

 

 

<TextAppearance TextProperties-Color="51, 51, 51"></TextAppearance>

 

 

</Appearance>

 

 

<AxisLabel>

 

 

<TextBlock Text="">

 

 

<Appearance TextProperties-Color="Black"></Appearance>

 

 

</TextBlock>

 

 

</AxisLabel>

 

 

</YAxis>

 

 

<Appearance>

 

 

<FillStyle MainColor="White" FillType="Solid"></FillStyle>

 

 

<Border Color="134, 134, 134"></Border>

 

 

</Appearance>

 

 

</PlotArea>

 

 

<Appearance Corners="Round, Round, Round, Round, 6">

 

 

<FillStyle FillType="Image">

 

 

<FillSettings ImageDrawMode="Flip" BackgroundImage="{chart}" ImageFlip="FlipX"></FillSettings>

 

 

</FillStyle>

 

 

<Border Color="138, 138, 138"></Border>

 

 

</Appearance>

 

 

 

<Series>

 

 

<cc1:ChartSeries Name="Series 1" Type="Line">

 

 

<Appearance>

 

 

<FillStyle MainColor="55, 167, 226" SecondColor="22, 85, 161" FillType="Solid">

 

 

<FillSettings GradientMode="Vertical"></FillSettings>

 

 

</FillStyle>

 

 

<PointMark Visible="True" Figure="Circle" FillStyle-MainColor="Red" FillStyle-SecondColor="Red" Dimensions-Height="5px" Dimensions-Width="5px" Dimensions-AutoSize="false">

 

<

 

FillStyle MainColor="Red" SecondColor="Red"></FillStyle>

 

 

</PointMark>

 

 

<TextAppearance TextProperties-Color="Black"></TextAppearance>

 

 

<Border Color="69, 115, 167" />

 

 

</Appearance>

 

 

</cc1:ChartSeries>

 

 

</Series>

 

 

<Legend Visible="false">

 

 

<Appearance Visible="False" Position-AlignedPosition="TopRight" Dimensions-Margins="15.4%, 3%, 1px, 1px"

 

 

Dimensions-Paddings="2px, 8px, 6px, 3px">

 

 

<ItemTextAppearance TextProperties-Color="Black">

 

 

</ItemTextAppearance>

 

 

<ItemMarkerAppearance Figure="Square">

 

 

<Border Color="134, 134, 134"></Border>

 

 

</ItemMarkerAppearance>

 

 

<FillStyle MainColor=""></FillStyle>

 

 

<Border Color="Transparent"></Border>

 

 

</Appearance>

 

 

</Legend>

 

 

<ChartTitle TextBlock-Text="">

 

 

<Appearance Position-AlignedPosition="Top">

 

 

<FillStyle MainColor=""></FillStyle>

 

 

</Appearance>

 

 

<TextBlock Text="">

 

 

<Appearance TextProperties-Font="Tahoma, 13pt" TextProperties-Color="Black"></Appearance>

 

 

</TextBlock>

 

 

</ChartTitle>

 

 

</telerik:RadChart>

 

 

</div>

 

 

</form>

 

</

 

body>

 

</

 

html>

 


.code

using

 

System;

 

using

 

System.Collections.Generic;

 

using

 

System.Linq;

 

using

 

System.Web;

 

using

 

System.Web.UI;

 

using

 

System.Web.UI.WebControls;

 

using

 

System.Data;

 

using

 

Telerik.Charting;

 

using

 

Telerik.Web.UI;

 

using

 

System.Web.UI.DataVisualization.Charting;

 

public

 

partial class Default4 : System.Web.UI.Page

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

if (!Page.IsPostBack)

 

{

 

DataTable deviceTable = new DataTable();

 

deviceTable.Columns.Add(

new DataColumn("Date"));

 

deviceTable.Columns.Add(

new DataColumn("Value"));

 

 

 

DataRow newRow = deviceTable.NewRow();

 

newRow[

"Date"] = "6/29/2010";

 

newRow[

"Value"] = "Version 1.59.25.2";

 

deviceTable.Rows.Add(newRow);

 

 

DataRow newRow1 = deviceTable.NewRow();

 

newRow1[

"Date"] = "6/30/2010";

 

newRow1[

"Value"] = "Version 1.59.25.3";

 

deviceTable.Rows.Add(newRow1);

 

DataRow newRow2 = deviceTable.NewRow();

 

newRow2[

"Date"] = "7/01/2010";

 

newRow2[

"Value"] = "Version 1.59.25.4";

 

deviceTable.Rows.Add(newRow2);

testPlot.DataSource = deviceTable;

testPlot.PlotArea.XAxis.DataLabelsColumn =

"Date";

 

testPlot.Series[0].DataYColumn =

"Value";

 

testPlot.DataBind();

testPlot.Visible =

true;

 

testPlot.PlotArea.YAxis.AxisLabel.Visible =

true;

 

testPlot.PlotArea.XAxis.AxisLabel.Visible =

true;

 

testPlot.PlotArea.XAxis.AxisLabel.TextBlock.Text =

"Date";

 

 

 

}

}

}

Ves
Telerik team
 answered on 07 Jul 2010
1 answer
119 views
Hi! I need your help. I need to allow the client user to modify the order of the rows, for expample:

Number     Question      
    1           ¿What is your name?          Up  Down
    2           ¿How are you?         Up  Down
    3           ¿Do you like cars?   Up  Down

SAVE


The client can change the order of the rows, and finally click save button to save the changes made in the order. I found the follow example: Data Grid Reorder Moverows 

You add a templatecolumn

<asp:TemplateColumn> 
                <ItemTemplate> 
                    <asp:ImageButton runat="server" ToolTip="Click to move this row up" ImageUrl="~/App_Themes/WEBSWAPP/images/up.gif" 
                        ID="btnUp" CommandName="MoveUp" /> 
                    <asp:ImageButton runat="server" ToolTip="Click here to move this row down" ImageUrl="~/App_Themes/WEBSWAPP/images/down.gif" 
                        ID="ImageButton1" CommandName="MoveDown" /> 
                </ItemTemplate> 
            </asp:TemplateColumn> 

But when i try to cath the event onCommand dosen't fire. I search and i found that radgrid don't fire the event. Somebody have another idea please??  

Thanks

Veli
Telerik team
 answered on 07 Jul 2010
1 answer
125 views
I want to have a tabstrip with a text box on it but I cant access the value of the textbox in code behind.  What am I missing? This should be simple but I cannot find the answer anywhere.

 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Selected="True" Text="test">

 

 

<TabTemplate>

 

 

<asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged"></asp:TextBox>

 

 

<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton>

 

 

</TabTemplate>

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 



 

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)

 

 

Dim rad As TextBox = RadTabStrip1.FindControl("TextBox1")

 

Response.Write(rad.Text)

 

End Sub

 



Shinu
Top achievements
Rank 2
 answered on 07 Jul 2010
3 answers
434 views
Hi,

I need to include a request.querystring variable in the DataNavigateUrlFormatString but I am not sure how to do it?

Can anyone help?
Princy
Top achievements
Rank 2
 answered on 07 Jul 2010
1 answer
150 views
I have a modal tooltip and tried the javascript found here in the forum to set focus to a radTextbox and was unable to make it work.

Here is the HTML markup:

<

 

body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadScriptBlock ID="rsb" runat="server">
<script type ="text/javascript">
function rttPromptShow(sender, eventArgs) {

 

setTimeout(

function() {
var txt = $get("<%=txtTest.ClientID %>");
try {
  if (txt)
    txt.focus();

 

 

}

 

catch (e) { };

}, 500);

}

 

</script>
</telerik:RadScriptBlock>
<div>
<asp:Button ID="btnTeset" runat="server" Text="Show Tool Tip" />
<telerik:RadToolTip ID="rttPrompt" runat="server" Modal="true"
                               Position="Center" OnClientShow="rttPromptShow"
                               ShowEvent="FromCode" HideEvent="FromCode" Width="300px" Height="150px">
<telerik:RadTextBox ID="txtTest" runat="server" Text="Test">
</telerik:RadTextBox>
</telerik:RadToolTip>
</div>
</form>

</

 

body>

and here is the code behind:

 

 

Protected Sub btnTeset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTeset.Click
   Call rttPrompt.Show()

 

 

End Sub

I would also like the text in the text box to be selected.

Any help would be greatly appreciated.

Kevin


 

 

 

 

 

 

 

Svetlina Anati
Telerik team
 answered on 07 Jul 2010
1 answer
100 views
Hi there,

I need to change the text and the button text on Pagerstyle when pagerstyle mode set to NextPrevNumericAndAdvanced. Look this:
<PagerStyle Mode="NextPrevNumericAndAdvanced"
In this telerik link http://www.telerik.com/help/aspnet-ajax/grdusingpagettextformat.html i see a exemple (the last exemple in this link) that text changed in mode Slider. Look:
<PagerStyle Mode="Slider" PagerTextFormat="{4} Page {0} from {1}, rows {2} to {3} from {5}"/>
....
<ClientSettings>
           
<ClientMessages PagerTooltipFormatString="Slider pages {0} from {1}" />
</
ClientSettings>
Can i change this text (if possible, change text button GO and CHANGE) in mode NextPrevNumericAndAdvanced?
Thks for help. 
Pavlina
Telerik team
 answered on 07 Jul 2010
2 answers
200 views
Hello,
Is it possible to have multiple GridClientSelectColumns in the same grid with the 'AllowMultipleRowSelection' set to true? The issue that I am having is that when I click one columns header checkbox and it goes and checks the other columns checkboxes.
Any ideas?
Regards,
RB
Rafeek Basheer
Top achievements
Rank 1
 answered on 07 Jul 2010
5 answers
219 views
I have a RadGrid sitting inside a RadAjaxPanel.  If I select a row in the grid a postback occurs, however if I do it for a second time nothing happens.  If I remove the radAjaxPanel then all works fine.  Below is a code snippet, am I missing something?
<telerik:RadAjaxLoadingPanel runat="server" ID="progressLoader" MinDisplayTime="1500" InitialDelayTime="1000" Skin="Default"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel runat="server" ID="rap_panel1" LoadingPanelID="progressLoader" EnableViewState="true"  EnableEmbeddedScripts="true" EnableAJAX= "True" >
        <telerik:RadGrid ID="RadGrid1"  
                         runat="server"
                         GridLines="Vertical"
                         ShowGroupPanel="True"
                         PageSize="5"
                         AllowSorting="true"
                         AllowPaging="true"
                         AutoGenerateColumns="false"
                         EnableHeaderContextMenu="true"
                         Skin="Default" >            
            <ExportSettings>
                <Pdf FontType="Subset" PaperSize="A4" />
                <Excel Format="Html" />
                <Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" />
            </ExportSettings>
            <MasterTableView DataKeyNames="ROWCLICK" GroupLoadMode="Client" CommandItemDisplay="Top">
                <PagerStyle  Mode="NextPrevNumericAndAdvanced" />
               <%-- <CommandItemSettings ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true" ShowExportToWordButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />--%>
               <CommandItemTemplate>

                      <asp:LinkButton ID="btn_save" runat="server" CommandName="saveGrid" ><asp:Image runat="server" ID="img_save" ImageUrl="~/_resources/images/icons/tick.png"/></asp:LinkButton>
                        <asp:LinkButton ID="btn_excel" runat="server" CommandName="excel" ><asp:Image runat="server" ID="Image1" ImageUrl="~/_resources/images/icons/xls_grey.gif"/></asp:LinkButton>
                        
                    
                </CommandItemTemplate>
            </MasterTableView>
            <ClientSettings ReorderColumnsOnClient="True"
                            AllowDragToGroup="True"
                            AllowColumnsReorder="True"
                            EnablePostBackOnRowClick="true"
                            AllowGroupExpandCollapse="true">
                <Resizing AllowRowResize="True"
                          AllowColumnResize="True"
                          EnableRealTimeResize="True"
                          ResizeGridOnColumnResize="False">
                </Resizing>
            </ClientSettings>
        </telerik:RadGrid>
</telerik:RadAjaxPanel>

mabs
Top achievements
Rank 1
 answered on 07 Jul 2010
1 answer
97 views
the css loads fine on local. On the server the css does not show up. The Webresource.axd file is empty.. please help
Genady Sergeev
Telerik team
 answered on 07 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?