Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
87 views
Hello,

Prompt character is always showing in RadMaskedTextbox. I want to show Prompt character only when I focus on textbox,.

How can I do this ?
Atchut
Top achievements
Rank 1
 asked on 01 Jun 2012
2 answers
154 views
Hello,

Can we apply mask edit extender to rad numeric textbox ?

I want to use mask for my numeric textbox. 

Thanks in advance
Atchut
Top achievements
Rank 1
 answered on 01 Jun 2012
0 answers
366 views
Hi,

I have a grid with two GridButtonColumn columns. In the ItemCommand event handler I want to extract the key value of the clicked row. First, I've used the following technique:
var keyValue = (e.Item as GridDataItem).GetDataKeyValue("keyField"));

It worked with one of the columns but soon I've found out that it doesn't work with the other one. In this case it always extract the key value from the very first row. So I've used another technique (directly from your documentation):
GridDataItem item = MyGrid.Items[int.Parse(e.CommandArgument)];
var keyValue = item.GetDataKeyValue("keyField");

This technique works with the second column but - surprise, surprise :-) - it doesn't work with the first one (where e.CommandArgument is always empty).

OK, I can deal with it (when e.CommandArgument is empty use one technique, when not empty - another) but I'm curious, what is the rule. I don't set the CommandArgument value explicitly - in any case. The columns are not designed identically but the differences seem to be not vital:
  • CommandName standard (RadGrid.DeleteCommandName) / non-standard
  • ImageUrl declared / declared but further adjusted dynamically (ItemDataBound, ImageButton control found, its ImageUrl attribute adjusted)
  • not sortable / sortable

The worst is that I've tried to reproduce all that stuff in a test application but I've failed (only the first technique worked - e.CommandArgument was always empty).

Can the authors of RadGrid check, when they set CommandArgument to the index in the Items collection and when - not?

PS.
I'm using Q1 2010 version of RadControls for ASP.NET Ajax
Tomasz M.Lipiński
Top achievements
Rank 1
 asked on 01 Jun 2012
2 answers
118 views
I have been attempting to get a detail table working connecting through a LINQ data source in a Grid. When I attempt to expand the detail table, the ID for the SelectParameter is being passed through as null. Does anyone know why this might be happening?

ASPX code:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgFacilities">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgFacilities" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid DataSourceID="ldsFacilities" AutoGenerateColumns="false" AllowPaging="True" PageSize="20" AllowSorting="True" ID="rgFacilities" runat="server">
    <MasterTableView DataKeyNames="FacilityID" DataSourceID="ldsFacilities" AllowMultiColumnSorting="False" GroupLoadMode="Server">
        <DetailTables>
            <telerik:GridTableView DataKeyNames="EquipmentID" DataSourceID="ldsEquipment" Width="100%"
                runat="server" AutoGenerateColumns="true">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="FacilityID" MasterKeyField="FacilityID" />
                </ParentTableRelation>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn SortExpression="Name" HeaderText="Facility Name"
                DataField="Name" UniqueName="Name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="City" HeaderText="City"
                DataField="City" UniqueName="City">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="Region" HeaderText="State/Province"
                DataField="Region" UniqueName="Region">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country"
                DataField="Country" UniqueName="Country">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description"
                DataField="Description" UniqueName="Description" AllowSorting="false">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
<asp:LinqDataSource ID="ldsFacilities" OnSelecting="ldsFacilities_Selecting" runat="server">
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsEquipment" OnSelecting="ldsEquipment_Selecting" runat="server">
    <SelectParameters>
        <asp:SessionParameter Name="FacilityID" SessionField="FacilityID"/>
    </SelectParameters>
</asp:LinqDataSource>

Data Source Selecting Code:

protected void ldsFacilities_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
    Data.EcofitDataContext db = new Data.EcofitDataContext();
 
    e.Result = (from f in db.Facilities
                select f);
}
 
protected void ldsEquipment_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
    Data.EcofitDataContext db = new Data.EcofitDataContext();
 
 
    e.Result = (from eq in db.Equipments
                where eq.FacilityID == Guid.Parse(e.SelectParameters["FacilityID"].ToString())
                select eq);
}

Any help would be greatly appreciated!
Brendan
Top achievements
Rank 1
 answered on 01 Jun 2012
1 answer
116 views

See the Image .
How Can i Get the Value Of the Rad Filter In the server side

Thanks Advance,
Mohamed.
Richard
Top achievements
Rank 1
 answered on 01 Jun 2012
2 answers
130 views

When I have a RadDatePicker on a page that has Enabled = "false", the rendering causes an increased page size. Making it enabled again makes the problem go away.

Further more, if I make the dateinput portion of the raddatepicker invisible, the problem goes away.

Using Telerik 2012.1.215.40.

Here's the markup

<telerik:RadDatePicker ID="RadDateStart" Width="180px" EnableTyping="false" runat="server" EnableEmbeddedSkins="true" Enabled="false">
    <Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" runat="server" UseColumnHeadersAsSelectors="False"
        ViewSelectorText="x" EnableEmbeddedSkins="true">
        <SpecialDays>
            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="#BCDDFF" />
        </SpecialDays>
    </Calendar>
    <DateInput ID="DateInput1" DisplayDateFormat="MMM dd, yyyy" runat="server" DateFormat="M/d/yyyy" ReadOnly="True">
    </DateInput>
    <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
Gerry
Top achievements
Rank 1
 answered on 01 Jun 2012
5 answers
1.2K+ views
Hi,

I've attached a screen shot of the issue.

Note that this only occurs when the DatePopupButton-Visible is set to false.

