Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
543 views
Hello,

I have a RadAsyncUpload control on a webpage which opens in a radwindow and inserts the files into a database table.  It works great and displays a checkmark unless you select a file larger than 5MB in which case you get an exclamation mark with no errors (javascript or otherwise).
The MaxFileSize is set to 0 (which should be unlimited) yet it does not work in developement or production.

Also,
Is there a way to have the control clear the temp file from the RadUploadTemp folder when the remove link is clicked or after i have put the files in the database?

---- UPLOADFORM.ASPX ----
<%@ Page Language="VB" Theme="Main" AutoEventWireup="false" CodeFile="UploadForm.aspx.vb" Inherits="UploadForm" %>
<%@ 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>Upload Contract</title>
  </head>
  <body>
    <form id="form1" runat="server">
      <div>
        <telerik:RadScriptManager ID="Script1" runat="server" />
        <telerik:RadFormDecorator ID="tfd1" runat="server" />
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Forest" />
        Select file(s) to upload for Customer # <asp:Label ID="lblCustomerNumber" runat="server" Text="" />
        <telerik:RadAsyncUpload ID="RadUpload1" runat="server" Skin="Forest" 
          ControlObjectsVisibility="RemoveButtons" MaxFileSize="0" 
          InputSize="40" MaxFileInputsCount="3" Width="475px" />
        <br />
        <table align="center">
          <tr>
            <td>
              <asp:Button ID="btnUpload" runat="server" Text="Upload Files" />
            </td>
          </tr>
        </table>
      </div>
    </form>
  </body>
</html>

---- UPLOADFORM.ASPX.VB ----
Imports Telerik.Web.UI
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System.Data.SqlTypes


Partial Class UploadForm
    Inherits System.Web.UI.Page


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        lblCustomerNumber.Text = Session("CustomerID")
    End Sub


    Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
        Dim CN As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("EnergyConnectionString").ToString)
        CN.Open()


        For Each File As UploadedFile In RadUpload1.UploadedFiles
            Dim bytes(File.ContentLength - 1) As Byte
            File.InputStream.Read(bytes, 0, File.ContentLength)
            Dim cmd As New SqlCommand("INSERT INTO ContractFiles (CustomerID, FileName, FileExt, MIMEType, FileSize, DateAdded, FileData) VALUES (@CID, @FN, @FE, @MT, @FS, @DA, @FD)", CN)
            cmd.Parameters.AddWithValue("@CID", "2976")
            cmd.Parameters.AddWithValue("@FN", File.GetNameWithoutExtension())
            cmd.Parameters.AddWithValue("@FE", File.GetExtension().ToString.Replace(".", ""))
            cmd.Parameters.AddWithValue("@MT", File.ContentType())
            cmd.Parameters.AddWithValue("@FS", File.ContentLength.ToString())
            cmd.Parameters.AddWithValue("@DA", Now.ToString())
            cmd.Parameters.AddWithValue("@FD", bytes)
            cmd.ExecuteNonQuery()
            'sdsFiles.DataBind()
            'gvFiles.DataBind()
        Next
        CN.Close()
    End Sub
End Class

Any assistance is greatly appreciated,

Thanks
Hristo Valyavicharski
Telerik team
 answered on 08 Feb 2013
5 answers
186 views
Hey Guys,

I have a RadTextBox inside  a RadGrid's ItemTemplate for a given column.  This is bound to a datasource (if !Page.IsPostback).
I have an independant button event which fires and tries to reference the text of the radtextbox from the first row of the grid.
It finds it, but it is always the unedited value that was originally bound, and any edit to the field is lost.
It seems like it's being rebound, but I have that bind inside if (!Page.IsPostback) ??

I'm clearing missing something here. - I am not using edit mode - just a template field. 
Any help appreciated.
Angel Petrov
Telerik team
 answered on 08 Feb 2013
1 answer
68 views
Hi,

I can't find an event that will fire after an event ItemCommand is finished. The event handler ItemCommand (radFileExplorerEventArgs.Command == "UploadFile") is fired before a file is actually uploaded to a specified directory. After this file is saved to a server, I want to call another method to read that file.

