Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
108 views
hi have a radtextbox with emptymessage it was working good until we update to the new version of telerik, now it looks weird, teh emptymessage exceeds the textbox and in the design it looks as i having to textbox how can i fix this???
Galin
Telerik team
 answered on 09 Apr 2012
1 answer
148 views
Hi All,

Is it possible to create a slider with logarithmic scale?

Anybody has experience with this?

Thnks.Marc
Slav
Telerik team
 answered on 09 Apr 2012
2 answers
135 views
I trying to reproduce this following scenario : I have 1 button(btnTest) outside an asp updatePanel, inside then i have 2 rad notifications, i have other as update panel with 2 radtextBox and 1 button(btnInsert), what i want is: i will click on the btnTest it will show 'Start Processing', and when done(after 8 seconds), appears 'Done!' (OK, this works), but lets suppose that i click on button, the Start Processing appears, and while the request running(doesnt appear 'Done!' yet), i click on the btnInsert, so i wanna the btnInsert, do what he need to do, and the request of btnTest keep running. Why my actual code doesnt work for that? Can someone point me to right direction, or help me provide a code?

thanzk
the asp code
<form id="form1" runat="server">
<telerik:RadScriptManager ID="Script" runat="server" />
<div id="divPrincipal">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function Start() {
                var notification = $find('<%= RadNotification1.ClientID %>');
                notification.show();
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadButton ID="btnTeste" runat="server" Text="Teste" OnClick="btnTeste_Click" OnClientClicked="Start" />
    <asp:UpdatePanel ID="updNotificacao" UpdateMode="Conditional" runat="server" ChildrenAsTriggers="false">
        <ContentTemplate>
            <telerik:RadNotification ID="RadNotification1" runat="server" EnableRoundedCorners="true"
                EnableShadow="true" Text="Começou a Processar" Title="Mensagem" Width="300" Height="100" />
            <telerik:RadNotification ID="RadNotification2" runat="server" EnableRoundedCorners="true"
                EnableShadow="true" Text="Execucao Concluida" Title="Mensagem" Width="300" Height="100" />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnTeste" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdatePanel runat="server" ID="updForm" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <table>
                <tr>
                    <td>Codigo:</td>
                    <td>
                        <telerik:RadTextBox ID="txtNome" runat="server" TextMode="SingleLine" />
                    </td>
                </tr>
                <tr>
                    <td>Descricao:</td>
                    <td>
                        <telerik:RadTextBox ID="txtDescricao" runat="server" TextMode="SingleLine" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadButton ID="btnInserir" Text="Inserir" runat="server" OnClick="btnInserir_Click" />
                        <asp:Label Text="" ID="lblResultado" runat="server" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnInserir" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</div>
</form>

the .cs code
protected void btnTeste_Click(object sender, EventArgs e)
{
    Task task = Task.Run(() =>
    {
        Thread.Sleep(8000);
        RadNotification2.Text = "Execução Concluída!";
        RadNotification2.Show();
    });
    task.Wait();
}
 
protected void btnInserir_Click(object sender, EventArgs e)
{
    C001 c = new C001();
    int i = c.RegistrarDados(txtDescricao.Text);
 
    if (i != 0)
    {
        lblResultado.Text = "Registro Inserido!";
    }
    else
    {
        lblResultado.Text = "Registro nao pode ser Inserido!";
    }
    updForm.Update();
}

In this actual scenario, if i click on the second button while the request of first button still running, apparently, the first request is canceled, because the msg of my radNotificaion will never appears.
Bruno
Top achievements
Rank 1
 answered on 09 Apr 2012
3 answers
267 views
Why does this line of code:
<telerik:RadAjaxLoadingPanel ID="InvDateLoadPanel" runat="server" ForeColor="#EEB211" BackImageUrl="~/images/ajax/BMGI_GoldLoading.gif" BackgroundPosition="Center" />

Produce 4 loading images across my loading panel??

Full code for Ajax Manager:
<telerik:RadAjaxManager ID="AjxMgr" runat="server">
 
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="pnl_InvDate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnl_InvDate" LoadingPanelID="InvDateLoadPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
 
    </telerik:RadAjaxManager>

and the control:
<asp:Panel ID="pnl_InvDate" runat="server">
     <table id="tbl_InvDate" border="0" cellpadding="4" cellspacing="0">
          <tr>
               <td>Invoice Date</td>
               <td>
                    <telerik:RadDatePicker ID="rdt_InvDate" runat="server" Skin="Hay" AutoPostBack="true" ShowPopupOnFocus="true" Width="100" OnSelectedDateChanged="selected" />
               </td>
          </tr>
   </table>
</asp:Panel>

Controls version: 2012.1.301.40

TIA
JB
Eyup
Telerik team
 answered on 09 Apr 2012
0 answers
135 views
Hello,
I am embeding DetailsView inside Telerik gridview.Now I want to bind Detailsview according to rowIndex of GridView.

Below are the code
.aspx page
---------------------------------------------------

<%

 

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

 

<%

 

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

 

<%

 

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

 

<!

 

 

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 id="Head1" runat="server">

 

 

 

 

<!-- custom head section -->

 

 

 

<style type="text/css">

 

 

 

.viewWrap

 

{

 

 

padding: 15px;

 

 

 

background: #2291b5 0 0 url(Img/bluegradient.gif) repeat-x;

 

}

 

 

 

.contactWrap

 

{

 

 

padding: 10px 15px 15px 15px;

 

 

 

background: #fff;

 

 

 

color: #333;

 

}

 

 

 

.contactWrap td

 

{

 

 

padding: 0 20px 0 0;

 

}

 

 

 

.contactWrap td td

 

{

 

 

padding: 3px 20px 3px 0;

 

}

 

 

 

.contactWrap img

 

{

 

 

border: 1px solid #05679d;

 

}

 

 

</style>

 

 

 

<!-- end of custom head section -->

 

</

 

 

head>

 

<

 

 

body>

 

 

 

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

 

 

 

<div>

 

 

 

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

 

<UpdatedControls>

 

 

 

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

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 

<%

 

-- DataSourceID="SqlDataSource1"--%>

 

 

 

<telerik:RadGrid ID="RadGrid1" OnPreRender="RadGrid1_PreRender"

 

 

 

runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"

 

 

 

AllowPaging="True" PageSize="5" GridLines="None" ShowGroupPanel="true" OnItemCreated="RadGrid1_ItemCreated"

 

 

 

OnItemCommand="RadGrid1_ItemCommand">

 

 

 

<PagerStyle Mode="NumericPages"></PagerStyle>

 

<%

 

-- DataSourceID="SqlDataSource1"--%>

 

 

 

<MasterTableView DataKeyNames="SrNo" AllowMultiColumnSorting="True"

 

 

 

GroupLoadMode="Server">

 

 

 

<NestedViewTemplate>

 

 

 

<asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">

 

 

 

<telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0">

 

 

 

<Tabs>

 

 

 

<telerik:RadTab runat="server" Text="Comment" PageViewID="PageView2">

 

 

 

</telerik:RadTab>

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

 

 

 

<telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">

 

 

 

<telerik:RadPageView runat="server" ID="PageView2" Width="460px">

 

 

 

 

<div class="contactWrap">

 

 

 

<table cellpadding="0" cellspacing="0">

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("SrNo") %>'

 

 

 

Visible="false" runat="server" />

 

 

 

<asp:DetailsView ID="DetailsView1" DataSourceID="SqlDataSource4" AllowPaging="true" GridLines="None" Width="100%"

 

 

 

runat="server" Font-Italic="true" AutoGenerateRows="false">

 

 

 

<Fields>

 

<%

 

-- <asp:BoundField DataFormatString="{0:MM/dd/yyyy}" HeaderText="BirthDate:" HtmlEncode="false"

 

DataField="BirthDate" HeaderStyle-Font-Italic="false" HeaderStyle-Font-Bold="true" />--

 

 

%>

 

 

 

<asp:BoundField HeaderText="Comment" DataField="Comment" HeaderStyle-Font-Italic="false"

 

 

 

HeaderStyle-Font-Bold="true" />

 

 

 

</Fields>

 

 

 

</asp:DetailsView>

 

 

 

<asp:SqlDataSource ID="SqlDataSource4" ConnectionString="<%$ ConnectionStrings:db_TempConnectionString %>"

 

 

 

ProviderName="System.Data.SqlClient" SelectCommand="Select comment from tbApproveHistorical where comment ='first changes'"

 

 

 

runat="server">

 

 

 

<SelectParameters>

 

 

 

<asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="SrNo" />

 

 

 

</SelectParameters>

 

 

 

</asp:SqlDataSource>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</div>

 

 

 

</telerik:RadPageView>

 

 

 

</telerik:RadMultiPage>

 

 

 

</asp:Panel>

 

 

 

</NestedViewTemplate>

 

 

 

<Columns>

 

<%

 

-- <telerik:GridTemplateColumn Visible="false">

 

<asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("SrNo") %>'

Visible="false" runat="server" />

</telerik:GridTemplateColumn>--

 

 

%>

 

 

 

<telerik:GridBoundColumn SortExpression="SrNo" HeaderText="SrNo" HeaderButtonType="TextButton"

 

 

 

DataField="SrNo" UniqueName="SrNo" Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn SortExpression="Period" HeaderText="Period" HeaderButtonType="TextButton"

 

 

 

DataField="Period" UniqueName="Period">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton"

 

 

 

DataField="Name" UniqueName="Name">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn SortExpression="Date" HeaderText="Date" HeaderButtonType="TextButton"

 

 

 

DataField="Date" UniqueName="Date">

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowDragToGroup="true" />

 

 

 

</telerik:RadGrid>

 

<%

 

-- <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:db_TempConnectionString %>"

 

ProviderName="System.Data.SqlClient" SelectCommand="SELECT ROW_NUMBER() OVER(ORDER BY AH.UpdatedOn DESC) As SrNo,

PC.PeriodContextRef AS Period,

(UR.UserFirstName + ' ' + UR.UserLastName) AS Name,

AH.Comment,

CONVERT(varchar,AH.UpdatedOn,101) AS [Date]

FROM tbApproveHistorical AH WITH(NOLOCK)

LEFT OUTER JOIN dbIndigo_Central.dbo.tbPeriodCont PC WITH(NOLOCK)

ON (AH.PeriodContextRefId = PC.PeriodContextRefId)

LEFT OUTER JOIN dbIndigo_Central.dbo.tbUser UR WITH(NOLOCK)

ON (AH.LoginId = UR.LoginId)

ORDER BY UpdatedOn DESC"

runat="server"></asp:SqlDataSource>--

 

 

%>

 

 

 

</div>

 

 

 

</form>

 

</

 

 

body>

 

</

 

 

html>

 

-------------------------------------------------------------------------
.cs file

using

 

 

System;

 

using

 

 

System.Collections.Generic;

 

using

 

 

System.Linq;

 

using

 

 

System.Web;

 

using

 

 

System.Web.UI;

 

using

 

 

Telerik.Web.UI;

 

using

 

 

System.Web.UI.WebControls;

 

public

 

 

partial class G1 : System.Web.UI.Page

 

{

 

 

//protected void RadChart1_ItemDataBound(object sender, Telerik.Charting.ChartItemDataBoundEventArgs e)

 

 

 

//{

 

 

 

// e.SeriesItem.Name = (string)DataBinder.Eval(e.DataItem, "pName");

 

 

 

//}

 

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

clsGetData obj = new clsGetData();

 

RadGrid1.DataSource = obj.GetData();

RadGrid1.MasterTableView.DataKeyNames =

 

new string[] { "SrNo" };

 

RadGrid1.MasterTableView.DataSource = obj.GetData();

 

}

 

 

protected void RadGrid1_PreRender(object sender, EventArgs e)

 

{

 

 

if (!Page.IsPostBack)

 

{

RadGrid1.MasterTableView.Items[0].Expanded =

 

true;

 

RadGrid1.MasterTableView.Items[0].ChildItem.FindControl(

 

"InnerContainer").Visible = true;

 

}

}

 

 

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

 

if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem)

 

