Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
270 views
hi,
  i am some new to telerik rad control for asp.net ajax... Now my actual scenario is ...

-> want to implement a mail system and i want to show the "To address" just like gmail.
-----------------------------------------------------------------------------------------------------------------
   - So when i press a letter the email list filtered with "contains"
   - Want to show email list with multiline textbox ie input area
 
Actually i implemented with rad combo box and used filter concept. but some constraints i want help

1. when no text entered don't want to show the drop down
2. Can i change the input are to multiline  mode?

Please give a solution for this...? Any other control help about this concept..?
 
Akhil Raj
Top achievements
Rank 1
 answered on 20 Jan 2010
3 answers
106 views
I am looking for the 3d effect that I can achieve using ASP controls such as textbox, dropdownlistbox etc by simply setting BackColor to White. I have found I can achieve this with RadTextBox by setting the backcolor along with setting Skin="". If I do that with datapickers or comboboxes, I lose all of the graphics associated with the controls. Any ideas on how to achieve this effect aside from designing a custom skin? Thanks
Dimo
Telerik team
 answered on 20 Jan 2010
4 answers
98 views
When we switch to the timeline view of our calendar the view shows up with scrollbars and you cannot see the pop out calendar.  I attached a screen shot.
Sam
Top achievements
Rank 1
 answered on 20 Jan 2010
3 answers
247 views
Hi, I'm having problems getting my CompareValidator working inside my grid.
 
My grid uses a simple two level hierarchy. First level is a datetime, second level is a detail table with zero, one or more items.

In the detailtable there is a TABLE with a couple of TDs. These TDs are programmatically set to visible or invisible. Each TD has some controls.

One TD has a textbox and an input field (set to invisible), and also a Repeater that contains zero, one or more CompareValidators. Each CompareValidator validates against the invisible input field (which contains a copy of the parental user textbox).

I inject each CompareValidator in the Repeater ItemDataBound event handler.

This validation works until the value to compare results to false, and after that changing the value to a correct one does not cause the error message to disappear. Consequently, the form does not submit and the values in the grid are not updated nor validated.

I read that I should be using RadGrid's ItemCreated event handler to add CompareValidators but I cannot do that since it depends on each item in detail table if it has or not some special value. Also, I should be able to validate against more than one rule (indicated by the repeater) so there's the use of the repeater.

See code below. If anyone can shed light on the issue please do so!

        protected void repeaterPoliticas_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)  
        {  
            RepeaterItem i = e.Item;  
 
            if (i.ItemType == ListItemType.Item ||  
                i.ItemType == ListItemType.AlternatingItem)  
            {  
                CompareValidator cv = (CompareValidator)i.FindControl("cvMontoPolitica");  
 
                if (cv != null)  
                {  
                    DataRow data = (DataRow)i.DataItem;  
                    HtmlInputText hdnAux = (HtmlInputText)i.FindControl("hdnAux");  
                    hdnAux.Value = ((TextBox)hdnAux.Parent.Parent.Parent.FindControl("txtMonto")).Text;  
                    cv.ControlToValidate = hdnAux.ID;  
                    cv.ValueToCompare = Convert.ToString(data["monto"]);  
                    cv.Operator = (ValidationCompareOperator)Convert.ToInt32(data["operador"]);  
 
                    TextBox txtMonto = ((TextBox)hdnAux.Parent.Parent.Parent.FindControl("txtMonto"));  
                    txtMonto.ToolTip = Convert.ToString(data["descripcion"]);  
                }  
            }  
        }  
 
 

