Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
213 views
Hello!

I'would like to build a shopping cart inside a RadMenu item.

I want it to work like this:
-User click "Add to Cart" button.
-A menu item containing the cart automatically expands
-While the menu item is expanded, new cart item is inserting into the cart. 
-Menu item holds open for few more seconds.
-Menu item is closing.

All must be done as client side processing. 

So far I have achieved all of these but there are 2 problems:

1) I can't manage to auto expand the menu before an addition of the item 
2) I can't manage to properly style the menu. What I want is to just display cart controls (RadGrid + Submit button + Clear button) but not the underlying container of the Menu Item. I have tried to set the background color to transparent but it doesn't work.. I also can't get rid of the empty space on left and right side of the grid. 

I'm attaching an image for reference.

Markup of my RadMenu:

<telerik:RadMenu ID="menu" runat="server" Width="100%" ClientIDMode="Static" CssClass="Container " EnableEmbeddedBaseStylesheet="True" EnableAjaxSkinRendering="False">
             <Items>
                 <telerik:RadMenuItem runat="server" Text="Home" NavigateUrl="~/Home.aspx">
                 </telerik:RadMenuItem>
                 <telerik:RadMenuItem runat="server" Text="Inventory" NavigateUrl="~/Inventory.aspx">
                 </telerik:RadMenuItem>
                 <telerik:RadMenuItem runat="server" Text="My Account" NavigateUrl="~/MyAccount.aspx">
                 </telerik:RadMenuItem>
                 <telerik:RadMenuItem runat="server" Text="Support" NavigateUrl="~/Support.aspx">
                     <Items>
                         <telerik:RadMenuItem runat="server" Text="FAQ">
                         </telerik:RadMenuItem>
                         <telerik:RadMenuItem runat="server" Text="Shipping">
                         </telerik:RadMenuItem>
                         <telerik:RadMenuItem runat="server" Text="Payments">
                         </telerik:RadMenuItem>
                     </Items>
                     <GroupSettings Flow="Horizontal" />
                 </telerik:RadMenuItem>
                 <telerik:RadMenuItem runat="server" Text="Cart">
                     <Items>
                         <telerik:RadMenuItem runat="server" Text="SubCart" CssClass="Cart" ExpandedCssClass="Cart" OuterCssClass="Cart">
                             <ItemTemplate>
                                 <telerik:RadButton ID="btnSubmit" runat="server" Text="Submit" ButtonType="StandardButton"></telerik:RadButton>
                                 <telerik:RadButton ID="btnClear" runat="server" Text="Clear"></telerik:RadButton>
                             </ItemTemplate>
                         </telerik:RadMenuItem>
                     </Items>
                 </telerik:RadMenuItem>
                 <telerik:RadMenuItem runat="server" Text="Register" NavigateUrl="~/Register.aspx">
                 </telerik:RadMenuItem>
             </Items>
         </telerik:RadMenu>

The RadGrid control inside of the menu is added dynamically (VB.NET):
grid = Functions.CreateCartGrid("grdCart")
menu.FindItemByText("SubCart").Controls.Add(grid)

Jacob
Jakub
Top achievements
Rank 1
 answered on 16 Sep 2013
1 answer
97 views
Telerik users,

Someone else has got to find this annoying. 
 If you set the width property of a RadButton you can not see the button in design view in VS 2012.

As described in Telerik's PITs system.

If the Width property of a RadButton is set, its appearance in the Visual Studio 2012 Design view will be broken.The icons sprite starts showing when the width is sufficiently large, test with different values, e.g. 80px, 100px, 200px, 400px, etc.


This was reported over a year ago and only 3 users have voted to have it fixed.  It has got to be effecting more users.  Apparently it is not of high enough priority to get fixed.

If you are having this issue please vote for this here to get this corrected
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/13391
Ianko
Telerik team
 answered on 16 Sep 2013
1 answer
135 views
Hi,

We want to implement the screen reader functionality in our site.
We have enabled the keyboardnavigation and accessibility features of Telerik for same. However, microsoft narrator do not work for grid bound columns, also tab indexes are not working for grid bound columns.