Thank you,
Khoa
Vessy
Telerik team
 answered on 08 Feb 2013
7 answers
795 views
Hello,
if I press edit / update / delete in RadGrid, it will make a PostBack and the Page jumps to the Top.
This is not so nice if you have a lot of data and have to scroll / fin your line again ...

So how can I prevent RadGrid to make a PostBack to the Page?
Like on this example. (Do PageSize 50, scroll down to the last lne and press edit / update)

Best regards
Benjamin
Barry P
Top achievements
Rank 1
 answered on 08 Feb 2013
1 answer
112 views
Hi,
I have a rad strip defined on my aspx page as follows,
<telerik:RadTabStrip ID="radTabStripSamples" runat="server" OnTabClick="radStripHardwareBrowser_Click"/>

I am generating the tabs for the above tabstrip using C# code as follows
protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List<Category> lstCategories = new List<Category>();
            lstCategories = Service.GetCategories();
            int numberOfCategories = lstCategories.Count;
            CreateTabs(numberOfCategories, lstCategories);
        }
    }
 
protected void CreateTabs(int numberOfCategories, List<Category> lstCategories)
    {
        for (int i = 0; i < numberOfCategories; i++)
        {
            RadTab tab = new RadTab(lstCategories[i].Name);
            radTabStripSamples.Tabs.Add(tab);
        }
    }
now i would like to add template to each of those rad tabs as in static code say for example 
<telerik:RadTabStrip ID="radTabStripSamples" runat="server" OnTabClick="radStripHardwareBrowser_Click">

<Tabs>
        <telerik:RadTab Text="Sample1" runat="server">
        <TabTemplate>
            <table>
  //would like to generate this table inside the tab template of the individual tab from cs code //
           </table>
        </TabTemplate>
        </telerik:RadTab>
</Tabs>
</telerik:RadTabStrip

from C# code, after adding the tabs dynamically.So,I tried something like this 
RadTemplateItem template = new RadTemplateItem();
tab.TabTemplate = template.InstantiateIn(tab);//-----> //this would nt work for sure because the return type is void. So would like to know how to go about this.
 tab.TabTemplate =  template;//--->//This one did not work the way i expected it to// this simply replaced the tab name with "XyZ serires" instead of the categories names.

class RadTemplateItem : ITemplate
{
    public void InstantiateIn(Control container)
    {
        Table tbl = new Table();
        TableRow row = new TableRow();
        TableCell cell = new TableCell();
        Label Name = new Label();
        Name.Text = "XYZ Series";
        cell.Text = Name.Text;
        row.Cells.Add(cell);
        tbl.Rows.Add(row);
        container.Controls.Add(tbl);
    }
 
}
I do not know whether am using the right approach.Would like to see a sample to do the same or any documentation. Thanks you for your help
Plamen
Telerik team
 answered on 08 Feb 2013
8 answers
1.1K+ views
Hi all:

I ahve data that is being displayed in a RadGrid, and some of the data has multiple lines per row. So for example it might be

Col 1     Col 2      Col 3
Row 1   Test 1     1
                            2
                            3
                           

and I need to replicate this display in the RadGrid cell. I tried to build a string thus:

string strRates = 1 + "\r\n" +
                           2 + "\r\n" +
                           3 + "\r\n";

and then display that string in the RadGrid cell, but the result ends up:

Col 1     Col 2       Col 3
Row 1   Test 1     1 2 3

Does anyone know if it is possible to display mutliple rows of data within 1 cell of the RadGrid?

John.

Martin Roussel
Top achievements
Rank 1
 answered on 08 Feb 2013
3 answers
191 views

Hi,

i've populated the grid with all the records (600) during the asp.net  page loading and ncessary grid settings too. for example, VirtualItemCount and set the pagesize=100. the pager is properly showing the number of pages and the number of records.

 What i want to do is to show data of one page at a time which means once the asp.net page is loaded it will show the first page content which is doing upon the first load. Now when a user clicks on the next button, the grid should show the next page content. I don't wana do the poast back because all the data is already binded with the grid. it is just a matter of displaying per page. 

i've implemneted grid1_Command on client side to avoid post back whenever a user will click any button on the pager. Now i need to ask you what setting i need to do either with the grid or master table to show the next page content?