Radgrid code is here:

    <telerik:RadGrid   
        ID="rgDiasGastos"   
        runat="server"   
        Width="99%" 
        ShowStatusBar="true" 
        AutoGenerateColumns="False"   
        PageSize="3"   
        AllowSorting="True"   
        AllowMultiRowSelection="False" 
        AllowPaging="True"   
        GridLines="None"   
        AllowAutomaticDeletes="True"   
        AllowAutomaticInserts="True" 
        AllowAutomaticUpdates="True"   
        ImagesPath="~/Images/telerik"   
        Skin="Outlook">  
        <HeaderContextMenu> 
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        </HeaderContextMenu> 
        <PagerStyle Mode="NumericPages"   
            FirstPageImageUrl="~/Images/telerik\PagingFirst.gif"   
            LastPageImageUrl="~/Images/telerik\PagingLast.gif"   
            NextPageImageUrl="~/Images/telerik\PagingNext.gif"   
            PrevPageImageUrl="~/Images/telerik\PagingPrev.gif">  
        </PagerStyle> 
        <MasterTableView   
            DataKeyNames="fecha" EnableViewState="true" 
            AllowMultiColumnSorting="True" 
            Width="100%"   
            CommandItemDisplay="None" 
            EditFormSettings-EditFormType="AutoGenerated" 
            Name="Dias">  
            <CommandItemTemplate> 
                <asp:LinkButton   
                    ID="LinkButton1"   
                    runat="server"   
                    CommandName="InitInsert"   
                    Visible='<%# !rgDiasGastos.MasterTableView.IsItemInserted %>'>  
                    <img style="border:0px" alt="" src="Images/buttons/btn_agregar2.jpg" />&nbsp;fecha  
                </asp:LinkButton> 
            </CommandItemTemplate> 
            <DetailTables> 
                <telerik:GridTableView   
                    DataKeyNames="idComprobacionGastoDetalle"   
                    Width="100%" 
                    runat="server" EnableViewState="true" 
                    CommandItemDisplay="Top" 
                    EditFormSettings-EditFormType="Template" 
                    Name="Gastos">  
                    <CommandItemTemplate> 
                        <asp:LinkButton   
                            ID="LinkButton2"   
                            runat="server"   
                            CommandName="InitInsert"   
                            Visible='<%# !rgDiasGastos.MasterTableView.DetailTables[0].IsItemInserted %>'>  
                            <img style="border:0px" alt="" src="Images/buttons/btn_agregarGasto.jpg" /> 
                        </asp:LinkButton> 
                    </CommandItemTemplate> 
                    <ParentTableRelation> 
                        <telerik:GridRelationFields DetailKeyField="fechaDetalle" MasterKeyField="fecha" /> 
                    </ParentTableRelation> 
                    <CommandItemSettings AddNewRecordImageUrl="~/Images/telerik\AddRecord.gif"   
                        RefreshImageUrl="~/Images/telerik\Refresh.gif" /> 
                    <RowIndicatorColumn FilterImageUrl="~/Images/telerik\Filter.gif"   
                        SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                        SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn Visible="True" CollapseImageUrl="~/Images/telerik\SingleMinus.gif"   
                        ExpandImageUrl="~/Images/telerik\SinglePlus.gif"   
                        FilterImageUrl="~/Images/telerik\Filter.gif"   
                        SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                        SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridEditCommandColumn ButtonType="ImageButton"   
                            UniqueName="EditCommandColumn2" CancelImageUrl="~/Images/telerik\Cancel.gif"   
                            EditImageUrl="~/Images/telerik\Edit.gif"   
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            InsertImageUrl="~/Images/telerik\Update.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif"   
                            UpdateImageUrl="~/Images/telerik\Update.gif">  
                            <HeaderStyle Width="20px" /> 
                            <ItemStyle CssClass="MyImageButton" /> 
                        </telerik:GridEditCommandColumn> 
                        <telerik:GridDateTimeColumn SortExpression="fechaDetalle" HeaderText="fechaDetalle" HeaderButtonType="TextButton" 
                            DataField="fechaDetalle" UniqueName="fechaDetalle" Visible="false" 
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                        </telerik:GridDateTimeColumn> 
                        <telerik:GridBoundColumn   
                            SortExpression="Agrupacion"   
                            DataField="Agrupacion"   
                            HeaderText="Agrupacion"   
                            HeaderButtonType="TextButton" 
                            UniqueName="Agrupacion"   
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn   
                            SortExpression="Concepto"   
                            DataField="Concepto"   
                            HeaderText="Concepto"   
                            HeaderButtonType="TextButton"   
                            UniqueName="Concepto"   
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn   
                            SortExpression="CentroCosto"   
                            DataField="CentroCosto"   
                            HeaderText="Centro Costo"   
                            HeaderButtonType="TextButton" 
                            UniqueName="CentroCosto"   
                            Visible="true"   
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn   
                            SortExpression="WBS"   
                            DataField="WBS"   
                            HeaderText="WBS"   
                            HeaderButtonType="TextButton" 
                            UniqueName="WBS"   
                            Visible="true"   
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn  
                            SortExpression="monto" 
                            DataField="monto"   
                            HeaderText="monto"   
                            HeaderButtonType="TextButton" 
                            UniqueName="monto"   
                            Visible="true"   
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridButtonColumn   
                            ConfirmText="Desea eliminar este gasto?"   
                            ButtonType="ImageButton" 
                            CommandName="Delete"   
                            Text="Eliminar gasto"   
                            UniqueName="DeleteColumn2"   
                            FilterImageUrl="~/Images/telerik\Filter.gif"   
                            SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                            SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                            <HeaderStyle Width="20px" /> 
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                        </telerik:GridButtonColumn> 
                    </Columns> 
                    <EditFormSettings EditFormType="Template">  
                        <EditColumn UniqueName="EditColumn"></EditColumn> 
                        <FormTemplate> 
                            <table cellspacing="0" cellpadding="0" width="100%" border="1" class="txtNormal">  
                                <tr valign="top">  
                                    <td><input id="hdnFecha" type="hidden" runat="server" name="hdnFecha" value="" /></td>  
                                    <td width="102"><b>*Agrupación</b><br /> 
                                        <asp:DropDownList ID="ddlAgrupacion" runat="server" DataSource="<%# dsAgrupacionesConceptos %>" DataMember="Agrupaciones" CssClass="txtNormal" OnSelectedIndexChanged="ddlAgrupacion_SelectedIndexChanged" DataValueField="idConceptoGastoGrupo" DataTextField="descripcionAgrupacion" AutoPostBack="True"></asp:DropDownList><br /> 
                                        <asp:requiredfieldvalidator id="rqfAgrupacion" runat="server" CssClass="txtNormal" ErrorMessage="La agrupación es requerida." ControlToValidate="ddlAgrupacion" Display="Dynamic"></asp:requiredfieldvalidator></td>  
                                    <td width="102"><b>*Concepto</b><br /> 
                                        <asp:DropDownList ID="ddlConcepto" runat="server" CssClass="txtNormal" OnSelectedIndexChanged="ddlConcepto_SelectedIndexChanged" DataValueField="idConceptoGasto" DataTextField="descripcion" AutoPostBack="true"></asp:DropDownList><br /> 
                                        <asp:RequiredFieldValidator id="rqfConceptoGasto" runat="server" CssClass="txtNormal" ErrorMessage="El concepto de gasto es requerido." ControlToValidate="ddlConcepto" Display="Dynamic"></asp:RequiredFieldValidator></td>  
                                    <td id="tdComprobantes" width="102" runat="server"><b>Comprobantes</b><br /> 
                                        <asp:TextBox ID="txtComprobantes" runat="server" Text='<%# Bind("comprobantes") %>' CssClass="txtNormal" Width="100"></asp:TextBox><br /> 
                                        <asp:regularexpressionvalidator id="revComprobantes" runat="server" CssClass="txtNormal" ErrorMessage="El campo comprobantes contiene al menos un caracter inválido  '  <  >" ControlToValidate="txtComprobantes" Display="Dynamic" ValidationExpression="[^'<>]+"></asp:regularexpressionvalidator> 
                                        <asp:requiredfieldvalidator id="rqfComprobantes" runat="server" CssClass="txtNormal" ErrorMessage="Los comprobantes son requeridos." ControlToValidate="txtComprobantes" Display="Dynamic" Enabled="false"></asp:requiredfieldvalidator></td>  
                                    <td id="tdJustificacion" width="152" runat="server"><b>Justificación</b><br /> 
                                        <asp:TextBox ID="txtJustificacion" runat="server" Text='<%# Bind("justificacion") %>' CssClass="txtNormal" Width="150"></asp:TextBox><br /> 
                                        <asp:regularexpressionvalidator id="revJustificacion" runat="server" CssClass="txtNormal" ErrorMessage="El campo justificación contiene al menos un caracter inválido  '  <  >" ControlToValidate="txtJustificacion" Display="Dynamic" ValidationExpression="[^'<>]+"></asp:regularexpressionvalidator> 
                                        <asp:RequiredFieldValidator id="rqfJustificacion" runat="server" CssClass="txtNormal" ErrorMessage="La justificación es requerida." ControlToValidate="txtJustificacion" Display="Dynamic" Enabled="false"></asp:RequiredFieldValidator></td>  
                                    <td ID="tdCentroCosto" width="102" runat="server"><strong>*Centro de costo</strong><br /> 
                                        <asp:dropdownlist ID="ddlCentroCosto" runat="server" DataSource="<%# dsCentrosCosto %>" CssClass="txtNormal" DataValueField="numeroCentroCosto" DataTextField="descripcion"></asp:dropdownlist><br /> 
                                        <asp:requiredfieldvalidator id="rqfCentroCosto" runat="server" CssClass="txtNormal" ErrorMessage="El centro de costo es requerido." ControlToValidate="ddlCentroCosto" Display="Dynamic"></asp:requiredfieldvalidator></td>  
                                    <td ID="tdWBS" width="122" runat="server"><b><%# isWBSRequerido?"*":"" %>WBS</b><br /> 
                                        <asp:TextBox ID="txtWBS" runat="server" Text='<%# Bind("WBS") %>' CssClass="txtNormal" Width="120" MaxLength="18"></asp:TextBox><br /> 
                                        <asp:regularexpressionvalidator id="revWBS" runat="server" CssClass="txtNormal" ErrorMessage="El campo WBS contiene al menos un caracter inválido  '  <  >  (ej. aaa-aaa12kkma1986a)" ControlToValidate="txtWBS" Display="Dynamic" ValidationExpression="^([a-zA-Z]{3})-([a-zA-Z]{3})([0-9]{2})([^'<>])*$"></asp:regularexpressionvalidator> 
                                        <asp:requiredfieldvalidator id="rqfWBS" runat="server" CssClass="txtNormal" ErrorMessage="El WBS es requerido." ControlToValidate="txtWBS" Display="Dynamic"></asp:requiredfieldvalidator></td>  
                                    <td id="tdPersonas" width="37" runat="server"><strong title="Número de personas">Pers.</strong><br>  
                                        <asp:TextBox ID="txtPersonas" runat="server" Text='<%# Bind("personas") %>' CssClass="txtNormal" Width="35" MaxLength="2" style="TEXT-ALIGN: right"></asp:TextBox><br /> 
                                        <asp:CompareValidator id="cvPersonas" runat="server" CssClass="txtNormal" ErrorMessage="Cantidad inválida. Debe ser mayor que cero." ControlToValidate="txtPersonas" Display="Dynamic" Type="Integer" ValueToCompare="0" Operator="GreaterThan"></asp:CompareValidator> 
                                    </td> 
                                    <td id="tdDias" width="37" runat="server"><strong title="Número de días">Días</strong><br>  
                                        <asp:TextBox ID="txtDias" runat="server" Text='<%# Bind("dias") %>' CssClass="txtNormal" Width="35" MaxLength="3" style="TEXT-ALIGN: right"></asp:TextBox><br /> 
                                        <asp:CompareValidator id="cvDias" runat="server" CssClass="txtNormal" ErrorMessage="Cantidad inválida. Debe ser mayor que cero." ControlToValidate="txtDias" Display="Dynamic" Type="Integer" ValueToCompare="0" Operator="GreaterThan"></asp:CompareValidator> 
                                    </td> 
                                    <td id="tdHoras" width="37" runat="server"><strong title="Número de horas">*Hrs</strong><br>  
                                        <asp:TextBox ID="txtHoras" runat="server" Text='<%# Bind("horas") %>' CssClass="txtNormal" Width="35" MaxLength="2" style="TEXT-ALIGN: right"></asp:TextBox><br /> 
                                        <asp:CompareValidator id="cvHoras" runat="server" CssClass="txtNormal" ErrorMessage="Cantidad inválida. Debe ser mayor que cero." ControlToValidate="txtHoras" Display="Dynamic" Type="Integer" ValueToCompare="0" Operator="GreaterThan"></asp:CompareValidator> 
                                    </td> 
                                    <td id="tdKilometros" width="42" runat="server"><strong title="Número de kilómetros">*Km.</strong><br>  
                                        <asp:TextBox ID="txtKilometros" runat="server" Text='<%# Bind("kilometros") %>' CssClass="txtNormal" Width="40" MaxLength="6" style="TEXT-ALIGN: right"></asp:TextBox><br /> 
                                        <asp:CompareValidator id="cvKilometros" runat="server" CssClass="txtNormal" ErrorMessage="Cantidad inválida. Debe ser mayor que cero." ControlToValidate="txtKilometros" Display="Dynamic" Type="Integer" ValueToCompare="0" Operator="GreaterThan"></asp:CompareValidator> 
                                        <asp:requiredfieldvalidator id="rqfKilometros" runat="server" CssClass="txtNormal" ErrorMessage="El Km. es requerido." ControlToValidate="txtKilometros" Display="Dynamic"></asp:requiredfieldvalidator> 
                                    </td> 
                                    <td id="tdDeducible" width="82" runat="server"><strong>*Deducible</strong><br /> 
                                        <asp:TextBox ID="txtDeducible" runat="server" Text='<%# Bind("impuesto2") %>' Width="80" CssClass="txtNormal" style="TEXT-ALIGN: right" ReadOnly="true"></asp:TextBox></td>  
                                    <td id="tdMonto" width="62" runat="server"><b> 
                                        <asp:Label id="lblMonto" runat="server">*Monto</asp:Label></b><br /> 
                                        <ajax:AjaxPanel ID="AjaxPanel1" runat="server">  
                                            <asp:TextBox id="txtMonto" runat="server" Text='<%# Bind("monto") %>' CssClass="txtNormal" Width="60" MaxLength="9" OnTextChanged="Recalculate_Impuestos" style="TEXT-ALIGN: right" AutoPostBack="true"></asp:TextBox> 
                                        </ajax:AjaxPanel> 
                                        <input type="hidden" id="hdnMonto" runat="server" name="hdnMonto" /> 
                                        <asp:CompareValidator ID="cvMonto" runat="server" CssClass="txtNormal" ErrorMessage="Monto inválido. Debe ser mayor que cero (0.00)." ControlToValidate="txtMonto" Display="Dynamic" Type="Currency" ValueToCompare="0" Operator="GreaterThan"></asp:CompareValidator> 
                                        <asp:requiredfieldvalidator ID="rqfMonto" runat="server" CssClass="txtNormal" ErrorMessage="El monto es requerido." ControlToValidate="txtMonto" Display="Dynamic"></asp:requiredfieldvalidator> 
                                        <asp:Repeater ID="repeaterPoliticas" runat="server" OnItemDataBound="repeaterPoliticas_ItemDataBound">  
                                            <ItemTemplate> 
                                                <input id="hdnAux" visible="false" runat="server" value="" name="hdnAux" /> 
                                                <asp:CompareValidator   
                                                    ID="cvMontoPolitica"   
                                                    runat="server"   
                                                    CssClass="txtNormal" EnableClientScript="true"   
                                                    Text="Política no respetada." 
                                                    ControlToValidate="hdnAux"   
                                                    Display="Dynamic"   
                                                    Type="Currency"   
                                                    ValueToCompare=""   
                                                    Operator="LessThanEqual"   
                                                    ToolTip="">  
                                                </asp:CompareValidator> 
                                            </ItemTemplate> 
                                        </asp:Repeater></td>  
                                    <td id="tdImpuesto1" width="62" runat="server"><strong>*I.V.A.</strong><br /> 
                                        <ajax:AjaxPanel id="Ajaxpanel2" runat="server">  
                                            <asp:dropdownlist ID="ddlImpuesto1" runat="server" DataSource="<%# dsImpuesto1 %>" CssClass="txtNormal" Width="60" DataValueField="idImpuesto" DataTextField="porcIVA" OnSelectedIndexChanged="Recalculate_Impuestos" AutoPostBack="true"></asp:dropdownlist> 
                                            <asp:TextBox id="txtImpuesto1" runat="server" Text='<%# Bind("impuesto1") %>' Width="40" CssClass="txtNormal" style="TEXT-ALIGN: right" ReadOnly="true" Visible="false"></asp:TextBox> 
                                        </ajax:AjaxPanel> 
                                        <asp:requiredfieldvalidator id="rqfImpuesto1" runat="server" CssClass="txtNormal" ErrorMessage="El I.V.A. es requerido." ControlToValidate="ddlImpuesto1" Display="Dynamic"></asp:requiredfieldvalidator></td>  
                                    <td id="tdImpuesto2" width="102" runat="server"><strong>*Impuesto</strong><br /> 
                                        <ajax:AjaxPanel id="Ajaxpanel3" runat="server">  
                                            <asp:dropdownlist id="ddlImpuesto2" runat="server" DataSource="<%# dsImpuesto2 %>" CssClass="txtNormal" Width="60" DataValueField="idImpuesto" DataTextField="descripcion" OnSelectedIndexChanged="Recalculate_Impuestos" AutoPostBack="true"></asp:dropdownlist> 
                                            <asp:TextBox id="txtImpuesto2" runat="server" Text='<%# Bind("impuesto2") %>' Width="40" CssClass="txtNormal" style="TEXT-ALIGN: right" ReadOnly="true"></asp:TextBox> 
                                        </ajax:AjaxPanel> 
                                        <asp:requiredfieldvalidator id="rqfImpuesto2" runat="server" CssClass="txtNormal" ErrorMessage="El impuesto es requerido." ControlToValidate="ddlImpuesto2" Display="Dynamic"></asp:requiredfieldvalidator> 
                                        <asp:requiredfieldvalidator id="rqfTxtImpuesto" runat="server" CssClass="txtNormal" ErrorMessage="El impuesto es requerido." ControlToValidate="txtImpuesto2" Display="Dynamic"></asp:requiredfieldvalidator> 
                                        <asp:CompareValidator id="cvImpuesto2" runat="server" CssClass="txtNormal" ErrorMessage="Cantidad inválida. Debe ser mayor o igual a cero (0.00)." ControlToValidate="txtImpuesto2" Display="Dynamic" Type="Currency" ValueToCompare="0" Operator="GreaterThanEqual"></asp:CompareValidator> 
                                    </td> 
                                    <td><input id="hdnIdComprobacionGastoDetalle" type=hidden value='<%# Bind("idComprobacionGastoDetalle") %>' name=hdnIdComprobacionGastoDetalle runat="server" />&nbsp;</td> 
                                </tr> 
                            </table> 
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="txtNormal">  
                                <tr> 
                                    <td align="left">  
                                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insertar" : "Actualizar" %>' 
                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>  
                                        </asp:Button>&nbsp;  
                                        <asp:Button ID="btnCancel" Text="Cancelar" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> 
                                    </td> 
                                </tr> 
                            </table> 
                        </FormTemplate> 
                    </EditFormSettings> 
                    <PagerStyle FirstPageImageUrl="~/Images/telerik\PagingFirst.gif"   
                        LastPageImageUrl="~/Images/telerik\PagingLast.gif"   
                        NextPageImageUrl="~/Images/telerik\PagingNext.gif"   
                        PrevPageImageUrl="~/Images/telerik\PagingPrev.gif" /> 
                </telerik:GridTableView> 
            </DetailTables> 
            <CommandItemSettings AddNewRecordImageUrl="~/Images/telerik\AddRecord.gif"   
                RefreshImageUrl="~/Images/telerik\Refresh.gif" /> 
            <RowIndicatorColumn FilterImageUrl="~/Images/telerik\Filter.gif"   
                SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
            </RowIndicatorColumn> 
            <ExpandCollapseColumn Visible="True" CollapseImageUrl="~/Images/telerik\SingleMinus.gif"   
                ExpandImageUrl="~/Images/telerik\SinglePlus.gif"   
                FilterImageUrl="~/Images/telerik\Filter.gif"   
                SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridDateTimeColumn SortExpression="fecha" HeaderText="Fecha" HeaderButtonType="TextButton" 
                    DataField="fecha" UniqueName="fecha"   
                    FilterImageUrl="~/Images/telerik\Filter.gif"   
                    SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                    SortDescImageUrl="~/Images/telerik\SortDesc.gif">  
                </telerik:GridDateTimeColumn> 
            </Columns> 
            <EditFormSettings> 
                <EditColumn CancelImageUrl="~/Images/telerik\Cancel.gif"   
                    EditImageUrl="~/Images/telerik\Edit.gif"   
                    FilterImageUrl="~/Images/telerik\Filter.gif"   
                    InsertImageUrl="~/Images/telerik\Update.gif"   
                    SortAscImageUrl="~/Images/telerik\SortAsc.gif"   
                    SortDescImageUrl="~/Images/telerik\SortDesc.gif"   
                    UpdateImageUrl="~/Images/telerik\Update.gif">  
                </EditColumn> 
            </EditFormSettings> 
            <PagerStyle FirstPageImageUrl="~/Images/telerik\PagingFirst.gif"   
                LastPageImageUrl="~/Images/telerik\PagingLast.gif"   
                NextPageImageUrl="~/Images/telerik\PagingNext.gif"   
                PrevPageImageUrl="~/Images/telerik\PagingPrev.gif" /> 
        </MasterTableView> 
        <FilterMenu> 
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        </FilterMenu> 
    </telerik:RadGrid> 
 