{

((

 

GridDataItem)e.Item).ChildItem.FindControl("InnerContainer").Visible =

 

!e.Item.Expanded;

}

 

 

 

 

//clsGetData obj = new clsGetData();

 

 

 

//((GridDataItem)e.Item).ChildItem.FindControl("DetailsView1").DataSource = obj.GetData();

 

 

 

// ((GridDataItem)e.Item).ChildItem.FindControl("DetailsView1").DataBind();

 

 

 

//if (((GridDataItem)e.Item).ChildItem.FindControl("DetailsView1").ClientID=="")

 

 

 

//{ }

 

}

 

 

 

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

 

if (e.Item is GridNestedViewItem)

 

{

e.Item.FindControl(

 

"InnerContainer").Visible = ((GridNestedViewItem)e.Item).ParentItem.Expanded;

 

}

}

}


Thanks for any help
Satyajit Kadam.
Satyajit
Top achievements
Rank 1
 asked on 09 Apr 2012
1 answer
85 views
I want to hide >> and << button in  calendar and align the button added in the footertemplate to center?
Princy
Top achievements
Rank 2
 answered on 09 Apr 2012
2 answers
116 views
Guys i want to replace grid built in icon for next page that is > and prev page is <
which i have done as 
PagerTextFormat="Välj sida: <a onclick='javascript:openPreviousPage();'><img src='../Images/newimages/left_singel_arrow.png' style='cursor:pointer;' title='Previous' /></a> {4} <a onclick='javascript:openNextPage();'><img src='../Images/newimages/right_singel_arrow.png' style='cursor:pointer;' title='Next' /></a> &nbsp;&nbsp; Visar sida {0} av {1}, post {2} till {3} av {5}"