We are using "2011.1.519.35" version of telrik controls.

Let us know the solution to fix the above issue asap.

Thanks!!
Marin
Telerik team
 answered on 16 Sep 2013
1 answer
237 views
Hi guys.

I'm facing some problem with a GridAttachmentColumn in a Radgrid, the grid is created as follows:
<telerik:RadGrid ID="RadGrid5" runat="server" Width="737px" 
               AutoGenerateColumns="False" CellSpacing="0" GridLines="None"
               oninsertcommand="RadGrid5_InsertCommand" AllowPaging="True"
               Culture="es-MX" onneeddatasource="RadGrid5_NeedDataSource"
               onitemdatabound="RadGrid5_ItemDataBound1"
               onitemcreated="RadGrid5_ItemCreated">
                
<MasterTableView NoMasterRecordsText="No hay registros para mostrar" CommandItemDisplay="Top" EditMode="EditForms" DataKeyNames="fiIdDocumento">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
         
        <telerik:GridBoundColumn FilterControlAltText="Filter column1 column"
            HeaderText="Consecutivo documento" ReadOnly="true" UniqueName="column1" DataField="fiIdDocumento">
        </telerik:GridBoundColumn>
        
        <telerik:GridDropDownColumn FilterControlAltText="Filter column2 column" HeaderText="Tipo de Documento" DataField="fiIdTipoDocto"
            UniqueName="columnTpo">
        </telerik:GridDropDownColumn>
         <telerik:GridNumericColumn FilterControlAltText="Filter column2 column" HeaderText="Número de Escritura" DataField="fiNumEscritura"
            UniqueName="columnNumEscritura" DataType="System.Int32" >
        </telerik:GridNumericColumn>
     
        <telerik:GridDateTimeColumn FilterControlAltText="Filter column4 column"  HeaderText="Fecha de Escritura" DataField="fdFechaEscritura"
            UniqueName="column4" DataFormatString="{0:d}">
        </telerik:GridDateTimeColumn>
 
               <telerik:GridNumericColumn FilterControlAltText="Filter column2 column" HeaderText="Número de Escritura" DataField="fiNumActa"
            UniqueName="columnNumAct" DataType="System.Int32" >
        </telerik:GridNumericColumn>
 
               <telerik:GridNumericColumn FilterControlAltText="Filter column2 column" HeaderText="Número de Notaría" DataField="fiNumNotaria"
            UniqueName="columnNumNot" Visible="True">
        </telerik:GridNumericColumn>
 
               <telerik:GridBoundColumn FilterControlAltText="Filter column2 column" HeaderText="Notario" DataField="fcNomNotario"
            UniqueName="columnNomNot">
        </telerik:GridBoundColumn>
         
         
 
 
               <telerik:GridDropDownColumn FilterControlAltText="Filter column2 column" HeaderText="Estado" DataField="fiIdCdNotaria"
            UniqueName="columnCdNot" Display="True">
        </telerik:GridDropDownColumn>
 
               <telerik:GridNumericColumn FilterControlAltText="Filter column2 column" HeaderText="Número Registro Público" DataField="fiNumAltaRegPub"
            UniqueName="columnNumRP" DataType="System.Int32" >
        </telerik:GridNumericColumn>
 
             <telerik:GridDateTimeColumn FilterControlAltText="Filter column4 column"  HeaderText="Fecha de Alta Registro Público" DataField="fdFechaAltaRegPub"
            UniqueName="columnFchRegPub" DataFormatString="{0:d}">
        </telerik:GridDateTimeColumn>
      <telerik:GridAttachmentColumn FileName="attachment"
                                FilterControlAltText="Filter column5 column" UniqueName="dfdsf"
                                  AttachmentDataField="fcUrlModActConst"
                        AttachmentKeyFields="fcUrlModActConst"
                        FileNameTextField="fcUrlModActConst"
                        DataTextField="fcUrlModActConst"
                                HeaderText="DOC. DIGITALIZADO" ButtonType="ImageButton"
                                ImageUrl="~/img/1338992378_folder.png">
                                <HeaderStyle Width="110px" />
                                <ItemStyle HorizontalAlign="Center" Width="110px" />
                            </telerik:GridAttachmentColumn>
    </Columns>
     <CommandItemSettings AddNewRecordText="Agregar elemento al catálogo" RefreshText="" />
      <EditFormSettings ColumnNumber="3" CaptionFormatString="Modificar la información de la Función: {0}"
                                          CaptionDataField="fiIdDocumento">
                            <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                            <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="2" Height="60px"
                                                Width="100%" />
                            <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" Height="50px"
                                            Width="100%" />
                                             
                      
                            <FormStyle Width="100%" BackColor="#ebebeb"></FormStyle>
                            <EditColumn ButtonType="ImageButton" InsertText="Guardar" UpdateText="Actualizar"
                                        UniqueName="EditCommandColumn1" CancelText="Cancelar">
                            </EditColumn>
                            <FormTableButtonRowStyle HorizontalAlign="Right" BorderStyle="Solid" Font-Bold="True"
                                                     Font-Size="Medium" BorderColor="Black"></FormTableButtonRowStyle>
                        </EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
           </telerik:RadGrid>