Thanks in advance for any help!
Pieter



psiegers45
Top achievements
Rank 1
 answered on 20 Jan 2010
3 answers
254 views
Im having in issue using a hierarchy grid.  In my GridTableView I have a CommandItemTemplate with an InitInsert CommantItem that works perfectly when there is data in the DetailTable and the header is showing.  The problem is that I also have ShowHeadersWhenNoRecords = False for that same GridTableView. 

When there is no data, it hides the headers like it should but it also hides the CommandItemTemplate so that no records can be added.  This also happens when I'm using the default CommandItem instead of a CommandItemTemplate.

Is there anyway to get the CommandItemTemplate to show if there is not data, but still hide the headers?  Here is a sample of my code...

<DetailTables> 
        <telerik:GridTableView runat="server" ShowHeader="true" DataKeyNames="ChecklistId"  NoDetailRecordsText="" ShowHeadersWhenNoRecords="false"   
        EditMode="InPlace" Name="Checklist" CommandItemDisplay="top" Width="100%" HorizontalAlign="Right" CellPadding="0" CellSpacing="0">  
            <CommandItemTemplate> 
                <asp:LinkButton ID="btnAddNew" runat="server" CommandName="InitInsert" Text="Add New Record" CssClass="gridLink" /> 
            </CommandItemTemplate> 
