Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
319 views

Hi,

 

I have radgrid on my page with some template colomns. All the columns has textboxs with text_changed events.

 

If user clicks on any of the textbox of any row of grid, I want to know the row number. Is it possible from client side to know the row number?

 

I tried ItemCommand event, it gets raised when I click on any textbox but if I tab from one textbox to another at that time it doesn’t get raised. And on moving from one textbox to another I want to know row number from grid.

 

Please let me know any client or server side event to get the row number. It would be better if there is a way to get it from client side.

Tarulatta Patel
Top achievements
Rank 1
 answered on 14 Apr 2009
1 answer
151 views
Hi All,

         I am using RadGrid in which skin is Vista, mode="NextPrevAndNumeric" in PagerStyle tab. But it is showing only paging(1,2,3..) without the pagesize dropdown.

         Herewith i have attached my RadGrid for your vision. Please reply as soon as possible.


Code:

<asp:UpdatePanel ID="Update1" runat="server">
                        <ContentTemplate>

                            <telerik:RadGrid Width="99.5%" ID="grdIDR" runat="server" OnNeedDataSource="callthis"
                                AllowPaging="True" AllowSorting="True" Skin="Vista" AutoGenerateColumns="False" ShowFooter="true"
                                enableajax="True" GridLines="Vertical" ClientSettings-Resizing-AllowColumnResize="true"
                                ClientSettings-Resizing-EnableRealTimeResize="true" PageSize="5" OnPageIndexChanged="grdIDR_PageIndexChanged"
                                OnItemDataBound="grdIDR_ItemDataBound" MasterTableView-CommandItemDisplay="Top">
                                <PagerStyle mode="NextPrevAndNumeric" AlwaysVisible="true" />  
                                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                                    <Selecting AllowRowSelect="True" />
                                    <ClientEvents />
                                </ClientSettings>
                                <ExportSettings FileName="PaymentScheduleGrid" OpenInNewWindow="True" ExportOnlyData="True">
                                </ExportSettings>
                                <MasterTableView GroupLoadMode="Client" TableLayout="Fixed" Width="100%">
                                    <NoRecordsTemplate>
                                        <asp:Label ID="lblNRF" runat="server" Text="No Records to display."></asp:Label>
                                    </NoRecordsTemplate>                                    
                                    <CommandItemTemplate>
                                        <table width="100%" style="background-color: whitesmoke; border-color: whitesmoke;"
                                            border="0">
                                            <tr>
                                                <td align="right">
                                                    <asp:LinkButton ID="linkbutton1" ToolTip="Export to Excel" runat="server" ForeColor="black">
                                                    <img title="export to excel"
                                                                                    style="border:0px;vertical-align:middle;" alt=""
                                                                                    src="../images/excel.jpg"  width="13" height="13" />&nbsp;Export to Excel
                                                    </asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </CommandItemTemplate>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="sno" SortExpression="sno" HeaderText="S.No."
                                            UniqueName="sno">
                                            <ItemStyle HorizontalAlign="Left" Width="45px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="45px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="Name" SortExpression="Name" HeaderText="Customer Name"
                                            UniqueName="Name">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="CustID" SortExpression="CustID" HeaderText="Cust ID"
                                            UniqueName="CustID">
                                            <ItemStyle HorizontalAlign="Center" Width="80px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="80px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridHyperLinkColumn DataTextField="ESIID" SortExpression="ESIID" HeaderText="ESIID"
                                            UniqueName="ESIID">
                                            <ItemStyle HorizontalAlign="Center" Width="145px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="145px" />
                                        </telerik:GridHyperLinkColumn>
                                        <telerik:GridBoundColumn DataField="Zone" SortExpression="Congestion Zone" HeaderText="Congestion Zone"
                                            UniqueName="Congestion Zone">
                                            <ItemStyle HorizontalAlign="Left" Width="125px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="125px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="FlowDate" SortExpression="FlowDate" HeaderText="Flow Date"
                                            UniqueName="FlowDate">
                                            <ItemStyle HorizontalAlign="Center" Width="160px" />
                                            <HeaderStyle HorizontalAlign="Center" Width="160px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="ProfileName" SortExpression="ProfileName" HeaderText="Profile Name"
                                            UniqueName="ProfileName">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>

                        </ContentTemplate>
                    </asp:UpdatePanel>