What I'm trying to do is insert the data in  RadGrid5_InsertCommand but when I try to get the files of radupload control I get no files,
I tried getting the radupload as follows:

           RadUpload upload = (gridEditedItem.EditManager.GetColumnEditor("columna") as GridAttachmentColumnEditor).RadUploadControl;
 
RadUpload upload = (RadUpload)gridEditedItem["columna"].Controls[0];
  In both cases the property InitialFileInputsCount  of upload is equals to 1, but when I try to save upload.UploadedFiles is equals to 0
This is how I try to save  the file
foreach (UploadedFile file in upload.UploadedFiles)
      {
 
          var fileName = idSol + "-" + file.GetName().ToLower();
 
 
          file.SaveAs((@"\\dscvault\doctosAsocCiviles\" + fileName));
 
          urlArchivo = "/doctosAsocCiviles/" + fileName;
 
 
      }
 I can't understand why the uploadedFiles is equals to 0.

Hope your Help.

Best Regards.
Cristian.
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Sep 2013
1 answer
123 views
Hi,

I am using RadAsyncUpload to upload image files.
Under some criteria I want to upload file from webserver itself into default folder.

e.g. in combobox I'll have name of image files copied on webserver with their path. If user select any of the option from combobox then file from specified path on webserver will get uploaded ( or copied) to temp folder in same way as RadAsyncUpload doeses if it is selected by user on client side. In this case RadAsyncUpload should point to webserver's folder as source path.
Is there any way to do this all on server side?
Plamen
Telerik team
 answered on 16 Sep 2013
1 answer
90 views
i want visible Button1 when i click. version 2013.1.403.35
page aspx
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="false" OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender">
        <MasterTableView>
            <Columns>
                <telerik:GridTemplateColumn HeaderText="Edit Column" UniqueName="EditColumn">
                    <ItemTemplate>
                        <asp:Button ID="Button1" CommandName="Custom" CommandArgument='<%# Container.DataSetIndex + 1 %>' runat="server" Text="Button" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="Column1" HeaderText="Column1"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Column2" HeaderText="Column2"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Column3" HeaderText="Column3"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Column4" HeaderText="Column4"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Column5" HeaderText="Column5"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

CS:
List<int> updatedValues = new List<int>();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (ViewState["UpdatedValues"] != null)
        {
            updatedValues = ViewState["UpdatedValues"] as List<int>;
        }
    }
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("Column1");
        table.Columns.Add("Column2");
        table.Columns.Add("Column3");
        table.Columns.Add("Column4");
        table.Columns.Add("Column5");
 
        for (int i = 0; i < 20; i++)
        {
            table.Rows.Add("Col1Row" + i, "Col2Row" + i, "Col3Row" + i, "Col4Row" + i, "Col5Row" + i);
        }
 
        RadGrid1.DataSource = table;
    }
 
 
    protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == "Custom")
        {
            GridEditableItem item = e.Item as GridEditableItem;
            updatedValues.Add(item.ItemIndex);
 
            // My code processing
        }
    }
    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        foreach (int index in updatedValues)
        {
            RadGrid1.MasterTableView.Items[index]["EditColumn"].Controls[0].Visible = false;
        }
 
        ViewState["UpdatedValues"] = updatedValues;
    }