........ 
Radoslav
Telerik team
 answered on 20 Jan 2010
5 answers
253 views
I have received the above error from the Telerik data grid. The grid is bound to an LLBLGenDataSource control that returns an entity collection. However the data from this data source has a select parameter using a RadComboBox control. I need this as it reduces the amount of data I can view at any one time.

The problem arises when I enable this select parameters and set the grid to support paging. If I turn off the paging, the problem goes away, however I am left with a long result set. If on the other hand I comment out these select parameters, I am able to use paging but the number of pages increases. 

I am using ajax by the way.

Can you guys help me?

Tsvetoslav
Telerik team
 answered on 20 Jan 2010
5 answers
109 views
I have a RadRotator in a floating RadDock.  The rotator's height is greater than the RadDock and the scroll bar is turned on.  The elements inside of the rotator show beyond the RadDock and if you scroll the RadDock the contents of the rotator sometimes do not scroll with the scroll bar and sometimes they do but it is hugely delayed.  It takes 10-20 seconds or more for the RadRotator contents to scroll (when they do).

Attached is a picture of the results.
Doug
Top achievements
Rank 1
 answered on 20 Jan 2010
3 answers
117 views
Hi folks,

is there some way to assign class to anchor html tag to get styled as automaticaly styled asp:Button with form decorator?