please note that when i click the next button the  pager, its status gets change to 2 of 6 page but the grid still shows first 100 records whereas it should show 101-200 records.

Thanks.

function grid1_Command(sender, args) {
              args.set_cancel(true);
                 
              var cmdName = args.get_commandName();
              if (cmdName == 'Page') {
                  var cmdArg = args.get_commandArgument();
                  switch (cmdArg) {
                      case "Next":

                          break;
                  }
              }                                         
          }



 I've following settings on the grid. i'm purposely omitting the columns part.

<telerik:RadGrid ID="grid1" runat="server" AutoGenerateColumns="False"
                        EnableEmbeddedSkins="False" Skin="Grid" EnableViewState="true"
                        PageSize="100" AllowPaging="true" AllowSorting="true" HorizontalAlign="Left"
                        GridLines="None" Width="100%" Height="100%" AllowMultiRowSelection="true">                                           
                        <MasterTableView Width="100%" CellPadding="0" EnableTheming="False" CanRetrieveAllData="true"
                            GridLines="None" GroupsDefaultExpanded="False" HorizontalAlign="Left" TableLayout="Fixed"                            
                            HeaderStyle-HorizontalAlign="Left" AllowMultiColumnSorting="false"
                            AllowNaturalSort="true" AllowCustomSorting="false" ShowHeadersWhenNoRecords="true"> <SortExpressions>
                                <telerik:GridSortExpression FieldName="CreationDate" SortOrder="Descending" />
                                </SortExpressions>                                                                                                                                                                                                          
                            <PagerStyle AlwaysVisible="true" Height="25px" Width="100%" Mode="NextPrev" />                           
                       </MasterTableView>                      
                        <ClientSettings EnablePostBackOnRowClick="false" EnableRowHoverStyle="true" AllowColumnHide="true">                           
                            <Selecting AllowRowSelect="True" />                   
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="100%" FrozenColumnsCount="0" />                           
                            <ClientEvents OnCommand="grdModelSearch_Command" OnRowSelecting="RowSelecting" OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" OnRowDblClick="RowDoubleClicked" />
                            <Resizing AllowColumnResize="true" />                                               
                        </ClientSettings>               
                        <SortingSettings EnableSkinSortStyles="false" />                         
            </telerik:RadGrid>                      

Pavlina
Telerik team
 answered on 08 Feb 2013
3 answers
106 views
I am testing RadCaptcha on IE8 and it is not working. See the attached image how it looks IE 8. 
Slav
Telerik team
 answered on 08 Feb 2013
6 answers
293 views
Please help ... this is driving me nuts...

I have a several grid like this one and noticed that in "sprites.gif" is not showing images only in Internet Explorer, i have tried several approaches, "compatible mode", "fiddler" and "firebug" for checking if url is ok, image is actually there, tried altering css and change image it is ok with that , only happens in IE and with the file sprites.gif. (Note the image of Expand/Collapse on DetailTable)

I have striped almost to the maximum  to a test page to use a new Isolated RadScriptMAnager and a sample radgrid with some simple dataBind . Note this is a Grid with a 1 Detail Table.

Code is below and a image to compare. Please help....

My setup is Windows 8 - IE10 - Telerik Version :  2012.3.1205.40