Any solution?

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Sep 2013
1 answer
82 views
Dears , 
            I have Strange Issue , i enabled sorting to my Grid as the documentation said and follow every thing in the documentations but when i press on the column header to sort , no thing happened ?!  the Grid remained unsorted!...how can i solve it 
here is my code

  <telerik:RadGrid CssClass="paper-table table table-paper table-striped table-sortable table-bordered"
                ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1" EnableLinqExpressions="False"
                ShowStatusBar="True" GridLines="None" AllowSorting="True" AllowFilteringByColumn="True"
                EnableAjax="true" BorderStyle="Solid" BorderWidth="1px" AllowPaging="True" OnItemDataBound="RadGrid1_ItemDataBound"
                OnNeedDataSource="RadGrid1_NeedDataSource">
                
                <AlternatingItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <MasterTableView DataSourceID="SqlDataSource1" HierarchyLoadMode="Client" AutoGenerateColumns="False"
                    AllowFilteringByColumn="true" 
                    GroupLoadMode="Client" 
                    DataKeyNames="CardId"
                    AllowSorting="true">
                    <DetailTables >
                        
                        <telerik:GridTableView  DataSourceID="SqlDataSource2" BorderColor="Black" DataKeyNames="FK_Card"
                            BorderStyle="Solid" GridLines="Both" AllowFilteringByColumn="false" HierarchyDefaultExpanded="True">
                            
                            <ParentTableRelation>
                                <telerik:GridRelationFields DetailKeyField="CardId" MasterKeyField="CardId" />
                            </ParentTableRelation>


                            <CommandItemSettings ExportToPdfText="Export to PDF" />
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <AlternatingItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </telerik:GridTableView>
                    </DetailTables>
                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="#" AllowFiltering="false">
                            <ItemTemplate>
                                <asp:Label ID="numberLabel" runat="server" Width="30px" />
                            </ItemTemplate>
                            <HeaderStyle Width="30px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="CardNo" FilterControlAltText="Filter CardNo column"
                            HeaderText="Card id" SortExpression="CardNo" UniqueName="CardNo" AllowFiltering="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Status_Description" FilterControlAltText="Filter Status_Description column"
                            HeaderText="Status" SortExpression="Status_Description" UniqueName="Status_Description"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
                        
                        
                        </telerik:GridBoundColumn>
                       
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                    <ItemStyle BackColor="Transparent" BorderColor="Black" BorderStyle="Solid" HorizontalAlign="Center"
                        VerticalAlign="Middle" />
                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </MasterTableView>
                <HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center"
                    VerticalAlign="Middle" />
                <PagerStyle PageButtonCount="15" EnableSEOPaging="True" />
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>

Kindly i need help in this section , because i have a delivery date !!
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Sep 2013
2 answers
84 views
In my page,there are 2 web user controls,and I used the RadAjaxManager as well.
Every controls had been bind with RequiredFieldValidator.
The validation works when I clicke the submit button for the first time.
I mean,after I chosen a item from a combobox ,autopostback enabled,the validation would not work any more.
I think ,there must be something wrong with  RadAjaxManager.
coz it works fine without RadAjaxManager.but I must use it in the page.
Thanks in advance.
reezo
Top achievements
Rank 1
 answered on 16 Sep 2013
0 answers
96 views
hello all

I have a master page containing rad menu item. In my database there is user wise menu access. I want to give the access of each menu from the database. How can i do that also please let me know how to change the visibility of telerik radmenuitem dynamically?
Thanks in advance.
Shubhadeep
Top achievements
Rank 1
 asked on 15 Sep 2013
0 answers
78 views
Grid.get_masterTableView().get_dataItems()[document.getElementById("radGridClickedRowIndex").value].get_element().click();
this code works.but the one below does'nt.
Grid.get_masterTableView().get_dataItems()[document.getElementById("radGridClickedRowIndex").value].get_element().dblclick();
C
Top achievements
Rank 1
 asked on 14 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?