Thanks & Regards
sudheer
Dimo
Telerik team
 answered on 14 Apr 2009
9 answers
158 views
  Hi,
    I was thinking of creating two aspx pages.  I want to create a third aspx page with two Radpanes, and include the first two aspx pages on this third aspx page within the radpanes and then I would like to drag detailtables from one aspx page to the other. 
    I am wondering what the best way to do this might be ?
  thanks,
  David
Sebastian
Telerik team
 answered on 14 Apr 2009
1 answer
85 views

Hi:

I have a simple javascript triggered by a submit button:

. . .

<asp:Content ID="Content2" ContentPlaceHolderID="CPH1" runat="server">

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

<script type="text/javascript">

<!-- Beginning of JavaScript -

function HasCompleteInfo()

{

theMDFName = document.getElementById('<%=Txt_MDFName.UniqueID%>').value;

if (theMDFName.length < 10)

{

alert ("Please enter a valid hospital name.");

return false;

} else if (ValidateEmail(document.getElementById('<%=Txt_EMail.UniqueID%>').value) == false) {

alert("Invalid email format.\nPlease enter a valid email in the format user@host.domain.");

return false;

} else {

return true;

}

}

 

function TestAJaxConditionAtStart(sender, args)

{

}

 

//-->

</script>

</telerik:RadCodeBlock>

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

<telerik:radformdecorator id="RadFormDecorator1" Skin="WebBlue" runat="server" decoratedcontrols="all">

</telerik:radformdecorator>

<telerik:RadAjaxManager ID="RAJforForm"

ClientEvents-OnRequestStart="TestAJaxConditionAtStart"

runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="DDLCountry">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="DDLCountry" LoadingPanelID="ALP01" />

<telerik:AjaxUpdatedControl ControlID="DDLProv" LoadingPanelID="ALP01" />

</UpdatedControls>

</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="BtnSubmit">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="pnlBackGround01" LoadingPanelID="ALP01" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="ALP01"

Transparency="40" BackColor="White" Height="75px" Width="75px"

runat="server">

<img id="ALPImg01"

alt="Loading..."

src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;"

/>

</telerik:RadAjaxLoadingPanel >

<asp:Panel ID="pnlBackGround01" BackImageUrl="./Images/WebBlue_Pnl_Bckgrd.gif" runat="server">

. . .

<asp:TextBox ID="Txt_MDFName" TextMode="SingleLine" Width="200px" MaxLength="100" Font-Size="8pt" runat="server" />

. . .
<asp:Button ID="BtnSubmit" Font-Size="8pt" Text="Submit" OnClientClick="if (!HasCompleteInfo()) return false;" OnClick="BtnSubmit_Click" runat="server" />

. . .

</asp:Panel>

</asp:Content>



The above javascript (HasCompleteInfo()) runs perfectly with IE, but the alert fails to be triggered in FireFox. I'm mystified as to why.  Any clarification would be appreciated.

 

Justin

Dimo
Telerik team
 answered on 14 Apr 2009
2 answers
111 views
I follow the demo example on Load on Demand and does not work for it. 

The button is declared as

 

<asp:ImageButton ID="ibEDSInfo" runat="server" ImageUrl="~/Images/info.gif"

 

 

OnClientClick="return false" />

 


The Rad Tool Tip Manager as

 

<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Position="BottomCenter" RelativeTo="Element" HideEvent="LeaveToolTip"

 

 

Animation="Fade" Width="350px" Skin="Office2007" OnAjaxUpdate="onAjaxUpdate">

 

 

</telerik:RadToolTipManager>

The Server code is

 

 

protected void onAjaxUpdate(object sender, ToolTipUpdateEventArgs args)

 

{

 

this.UpdateToolTip(args.Value, args.UpdatePanel);

 

}

 