Thanks for reply!
Georgi Tunev
Telerik team
 answered on 20 Jan 2010
3 answers
182 views
HI

i am trying to get the selectedvalue of a dropdownlist in a nestedviewtemplate? what could be wrong?

reg

D

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
</head> 
<body class="BODY"
    <form runat="server" id="mainForm" method="post"
    <telerik:RadScriptManager runat="server" ID="ScriptManager1"
    </telerik:RadScriptManager> 
    <!-- content start --> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" 
        AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" 
        GridLines="None" ShowGroupPanel="true"
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="EmployeeID" AllowMultiColumnSorting="True"
            <NestedViewTemplate> 
                <telerik:RadGrid runat="server" ID="nestedgrid" ShowFooter="true" AllowSorting="true" 
                    EnableLinqExpressions="false"
                    <MasterTableView ShowHeader="true" AutoGenerateColumns="true" AllowPaging="true" 
                        PageSize="7"
                        <Columns> 
                            <telerik:GridEditCommandColumn> 
                            </telerik:GridEditCommandColumn> 
                        </Columns> 
                        <EditFormSettings EditFormType="Template"
                            <FormTemplate> 
                                                                
                                <asp:ImageButton ID=imgb runat=server CommandName="go"  /> 
                                <asp:DropDownList id=ddl1  runat=server></asp:DropDownList> 
                            </FormTemplate> 
                        </EditFormSettings> 
                    </MasterTableView> 
                </telerik:RadGrid> 
            </NestedViewTemplate> 
            <Columns> 
                <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="First Name" HeaderButtonType="TextButton" 
                    DataField="FirstName" UniqueName="FirstName"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="LastName" HeaderText="Last Name" HeaderButtonType="TextButton" 
                    DataField="LastName" UniqueName="LastName"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton" 
                    DataField="Title" UniqueName="Title"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="BirthDate" DataFormatString="{0:MM/dd/yyyy}" 
                    HeaderText="Birth Date" HeaderButtonType="TextButton" DataField="BirthDate" UniqueName="BirthDate"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton" 
                    DataField="City" UniqueName="City"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country" HeaderButtonType="TextButton" 
                    DataField="Country" UniqueName="Country"
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings AllowDragToGroup="true" /> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Employees" 
        runat="server"></asp:SqlDataSource> 
    <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        ProviderName="System.Data.SqlClient" runat="server"></asp:SqlDataSource> 
    <!-- content end --> 
    </form> 