Here's the markup:
<tr id="trMRPShipDate" runat="server">
<td>MRP Ship Date</td>
<td></td>
<td>
<div style="position:relative; height:20px">
<telerik:RadDatePicker ID="dpMRPShipDate" Width="90px" EnableTyping="false" DatePopupButton-Visible="false"
style="position:absolute; top:0px; left:0px" runat="server" EnableEmbeddedSkins="true">
<Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" runat="server" UseColumnHeadersAsSelectors="False"
ViewSelectorText="x" EnableEmbeddedSkins="true">
<SpecialDays>
<telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="#BCDDFF" >
<ItemStyle BackColor="#BCDDFF" />
</telerik:RadCalendarDay>
</SpecialDays>
</Calendar>
<DateInput ID="DateInput3" DisplayDateFormat="MMM dd, yyyy" runat="server" DateFormat="M/d/yyyy"
ReadOnly="True" AutoPostBack="True">
</DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
<asp:ImageButton ID="imgCancelMRPShipDate" runat="server" ImageUrl="~/Pics/Cancel.gif" Style="position:absolute; top:4px; left:122px" OnClick="imgCancelShipDate_Click" Width="16px" Visible="false" />
<asp:LinkButton runat="server" ID="lnkShipDateChangeLog" Text="Change Log" style="position:absolute; top:4px; left:98px; white-space:nowrap" onclick="lnkShipDateChangeLog_Click" />
</div>
</td>
</tr>
Gerry
Top achievements
Rank 1
 answered on 01 Jun 2012
1 answer
69 views
Hi,

                      I implemented scheduler and i have one problem
i have my appintments on same day with same time..

means i have 2 appoointments at 9.00Am..i want to display same thing in scheduler in week view.

but both are overiding and display is not clear..

i want to display second apponitement in next line..how is it possible..

please provide me the solution...
Plamen
Telerik team
 answered on 01 Jun 2012
1 answer
216 views
hello all ,
i want a sample example to know how to save state of raddock and Radzone in database (set and get state into and from database ) , not in cookies like used in telerik help documentation (this one )
Is there any sample project to do that ???

thanks in advance
Shinu
Top achievements
Rank 2
 answered on 01 Jun 2012
1 answer
119 views
Hi,
I am using a telerik radgrid(hierarchical structures) in that when i expand the child grid then the border thickness increases.this issue is only in google chrome and mozilla.

source code:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="test.ascx.cs"
    Inherits=".UserControls.test" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<div class="widget_container clearfix">
    <!-- menu bar starts -->
    <div class="wid_menu_bar clearfix">
        <div class="right">
            <div class="left">
                <img src="../../../App_Themes/images/wid_menubar_left.png" alt="Icon bar left image" /></div>
            <div class="wid_icons left">
                <ul>
                    <li><a href="#">
                        <img src="../../../App_Themes//images/add_ico.png" alt="Add" class="v_middle" />&nbsp;<asp:Label
                            ID="lblFilter" runat="server" Text="Filter"></asp:Label></a></li>
                    <li><a href="#">
                        <img src="../../../App_Themes/images/edit_ico.png" alt="Edit" class="v_middle" />&nbsp;<asp:Label
                            ID="lblPrint" runat="server" Text="Print"></asp:Label></a></li>
                    <li><a href="#" onclick="javascript:openWin('#', 490, 630,'test');">
                        <img src="../../../App_Themes/images/add_ico.png" alt="Add" class="v_middle" />&nbsp;<asp:Label
                            ID="lblAdd" runat="server" Text="Add"></asp:Label></a></li>
                </ul>
            </div>
        </div>
    </div>
    <!-- menu bar ends -->
    <!-- widget content starts -->
    <center>
        <div id="pop_middle" class="wid_middle">        
            <telerik:RadGrid ID="RadGrid3" Visible="true" runat="server" Width="90%" ShowStatusBar="true"
                GridLines="Vertical"   AutoGenerateColumns="False"
                PageSize="5" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True"
                PagerStyle-Position="Bottom">
                <SortingSettings EnableSkinSortStyles="false" />
                <MasterTableView AllowNaturalSort="false" HierarchyDefaultExpanded="false" HierarchyLoadMode="Client">
                    <DetailTables>
                        <telerik:GridTableView AllowPaging="False" CommandItemDisplay="None">
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="CT_1" HeaderText="Custom Field 1" HeaderButtonType="TextButton"
                                    DataField="CT_1" AllowSorting="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="Custom Field 2" UniqueName="CT_2" DataField="CT_2">
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn HeaderText="Custom Field 3" UniqueName="Unit" HeaderButtonType="TextButton"
                                    DataField="CT_3">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="H 1" HeaderButtonType="TextButton" DataField="H1"
                            UniqueName="VisitDate">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="H 2" HeaderButtonType="TextButton" DataField="H2"
                            UniqueName="VisitType">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="H 3" HeaderButtonType="TextButton" DataField="H3"
                            UniqueName="ProviderUserId">
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn UniqueName="ibtnDelete" HeaderText="Delete" ImageUrl="~/App_Themes/Bari_Default/images/delete_ico.png"
                            ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ItemStyle-CssClass="edit_deletecol_width">
                            <HeaderStyle CssClass="edit_deletecol_width" />
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
   
        </div>
    </center>


</div>


Code Behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;


namespace BariAnalyticsEHR.ProtoType.UserControls.Patient.test
{
    public partial class test: System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RadGrid3.DataSource = createDataTable();
            }
        }
        private DataTable createDataTable()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("CT_1");
            dt.Columns.Add("CT_2");
            dt.Columns.Add("CT_3");


            DataRow dr = dt.NewRow();
            dr["CT_1"] = "Reason Reason ";
            dr["CT_2"] = "2011";


            dr["CT_3"] = "dummy";
            dt.Rows.Add(dr);       


            return dt;
        }
    }
}

Shinu
Top achievements
Rank 2
 answered on 01 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?