then i have hide the > and < as 
GridPagerItem pager = (GridPagerItem)e.Item;            
            hdnPageCount.Value = pager.Paging.PageCount.ToString();            
            pager.PagerContentCell.Controls[1].Visible = false; //&lt if page count = 5                        
            if (pager.Paging.PageCount <= 5)
            {
                if (pager.Paging.PageCount == 1)
                {
                    pager.PagerContentCell.Controls[5].Visible = false;//&gt if page count=1 then it is on 5
                }
                if (pager.Paging.PageCount == 2)
                {
                    pager.PagerContentCell.Controls[7].Visible = false;//&gt if page count=2 then it is on 7
                }
                if (pager.Paging.PageCount == 3)
                {
                    pager.PagerContentCell.Controls[9].Visible = false; //&gt if page count=3 then it is on 9
                }
                if (pager.Paging.PageCount == 4)
                {
                    pager.PagerContentCell.Controls[11].Visible = false; //&gt if page count=4 then it is on 9
                }
                if (pager.Paging.PageCount == 5)
                {
                    pager.PagerContentCell.Controls[13].Visible = false;//&gt if page count = 5 then 13 
                }                                
            }
but the problem is that  when there are thousands of pages, it is impossible to get pager control index.
how to hide parmanently &gt and &lt from pagerStyle.?????
Note: i have used my own Next Page and Prev Page images instead of built in <, > 
Nasir
Top achievements
Rank 1
 answered on 09 Apr 2012