private void UpdateToolTip(string elementID, UpdatePanel panel)

 

{

 

Control ctrl = Page.LoadControl("~/UserControls/EDSDetailUC.ascx");

 

panel.ContentTemplateContainer.Controls.Add(ctrl);

 

UserControls_EDSDetailUC details = (UserControls_EDSDetailUC)ctrl;

 

details.EDSId = elementID;

}


The code to add the image to the tool tip manager is

 

RadToolTipManager1.TargetControls.Add(ibEDSInfo.ClientID, oTool.EDSId.ToString(),

true);


However, it seems the ajaxupdate is not raised at any circumstances.

What is wrong with my code snippet?


 

Tsvetie
Telerik team
 answered on 14 Apr 2009
1 answer
223 views
Hi,

I am trying to dynamically populate a ragdrid based on the selection of a Radtree.
I see the results from the stored procedure being populated in the variable but for some reason i cannot see it in the grid.
I am creating the radgrid at design time but no data source is assigned to it.

Here is the code: I get a message in the grid saying "No Records to display" 
I see the results in the "data" variable but nothing in the grid.

Thanks

 protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)

    {

        var data = GetData(new SqlCommand("exec results 'Sector','Code'));

        var a = data.Rows.Count;

        var c = data.Rows[1].ToString();

        RadGrid1.DataSource = data;

        RadGrid1.Rebind();

        

    }

Here is the grid at design time:

<telerik:RadGrid ID="RadGrid1" runat="server" 

                            AllowPaging="True" AllowSorting="True" 

                            GridLines="None" Skin="Office2007" 

                            >

<MasterTableView CellSpacing="-1" AutoGenerateColumns="False">

<RowIndicatorColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

</MasterTableView>

                            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">

                                <Selecting AllowRowSelect="True" />

                            </ClientSettings>

                        </telerik:RadGrid>

Georgi Krustev
Telerik team
 answered on 14 Apr 2009
3 answers
106 views
Hello,
I need to modify the advanced edit and insert form to let users add additional informatie to an appointment. They must have the ability to select the information from a selectionlist (not a combobox). Can you provide me with a sample code to show me how to include a modal selectionlist in the advanced form?

With regards,
Pim
Dimitar Milushev
Telerik team
 answered on 14 Apr 2009
2 answers
76 views
I have searched and not found an answer to the following problem:

In Firefox 3 and IE6, the undo, redo, insert table, insert symbol, and foreground color icons all have invert triangles a few mm below the toolbar. Anyone have ideas?
Allen Smothers
Top achievements
Rank 2
 answered on 14 Apr 2009
1 answer
73 views
Hi All,

    Previously, I have used Telerik.2008 Version (dll). When i upgrade to Telerik.2009 version dll, then vista skin color is changed.

How can i get the previous telerik 2008 version vista color in 2009.

Thanks & Regards
Sudheer
Paul
Telerik team
 answered on 14 Apr 2009
5 answers
145 views
We have a page that contains a RadDockLayout with multiple RadDocks.  Some of these RadDocks don't apply to certain users under certain conditions so we have code that may set Visible=false on some of the docks.  This code was fine in the Q3 2008 version of the controls but since we've upgraded to the Q1 2009 version (2009.1.402.35) this code now produces a Javascript "'undefined' is null or not an object" runtime error when the page loads in the browser.

Below is a basic example of our layout and it exhibits the problem I just mentioned.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestHiddenDock._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">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />              
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">  
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="900px">  
                <telerik:RadDock ID="RadDock1" runat="server" Width="900px" Title="Visible">  
                    <ContentTemplate>Visible by default</ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="RadDock2" runat="server" Width="900px" Title="Invisible by Default">  
                    <ContentTemplate>Invisible by default.</ContentTemplate> 
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
    </form> 
</body> 
</html> 

Visiblity is set to false for RadDock2 in the code behind (see below).
using System;  
 
namespace TestHiddenDock  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
                RadDock2.Visible = false;  
        }  
    }  

Is there a workaround for this problem?
Glenn Miller
Top achievements
Rank 1
 answered on 14 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?