Test.aspx
<%@ Page Title="" Language="C#"  AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="SenunIS.ERP.Website.Stock.test" %>
 
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="TelerikScriptManager" runat="server" >
                
    </telerik:RadScriptManager>
       <telerik:RadGrid ID="CountStockGridView" Skin="Windows7"  runat="server" EnableEmbeddedSkins="true"
                                Width="100%" Height="400px" OnDetailTableDataBind="CountStockGridView_DetailTableDataBind"
                                AutoGenerateColumns="False" EnableAjaxSkinRendering="false"
                                PageSize="10"  >
                                <MasterTableView DataKeyNames="MovementDetailsID" EditMode="InPlace" Name="Grid"
                                    HierarchyLoadMode="Client" NoMasterRecordsText="No Records..." NoDetailRecordsText="No Records...">
                                    <SortExpressions>
                                        <telerik:GridSortExpression FieldName="ArticleName" SortOrder="Ascending" />
                                    </SortExpressions>
                                    <Columns>
                                        <telerik:GridTemplateColumn>
                                            <HeaderTemplate>
                                                <asp:Label ID="ArticleNameHeader" runat="server" Text="Artigo" Font-Bold="true"></asp:Label>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="ArticleCodeLabel" runat="server" Text='<%#Bind("ArticleName") %>'></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="500px" />
                                            <ItemStyle Width="500px" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn>
                                            <HeaderTemplate>
                                                <asp:Label ID="ManagedByLots" runat="server" Text="Gerido por lote" Font-Bold="true"></asp:Label>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="ManagedByLotsCheckBox" runat="server" Enabled="false" Checked='<%#Bind("ManagedByLots") %>' />
                                            </ItemTemplate>
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Width="100px" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                                            <HeaderTemplate>
                                                <asp:Label ID="NEmbalagensHeader" runat="server" Text="Nº Emb" Font-Bold="true"></asp:Label>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <telerik:RadNumericTextBox ID="NEmbalagemLabel" runat="server" AutoPostBack="true"
                                                      
                                                    BorderStyle="None" CssClass="txtNum10"
                                                    Width="80px">
                                                </telerik:RadNumericTextBox>
                                                <telerik:RadNumericTextBox ID="NEmbalagemLabelEdit1" runat="server" ReadOnly="true"
                                                    NumberFormat-DecimalDigits="0" Value='10'
                                                    BorderStyle="None" AutoPostBack="true" Visible="false" CssClass="txtNum7Disabled"
                                                    Width="80px">
                                                </telerik:RadNumericTextBox>
                                                <%-- <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="NEmbalagemLabelEdit1"
                                                    ValidationGroup="PagamnetoValPagaments" ControlToValidate="NEmbalagemLabel" Operator="GreaterThan"></asp:CompareValidator>--%>
                                            </ItemTemplate>
                                            <HeaderStyle Width="90px" />
                                            <ItemStyle Width="90px" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                                            <HeaderTemplate>
                                                <asp:Label ID="TotalHeader" runat="server" Text="Total Quantidade" Font-Bold="true" ></asp:Label>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <telerik:RadNumericTextBox ID="QuantityNumericTextBox" BorderStyle="None" CssClass="txtNum17Disabled"
                                                      NumberFormat-DecimalDigits="4"
                                                    runat="server" Width="128px" ReadOnly="true"  >
                                                </telerik:RadNumericTextBox>
                                                <asp:Label ID="MeasuringUnitLabel" runat="server" Text='<%#Eval("MeasuringUnitName2") %>'></asp:Label>
                                            </ItemTemplate>                                           
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                                            <HeaderTemplate>
                                                <asp:Label ID="TotalHeader" runat="server" Text="Total Valor" Font-Bold="true"></asp:Label>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <telerik:RadNumericTextBox ID="TotalNumericTextBox" BorderStyle="None" CssClass="txtNum17Disabled"
                                                    ReadOnly="true" runat="server" AutoPostBack="true"
                                                    NumberFormat-DecimalDigits="4" Width="128px">
                                                </telerik:RadNumericTextBox>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <DetailTables>
                                        <telerik:GridTableView DataKeyNames="MovementDetailsID, MovementDetailsItemID" Name="Details"
                                            runat="server" EditMode="InPlace" BackColor="#f1f1f1" HierarchyLoadMode="Client"  >
                                            <SortExpressions>
                                                <telerik:GridSortExpression FieldName="MovementDetailsItemID" SortOrder="Ascending" />
                                            </SortExpressions>
                                            <Columns>                                              
                                                <telerik:GridTemplateColumn>
                                                    <HeaderTemplate>
                                                        <asp:Label ID="DescriotionHeader" runat="server" Text="Nome do Lote" Font-Bold="true"></asp:Label>
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="DescriptionTextBox" runat="server" CssClass="txtMedium" Text='<%#Bind("Description") %>'
                                                           
                                                            CausesValidation="true"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle BorderStyle="None" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Right">
                                                    <HeaderTemplate>
                                                        <asp:Label ID="QuantityHeader" runat="server" Text="Quantidade" Font-Bold="true"></asp:Label>
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <telerik:RadNumericTextBox ID="QuantityTextBox"
                                                            runat="server" CssClass="txtNum10" ReadOnly="false"
                                                            AutoPostBack="true" BorderStyle="None" Width="80px"
                                                            CausesValidation="true">
                                                        </telerik:RadNumericTextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle BorderStyle="None" Width="8%" />
                                                    <HeaderStyle Width="8%" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                                                    <HeaderTemplate>
                                                        <asp:Label ID="UnitPriceHeader" runat="server" Text="Preço unidade" Font-Bold="true"></asp:Label>
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <telerik:RadNumericTextBox ID="UnitPriceTextBox" runat="server" CssClass="txtNum17"
                                                            ReadOnly="false" AutoPostBack="true" NumberFormat-DecimalDigits="8"
                                                             BorderStyle="None" Width="125px">
                                                            
                                                        </telerik:RadNumericTextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle Width="14%" />
                                                    <HeaderStyle Width="14%" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                                                    <HeaderTemplate>
                                                        <asp:Label ID="TotalVHeader" runat="server" Text="Total" Font-Bold="true"></asp:Label>
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <telerik:RadNumericTextBox ID="TotalVTextBox" runat="server" CssClass="txtNum10Disabled"
                                                            ReadOnly="true"  BorderStyle="None" Width="80px"
                                                            NumberFormat-DecimalDigits="4">
                                                        </telerik:RadNumericTextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle Width="8%" />
                                                    <HeaderStyle Width="8%" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn>
                                                    <HeaderTemplate>
                                                        <asp:Label ID="BarcodeNumberItemHeader" runat="server" Text="Nº de Etiquetas" Font-Bold="true"></asp:Label>
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <telerik:RadNumericTextBox ID="BarcodeNumberItemLabel" runat="server" AutoPostBack="true" ReadOnly ="false"
                                                              
                                                            NumberFormat-DecimalDigits="0" BorderStyle="None" Text='<%#Bind("NumberLabel") %>'
                                                            CssClass="txtNum10" Width="80px">
                                                        </telerik:RadNumericTextBox>
                                                    </ItemTemplate>
                                                    <ItemStyle Width="8%" />
                                                    <HeaderStyle Width="8%" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="PrintCodeBarImageButton" runat="server" ImageUrl="~/Images/printerCodeBar.png"
                                                            ToolTip="<%$Resources:Resources,Print%>"
                                                            CausesValidation="False" Style="vertical-align: middle" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="4%" HorizontalAlign="Right" />
                                                    <HeaderStyle Width="4%" HorizontalAlign="Right" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn>
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="DeleteImageButton" runat="server" ImageUrl="~/Images/delete2.png"
                                                            Enabled="true" ToolTip="<%$Resources:Resources,Delete%>"
                                                            CausesValidation="False" Style="vertical-align: middle" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="4%" HorizontalAlign="Right" />
                                                    <HeaderStyle Width="4%" HorizontalAlign="Right" />
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                        </telerik:GridTableView>
                                    </DetailTables>
                                    <PagerTemplate>
                            <table border="0" cellpadding="0" cellspacing="0" style="float: left; height: 32px;">
                                <tbody>
                                    <tr>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px">
                                            <asp:ImageButton ID="FirstImage" runat="server" ImageUrl="~/Images/Telerik/Toolbar/first.png"
                                                CommandName="Page" CommandArgument="First" CausesValidation="false" />
                                        </td>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px">
                                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/Telerik/Toolbar/previous.png"
                                                CommandName="Page" CommandArgument="Prev" CausesValidation="false" />
                                        </td>
                                        <asp:Panel runat="server" Font-Bold="true" Visible="false" ID="NumericPagerPlaceHolder" />
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px">
                                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/Images/Telerik/Toolbar/next.png"
                                                CommandName="Page" CommandArgument="Next" CausesValidation="false" />
                                        </td>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px">
                                            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/Images/Telerik/Toolbar/last.png"
                                                CommandName="Page" CommandArgument="Last" CausesValidation="false" />
                                        </td>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px; padding-left: 200px">
                                            Página:
                                        </td>
                                        <td style="border-style: none; vertical-align: bottom;">
                                            <asp:TextBox CssClass="txtNum4" ID="tbPageNumber" runat="server" Columns="3" Text='<%# (int)DataBinder.Eval(Container, "OwnerTableView.CurrentPageIndex") + 1 %>' />
                                        </td>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px;">
                                            <label>
                                                <%#" de " + DataBinder.Eval(Container, "Paging.PageCount") %></label>
                                        </td>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 0px">
                                            <asp:ImageButton ID="GoTo" runat="server" CommandName="CustomChangePage" ImageUrl="<%$Resources:Resources, ViewImageUrl %>">
                                            </asp:ImageButton>
                                        </td>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px; padding-left: 15px;">
                                            Registos por Página:
                                        </td>
                                        <td style="border-style: none; vertical-align: bottom;">
                                            <asp:TextBox CssClass="txtNum4" ID="tbPageSize" runat="server" Columns="3" Text='<%# (int)DataBinder.Eval(Container, "OwnerTableView.PageSize") %>'></asp:TextBox>
                                        </td>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 0px">
                                            <asp:ImageButton ID="ImageButton4" runat="server" TabIndex="0" CommandName="ChangeSize"
                                                ImageUrl="<%$Resources:Resources, ChangeImageUrl %>"></asp:ImageButton>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <table border="0" cellpadding="0" cellspacing="0" style="float: right; height: 32px;">
                                <tbody>
                                    <tr>
                                        <td style="border-style: none; vertical-align: middle; padding-bottom: 5px">
                                            <label>
                                                <%# "Registo " + Convert.ToString((int)DataBinder.Eval(Container, "OwnerTableView.CurrentPageIndex") * (int)DataBinder.Eval(Container, "OwnerTableView.PageSize") + 1) + " a " + Convert.ToString((int)DataBinder.Eval(Container, "OwnerTableView.CurrentPageIndex") * (int)DataBinder.Eval(Container, "OwnerTableView.PageSize") + (int)DataBinder.Eval(Container, "OwnerTableView.Items.Count")) + " de " %></label>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </PagerTemplate>
                                </MasterTableView>
                                <ClientSettings>
                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                </ClientSettings>                               
                                <PagerStyle AlwaysVisible="true" />
                                <ValidationSettings CommandsToValidate="Update" />
                                 
                            </telerik:RadGrid>
        </form>