</body> 
 
Imports Telerik.Web.UI 
Imports System 
Imports System.Data 
Imports System.Data.SqlClient 
Imports System.Web.UI.WebControls 
Imports System.Configuration 
Partial Class _Default 
    Inherits System.Web.UI.Page 
 
 
    Dim ConnString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString 
 
    Protected Sub nestedgrid_ItemCreated(ByVal sender As ObjectByVal e As GridItemEventArgs) 
        Dim btn As Button 
        Dim ddl As DropDownList 
        If e.Item.ItemType = GridItemType.EditFormItem And e.Item.IsInEditMode Then 
            Dim edititem As GridEditFormItem = CType(e.Item, GridEditFormItem) 
            ddl = CType(edititem.FindControl("ddl1"), DropDownList) 
            btn = CType(edititem.FindControl("btngo"), Button) 
 
            ddl.DataSource = dsddl() 
            ddl.DataTextField = "ShipName" 
            ddl.DataValueField = "OrderID" 
            ddl.DataBind() 
 
        End If 
    End Sub 
 
    Protected Sub nestedgrid_itemCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) 
 
         
        If e.CommandName = RadGrid.UpdateCommandName Then 
            If e.Item.ItemType = GridItemType.EditFormItem Then 
                Dim nestedview As GridNestedViewItem = CType((CType(e.Item, GridEditFormInsertItem)).OwnerTableView.Parent.NamingContainer, GridNestedViewItem) 
                Dim ddl1 As DropDownList = CType(nestedview.FindControl("ddl1"), DropDownList) 
                'i would like to assign to get the selected value of the ddl1  !! 
                'Dim result = ddl1.SelectedValue 
            End If 
        End If 
 
 
    End Sub 
 
 
 
    Protected Sub RadGrid1_ItemCreated(ByVal sender As ObjectByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated 
 
        If TypeOf e.Item Is GridNestedViewItem Then 
            Dim rg As RadGrid = e.Item.FindControl("NestedGrid"
            Dim imgb As ImageButton = rg.MasterTableView.FindControl("imgb"
            AddHandler rg.ItemCreated, AddressOf nestedgrid_ItemCreated 
            AddHandler rg.ItemCommand, AddressOf nestedgrid_itemCommand 
            AddHandler rg.UpdateCommand, AddressOf nestedgrid_UpdateCommand 
            rg.DataSource = myds() 
            rg.DataBind() 
        End If 
 
    End Sub 
 
    Protected Sub nestedgrid_UpdateCommand() 
 
    End Sub 
 
    Public Function myds() As DataSet 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        adapter.SelectCommand = New SqlCommand("SELECT TOP 10 OrderID, ShipName, ShipAddress FROM Orders", conn) 
        Dim myDataSet As DataSet = New DataSet 
 
        conn.Open() 
        Try 
            adapter.Fill(myDataSet, "Orders"
            adapter.SelectCommand = New SqlCommand("SELECT OrderID, Quantity FROM [Order Details]", conn) 
            adapter.Fill(myDataSet, "OrderDetails"
        Finally 
            conn.Close() 
        End Try 
        Return myDataSet 
 
    End Function 
 
 
    Public Function dsddl() As DataSet 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        Dim myDataSet As DataSet = New DataSet 
 
        conn.Open() 
        Try 
 
            adapter.SelectCommand = New SqlCommand("SELECT TOP 10 OrderID, ShipName FROM Orders", conn) 
            adapter.Fill(myDataSet, "OrderDetails"
        Finally 
            conn.Close() 
        End Try 
        Return myDataSet 
 
    End Function 
 
End Class 
 

Pavlina
Telerik team
 answered on 20 Jan 2010
2 answers
165 views
I have a grid with the ability to add and update items via the standard controls.

However, if I click to add a record and then click on "edit" on another record then both forms will be displayed at the same time. Is there any method of preventing this behavior to ensure that only one form or the other is displayed?

TIA,

  Jason

Jason Thacker
Top achievements
Rank 1
 answered on 20 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?