5 answers
360 views
Hi

I am trying to export to excel from an ajaxified radgrid with template columns. When I use Excel.Format = GridExcelExportFormat.ExcelML I get a blank spreadsheet. If I use GridExcelExportFormat.Html it prints out fine, but with an extra blank row between the header row and the rest of the data. I checked the ExportOutput in RadGrid1_GridExporting method and the thead has 2 rows in it for some reason?? The 2nd row is full of blank <th> tags.

I can't use the GridExcelExportFormat.Html format because I have multiple controls in each template column.

Here is my export function:
protected void lnkExport_Click(object sender, EventArgs e)
{
    RadGrid1.MasterTableView.GetColumn("ClientSelectColumn").Visible = false;
    RadGrid1.ExportSettings.ExportOnlyData = true;
    RadGrid1.ExportSettings.IgnorePaging = true;
    RadGrid1.ExportSettings.OpenInNewWindow = true;
    RadGrid1.ExportSettings.FileName = "MyExport_" + DateTime.Now.ToString("dd_MMM_yyyy");
    RadGrid1.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
    RadGrid1.MasterTableView.ExportToExcel();
}
Daniel
Telerik team
 answered on 09 Apr 2012
1 answer
92 views
Hi,

    Tell me about your self.
    how many KL = Letter ?
Rumen
Telerik team
 answered on 09 Apr 2012
2 answers
209 views
Hi,
We have nested Rad Splitter and RadPane scenario. and in one place we have a RadListBox  in RadPane with 100% height and it take all the space in Internet Explorer. But is only show 3 rows height in Mozilla FireFox. 
         <telerik:RadPane ID="rp" runat="server" Width="100%" MinHeight="200" Scrolling="None" BackColor="Red">
                                                            <telerik:RadListBox
                                                                runat="server" ID="lst"
                                                                Height="100%" Width="250px"
                                                                AllowReorder="true" OnClientDeleted="lstMeasuresItemDeleted"
                                                                EnableDragAndDrop="true" SelectionMode="Multiple">
                                                                <Items>                                                                                                                                       
                                                                    <telerik:RadListBoxItem Value="1" Text="A"/>
                                                                    <telerik:RadListBoxItem Value="2" Text="B"/>
                                                                    <telerik:RadListBoxItem Value="3" Text="C"/>
                                                                </Items>   
                                                            </telerik:RadListBox>
                                                        </telerik:RadPane>
Is there anyway to fix it for Mozilla Firefox to have 100% heigh in radpane.
Thanks
Sam
Top achievements
Rank 1
 answered on 09 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?