Test.cs
using SenunIS.ERP.Modules.Stock;
using SenunIS.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace SenunIS.ERP.Website.Stock
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BusinessObjectList<MovementDetails> list = MovementDetails.GetByMovementID(new Guid("6BBAF51D-63B0-4CAD-8B8C-6C05A84CDF69"));
             
             
            CountStockGridView.DataSource = list;
            CountStockGridView.DataBind();
        }
 
        protected void CountStockGridView_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
        {
 
            BusinessObjectList<MovementDetails> list = MovementDetails.GetByMovementID(new Guid("6BBAF51D-63B0-4CAD-8B8C-6C05A84CDF69"));
            BusinessObjectList<MovementDetailsItem> itemlist = new BusinessObjectList<MovementDetailsItem>();
            foreach (MovementDetails item in list)
            {
                itemlist.AddRange(MovementDetailsItem.GetByMovementDetailsID(item.MovementDetailsID));
            }
            Guid movementDetailsID = new Guid(e.DetailTableView.ParentItem.OwnerTableView.DataKeyValues
                                      [e.DetailTableView.ParentItem.ItemIndex]["MovementDetailsID"].ToString());
 
            e.DetailTableView.DataSource = itemlist.FindAll(obj => obj.MovementDetailsID == movementDetailsID);
 
 
        }
 
        
    }
}

Nuno
Top achievements
Rank 1
 answered on 08 Feb 2013
2 answers
195 views
I want to be able to accomplish several things with the menu, but am having a hard time trying to figure it out....

Make the font bold
Make the font size larger
Make the border color red
Align the items all the way to the right (instead of the left)

Can someone inform me how I can accomplish this?

Attached, is my markup.
Bill
Top achievements
Rank 2
 answered on 08 Feb 2013
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?