Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
714 views
Hi All,

Have a RadGrid in aspx page. Have dynamically created GridTemplateColumn with Textboxes inside.

Works fine. I am able to enter values in the Textbox.

Here is the aspx coding.
<telerik:RadGrid ID="RadGridText" runat="server" Skin="Vista" AutoGenerateColumns="false"
                    OnItemDataBound="RadGridText_ItemDataBound" OnNeedDataSource="RadGridText_NeedDataSource"
                    OnPreRender="RadGridText_PreRender" Height="250px" Width="1000px">
                    <MasterTableView HeaderStyle-CssClass="disable-highlight" Width="98%" HeaderStyle-HorizontalAlign="Center"
                        HeaderStyle-Wrap="true">
                        <Columns>
                         
                        </Columns>
                    </MasterTableView>
                    <ClientSettings Scrolling-AllowScroll="true" Resizing-AllowColumnResize="true" Scrolling-SaveScrollPosition="true"
                        Scrolling-FrozenColumnsCount="2" Scrolling-UseStaticHeaders="true">
                        <Selecting AllowRowSelect="true" />                      
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                    </ClientSettings>
                </telerik:RadGrid>

Here is the .cs coding
public void LoadGridText()
        {
            dt1 = GetData();
            dtnewd = dt1.Tables[0].Clone();
            //
            for (int x = 2; x < dtnewd.Columns.Count - 4; x++)
            {
                dtnewd.Columns[x].DataType = typeof(bool);
            }
 
            for (int c = 0; c < dt1.Tables[0].Rows.Count; c++)
            {
                for (int d = 2; d < dt1.Tables[0].Columns.Count - 4; d++)
                {
                    dt1.Tables[0].Rows[c][d] = dt1.Tables[0].Rows[c][d].ToString() == "1" ? true : false;// Convert.ToBoolean(dt1.Tables[0].Rows[c][d]);
                }
            }
 
            foreach (DataRow dr in dt1.Tables[0].Rows)
            {                
                dtnewd.ImportRow(dr);
            }
 
 
            if (dt != null && dtnewd.Rows.Count > 0)
            {
                for (Int32 m = 0; m < dtnewd.Rows.Count; m++)
                {
                    columnsum += Convert.ToDecimal(dtnewd.Rows[m]["MININVESTMENT"]);
 
                }
 
                txtMinInvestment.Text = columnsum.ToString();
                txtBudget.Text = (Convert.ToDouble(columnsum) * 10).ToString();
 
            }
 
            GridBoundColumn objBoundMKTID = new GridBoundColumn();
            objBoundMKTID.HeaderText = dtnewd.Columns[0].ToString().ToString();
 
            objBoundMKTID.UniqueName = dtnewd.Columns[0].ToString().ToString();
            objBoundMKTID.DataType = typeof(Int32);
            objBoundMKTID.DataField = dtnewd.Columns[0].ToString();
            RadGridText.MasterTableView.Columns.Add(objBoundMKTID);
            objBoundMKTID.Display = false;
 
 
            GridBoundColumn objBound = new GridBoundColumn();
            objBound.HeaderText = dtnewd.Columns[1].ToString().ToString();
            objBound.UniqueName = dtnewd.Columns[1].ToString().ToString();
            objBound.DataType = typeof(string);
            objBound.DataField = dtnewd.Columns[1].ToString();
            objBound.HeaderStyle.Width = 100;
            objBound.HeaderStyle.Wrap = true;
            objBound.ItemStyle.Width = 100;
            objBound.ItemStyle.Wrap = true;
            RadGridText.MasterTableView.Columns.Add(objBound);
 
            for (int z = 2; z < dtnewd.Columns.Count - 4; z++)
            {
                GridTemplateColumn objGridTemp = new GridTemplateColumn();
                objGridTemp.HeaderText = dtnewd.Columns[z].ToString().ToString();
                objGridTemp.UniqueName = dtnewd.Columns[z].ToString().ToString();
                //objBound.DataType = typeof(string);
                objGridTemp.DataField = dtnewd.Columns[z].ToString();
                objGridTemp.HeaderStyle.Width = 100;
                objGridTemp.HeaderStyle.Wrap = true;
                objGridTemp.ItemStyle.Width = 100;
                objGridTemp.ItemStyle.Wrap = true;              
 
                objGridTemp.ItemTemplate = new MyTemplate(dtnewd.Columns[z].ToString());
 
                RadGridText.MasterTableView.Columns.Add(objGridTemp);
            }
           
 
            GridBoundColumn objBoundcol3 = new GridBoundColumn();
            objBoundcol3.HeaderText = "MININVESTMENT";
            objBoundcol3.UniqueName = "MININVESTMENT";
            objBoundcol3.DataType = typeof(string);
            objBoundcol3.DataField = "MININVESTMENT";
            objBoundcol3.HeaderStyle.Width = 100;
            objBoundcol3.HeaderStyle.Wrap = true;
            objBoundcol3.ItemStyle.Width = 100;
            objBoundcol3.ItemStyle.Wrap = true;
            objBoundcol3.Visible = false;
            RadGridText.MasterTableView.Columns.Add(objBoundcol3);
 
            GridBoundColumn objBoundcol = new GridBoundColumn();
            objBoundcol.HeaderText = "SORTORDER";
            objBoundcol.UniqueName = "SORTORDER";
            objBoundcol.DataType = typeof(string);
            objBoundcol.DataField = "SORTORDER";
            objBoundcol.HeaderStyle.Width = 100;
            objBoundcol.HeaderStyle.Wrap = true;
            objBoundcol.ItemStyle.Width = 100;
            objBoundcol.ItemStyle.Wrap = true;
            objBoundcol.Display = false;
            RadGridText.MasterTableView.Columns.Add(objBoundcol);
 
            GridBoundColumn objBoundcol2 = new GridBoundColumn();
            objBoundcol2.HeaderText = "MKTPRIORITY";
            objBoundcol2.UniqueName = "MKTPRIORITY";
            objBoundcol2.DataType = typeof(Int32);
            objBoundcol2.DataField = "MKTPRIORITY";
            objBoundcol2.HeaderStyle.Width = 100;
            objBoundcol2.HeaderStyle.Wrap = true;
            objBoundcol2.ItemStyle.Width = 100;
            objBoundcol2.ItemStyle.Wrap = true;
            objBoundcol2.Display = false;
            RadGridText.MasterTableView.Columns.Add(objBoundcol2);
        }
 
public class MyTemplate : ITemplate
        {
            protected TextBox boolValue;
            private string colname;
            protected LiteralControl lControl;
 
            public MyTemplate(string cName)
            {
                colname = cName;
            }
 
            public void InstantiateIn(System.Web.UI.Control container)
            {
                boolValue = new TextBox();
                boolValue.ID = colname;
                boolValue.Width = 50;
                container.Controls.Add(boolValue);
            }
            void boolValue_DataBinding(object sender, EventArgs e)
            {
                TextBox cBox = (TextBox)sender;
                GridDataItem container = (GridDataItem)cBox.NamingContainer;
            }          
 
        }

I Need to get the entered values in the Textboxes. Need it as a DataTable when a button is clicked.

protected void btnCalc_Click(object sender, EventArgs e)
       {
           DataTable Dt = new DataTable();
 
           //Need to get the values in the Grid in this DataTable Dt.
 
          
       }


Is there any option to get it.

Thank you.

-Anto
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
 answered on 16 Jul 2013
1 answer
194 views
Hello,

i've this grid:

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AutoGenerateHierarchy="True" CellSpacing="0" Culture="it-IT" Height="450px" GridLines="None" PageSize="30" Skin="WebBlue" Width="1024px">
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <MasterTableView>
                        <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 FilterControlAltText="Filter column column" UniqueName="column">
                                <ItemTemplate>
                                    <asp:Image ID="imgsesso" BorderWidth="0px" ImageUrl='<%# IIf(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "sesso")) = "1", "~/image/icone/male16x16.png", "~/image/icone/Girl16x16.png")%>'
                                        AlternateText="sesso" runat="server"></asp:Image>
                                </ItemTemplate>
                                <HeaderStyle Width="30px" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridNumericColumn DataField="idrecord" DataType="System.Int32" DecimalDigits="0" FilterControlAltText="Filter idrecord column" ReadOnly="True" UniqueName="idrecord" Visible="False">
                            </telerik:GridNumericColumn>
                            <telerik:GridNumericColumn DataField="idrecordconnesso" DecimalDigits="2" FilterControlAltText="Filter idrecordconnesso column" ReadOnly="True" UniqueName="idrecordconnesso" Visible="False">
                            </telerik:GridNumericColumn>
                            <telerik:GridNumericColumn DataField="sesso" DecimalDigits="2" FilterControlAltText="Filter sesso column" ReadOnly="True" UniqueName="sesso" Visible="False">
                            </telerik:GridNumericColumn>
                            <telerik:GridBoundColumn DataField="cognome" FilterControlAltText="Filter cognome column" HeaderText="Cognome" ReadOnly="True" UniqueName="cognome">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="nome" FilterControlAltText="Filter nome column" HeaderText="Nome" ReadOnly="True" UniqueName="nome">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="cittadinanza" FilterControlAltText="Filter cittadinanza column" HeaderText="Cittadinanza" ReadOnly="True" UniqueName="cittadinanza">
                                <HeaderStyle Width="100px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="luogonascita" FilterControlAltText="Filter luogonascita column" HeaderText="Luogo di nascita" ReadOnly="True" UniqueName="luogonascita">
                                <HeaderStyle Width="150px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="datanascita" DataType="System.DateTime" FilterControlAltText="Filter datanascita column" HeaderText="Data nascita" ReadOnly="True" UniqueName="datanascita">
                                <HeaderStyle Width="85px" HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="luogoresidenza" FilterControlAltText="Filter luogoresidenza column" HeaderText="Luogo di residenza" ReadOnly="True" UniqueName="luogoresidenza">
                                <HeaderStyle Width="150px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="documento" FilterControlAltText="Filter documento column" HeaderText="Documento" ReadOnly="True" UniqueName="documento">
                                <HeaderStyle Width="150px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ndocumento" FilterControlAltText="Filter ndocumento column" HeaderText="Numero" ReadOnly="True" UniqueName="ndocumento">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="luogodocumento" FilterControlAltText="Filter luogodocumento column" HeaderText="Luogo documento" ReadOnly="True" UniqueName="luogodocumento">
                                <HeaderStyle Width="150px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridNumericColumn DataField="ncomponenti" DataType="System.Int32" DecimalDigits="2" FilterControlAltText="Filter ncomponenti column" HeaderText="ncomponenti" ReadOnly="True" UniqueName="ncomponenti" Visible="False">
                            </telerik:GridNumericColumn>
                        </Columns>
 
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                        </EditFormSettings>
 
                        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                    </MasterTableView>
 
                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
 
                    <FilterMenu EnableImageSprites="False"></FilterMenu>
                </telerik:RadGrid>

I want that when the user hovers the mouse over the column where it is the image you upload a tooltip that shows the details of the selected record, taking data from a sql query or from fields in the grid that might be invisible. how do I load the tooltip?
Princy
Top achievements
Rank 2
 answered on 16 Jul 2013
1 answer
211 views
Hi,

I have one problem in the RadGrid.
When I use Batch Editing with column  telerik:GridTemplateColumn and save changes.
<telerik:GridTemplateColumn HeaderText="Imagem"  ReadOnly="true"   UniqueName="img" SortExpression="cod_produto">
   
<ItemTemplate>
               <img  runat="server" id="img" src='<%#"http://www.xxxx.xxx.br/Produtos.ashx?productId=" + Eval("cod_produto")%>' style="width:15px;height:15px;" />
      </ItemTemplate>                    
    <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
     <ItemStyle HorizontalAlign="Right"></ItemStyle>
 </telerik:GridTemplateColumn>

Generates this error:
any non-editable html tag shows this error
Unhandled exception at line 23500, column 31 in http://localhost:60632/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:pt-BR:c9cbdec3-c810-4e87-846c-fb25a7c08002:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2013.2.611.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:pt-BR:9711a23a-6cf5-4e6c-87f5-29e6585b3026:16e4e7cd:f7645509:24ee1bba:f46195d3:19620875:874f8ea2:cda80b3:ed16cbdc:b7778d6c:c08e9f8a:e085fe68:82923ac3:1bb784d4:92fe8ea0:fa31b949:490a9d4e:bd8f85e4:2003d0b8:1e771326:aa288e2d:7165f74:58366029:ccd65cf8


0x800a138f - Error at runtime from JavaScript: Can not get property 'getElementsByTagName' of null or undefined reference

Code Radgrid.
<div id="divGrid">
            <telerik:RadGrid ID="RadGridFornecedor"  Skin="MetroCustom"  EnableEmbeddedSkins="False" runat="server"
                             AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0" GridLines="None"
                             OnNeedDataSource="RadGridFornecedor_NeedDataSource" OnBatchEditCommand="RadGridFornecedor_BatchEditCommand" OnItemDataBound="RadGridFornecedor_ItemDataBound"  PageSize="20" ViewStateMode="Disabled">
 
                <ExportSettings>
                    <Pdf>
                        <PageHeader>
                            <LeftCell Text=""></LeftCell>
 
                            <MiddleCell Text=""></MiddleCell>
 
                            <RightCell Text=""></RightCell>
                        </PageHeader>
 
                        <PageFooter>
                            <LeftCell Text=""></LeftCell>
 
                            <MiddleCell Text=""></MiddleCell>
 
                            <RightCell Text=""></RightCell>
                        </PageFooter>
                    </Pdf>
                </ExportSettings>
 
                <ClientSettings>
                    <ClientEvents  OnBatchEditGetEditorValue="GetEditorValue"                   
                                   OnBatchEditSetEditorValue="SetEditorValue"    OnBatchEditSetCellValue="SetCellValue" OnCommand="RadGridFornecedor_OnCommand"  />
                </ClientSettings>
                <SortingSettings SortedAscToolTip="" SortedDescToolTip=""
                                 SortToolTip="Clique aqui para ordenar" />
                <MasterTableView NoMasterRecordsText="Não há itens com o filtro selecionado." 
                                 CommandItemDisplay="Top" EditMode="Batch"
                                 CommandItemSettings-CancelChangesText="Cancelar alterações"
                                 CommandItemSettings-SaveChangesText="Salvar alterações"
                                 CommandItemSettings-RefreshText="Atualizar"
                                 CommandItemSettings-ShowAddNewRecordButton="False"
                                 CommandItemSettings-ShowCancelChangesButton="false"
                                 CommandItemSettings-ShowSaveChangesButton ="false"                                                      
                                 ClientDataKeyNames="cod_fornecedor_estoque,cod_item,qtde_ped_gravado,EntregaSoma"
                                 DataKeyNames="cod_fornecedor_estoque,cod_item,qtde_ped_gravado,EntregaSoma">
                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                    <BatchEditingSettings EditType="Cell" />
                    <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 HeaderText="Imagem"  ReadOnly="true"   UniqueName="img" SortExpression="cod_produto"
                                                    >
                            <ItemTemplate>
                               
                                <img  runat="server" id="img" src='<%#"http://www.xxx.xxx.br/Produtos.ashx?productId=" + Eval("cod_produto")%>' style="width:15px;height:15px;" />
 
 
                                 
                            </ItemTemplate>                    
                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </telerik:GridTemplateColumn>
 
 
                        <telerik:GridBoundColumn HeaderText="FAB. CÓDIGO" UniqueName="column" ReadOnly="true" DataField="cod_produto" FilterControlAltText="Filter column column">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="descricao" FilterControlAltText="Filter descricao column" HeaderText="CÓDIGO" SortExpression="descricao" UniqueName="descricao" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="400px" ReadOnly="True">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                            <HeaderStyle Width="300px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="tamanho" FilterControlAltText="Filter tamanho column" HeaderText="TAMANHO" SortExpression="tamanho" UniqueName="tamanho" ItemStyle-HorizontalAlign="Left" ReadOnly="True">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
 
                            <ItemStyle HorizontalAlign="Left" Width="300px"></ItemStyle>
 
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="cor" FilterControlAltText="Filter cor column" HeaderText="COR" SortExpression="cor" UniqueName="cor" ItemStyle-HorizontalAlign="Left" ReadOnly="True">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
 
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="qtde_estoque_atual" FilterControlAltText="Filter qtde_estoque_atual column"
                                                 DataFormatString="{0:N0}" HeaderText="FAB. ESTOQUE" SortExpression="qtde_estoque_atual" UniqueName="qtde_estoque_atual" ReadOnly="True">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn DataField="qtde_ped_gravado" FilterControlAltText="Filter qtde_ped_gravado column" HeaderText="FAB. PEDIDO" DataFormatString="{0:N0}"
                                                 SortExpression="qtde_ped_gravado" UniqueName="qtde_ped_gravado" ReadOnly="True">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                            <HeaderStyle HorizontalAlign="Right" />
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn DataField="qtde_embalagem" FilterControlAltText="Filter qtde_embalagem column" HeaderText="FAB. EMBALAGEM"
                                                 SortExpression="qtde_embalagem" UniqueName="qtde_embalagem" ReadOnly="True" DataFormatString="{0:N0}">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </telerik:GridBoundColumn>
 
                        <telerik:GridTemplateColumn HeaderText="PRODUZINDO"     UniqueName="QtdeProduzir" SortExpression="qtde_ped_forncedor"
                                                    >
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblQtdeProduzir"  Text='<%#Eval("qtde_ped_forncedor","{0:N0}") %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <span>
                                    <telerik:RadNumericTextBox Width="100px" runat="server" ID="txtQtdeProduzir"
                                                               NumberFormat-DecimalDigits="0" NumberFormat-DecimalSeparator=","  ClientEvents-OnKeyPress="OnkeyPress_tbQtdeEntregue"
                                                               NumberFormat-GroupSeparator="." NumberFormat-GroupSizes="3"
                                                               MinValue="0" MaxLength="8" DataType="System.Decimal">
                                    </telerik:RadNumericTextBox>
                                </span>
                            </EditItemTemplate>
                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </telerik:GridTemplateColumn>
 
                        <telerik:GridTemplateColumn HeaderText="ENTREGA"    UniqueName="QtdeEntregue"
                                                    >
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblQtdeEntregue" Text='<%#Eval("EntregaSoma","{0:N0}") %>' ></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <span>
                                    <telerik:RadNumericTextBox Width="100px" runat="server" ID="tbQtdeEntregue"
                                                               NumberFormat-DecimalDigits="0" NumberFormat-DecimalSeparator=","  ClientEvents-OnKeyPress="OnkeyPress_tbQtdeEntregue"
                                                               NumberFormat-GroupSeparator="." NumberFormat-GroupSizes="3"
                                                               MinValue="0" MaxLength="8" DataType="System.Decimal">
                                    </telerik:RadNumericTextBox>
                                </span>
                            </EditItemTemplate>
                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </telerik:GridTemplateColumn>
 
                        <telerik:GridBoundColumn DataField="EntregaSomaFabrica"
                                                 FilterControlAltText="Filter EntregaSomaFabrica column" ReadOnly="true"
                                                 HeaderText="FAB. ACEITE" SortExpression="EntregaSomaFabrica"
                                                 UniqueName="EntregaSomaFabrica"  DataFormatString="{0:N0}">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
 
                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn DataField="qtde_conferida" FilterControlAltText="Filter qtde_embalagem column" HeaderText="FAB. CONFERÊNCIA"
                                                 SortExpression="qtde_conferida" UniqueName="qtde_conferida" ReadOnly="True" DataFormatString="{0:N0}">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </telerik:GridBoundColumn>
 
                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="DeleteItem" ImageUrl="Comum/css/Skin/Metro/Grid/Delete.gif"
                                                  ConfirmDialogHeight="100px" ConfirmDialogType="RadWindow" ConfirmDialogWidth="380px"
                                                  ConfirmText="Deseja realmente cancelar a entrega deste item?" ConfirmTitle="Delete Item entrega"
                                                  DataTextField="referencia" DataTextFormatString="Cancelar a entrega do item {0} ?"
                                                  HeaderText="CANCELAR ENTREGA" UniqueName="Delete">
                            <FooterStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                            <HeaderStyle Width="100px" HorizontalAlign="center" />
                            <ItemStyle Width="40px" HorizontalAlign="center" VerticalAlign="Middle" />
                        </telerik:GridButtonColumn>
 
                        <telerik:GridButtonColumn DataTextField="referencia" DataTextFormatString="Visualizar o acessório do item {0}"
                                                  ButtonType="ImageButton" CommandName="Acessorio"  ImageUrl="Comum/css/Skin/Metro/Grid/Info.jpg"
                                                  FilterControlAltText="Filter column column" HeaderText="ACESSÓRIO" UniqueName="Acessorio" HeaderStyle-HorizontalAlign="Center">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        </telerik:GridButtonColumn>
 
                    </Columns>
 
                    <EditFormSettings>
                        <EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" CancelImageUrl="Cancel.gif" FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                    </EditFormSettings>
 
                    <BatchEditingSettings EditType="Cell"></BatchEditingSettings>
 
                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                </MasterTableView>
 
                <PagerStyle PageSizeControlType="RadComboBox" NextPageToolTip="Próxima Página" NextPagesToolTip="Próximas Páginas" LastPageToolTip="Ultima  Página" GoToPageButtonToolTip="Ir para " PageSizeLabelText="Qtde Itens:" PrevPagesToolTip="Páginas Anteriores" PrevPageToolTip="Página Anterior" PagerTextFormat="Mudar página: {4}  Página <strong>{0}</strong> de <strong>{1}</strong>, itens <strong>{2}</strong> para <strong>{3}</strong> de <strong>{5}</strong>." FirstPageToolTip="Primeira Página"></PagerStyle>
 
                <FilterMenu EnableImageSprites="False" EnableEmbeddedSkins="False"></FilterMenu>
 
                <HeaderContextMenu EnableEmbeddedSkins="False"></HeaderContextMenu>
 
            </telerik:RadGrid>
 
        </div>
Angel Petrov
Telerik team
 answered on 16 Jul 2013
3 answers
125 views
I am trying to create an onclick event in the text of the header.  I need data that is in the actual rows that are expanded out of a closed group so i can send it to the javascript function.  I have not been able to find any way to access this data.

Does anyone have insight as to how to do this?

Ben
Eyup
Telerik team
 answered on 16 Jul 2013
1 answer
181 views
Hi,
First of all, I can get the event firing using the example provided here : http://www.telerik.com/help/aspnet-ajax/tilelist-server-side-events-ontileclick.html
But I'm unable to make it fire on my scenario, can you help?

The markup file:

<telerik:RadTileList runat="server" ID="RadTileList2" Width="1030px" TileRows="2"<br>SelectionMode="Single" EnableDragAndDrop="false" ScrollingMode="None" AutoPostBack="true" OnTileClick="OnTileClick"><br><groups><br><telerik:TileGroup><br><telerik:RadImageAndTextTile Name="First" NavigateUrl="http://www.telerik.com/" Title-Text="Telerik" Shape="Wide"><br><Title Text="Telerik"></Title><br></telerik:RadImageAndTextTile><br><telerik:RadImageAndTextTile Name="Second" NavigateUrl="http://www.google.com/" Title-Text="Google" Shape="Wide"><br><Title Text="Google"></Title><br></telerik:RadImageAndTextTile><br><telerik:RadImageAndTextTile Name="Third" NavigateUrl="http://www.bing.com" Text="Bing"><br></telerik:RadImageAndTextTile><br><telerik:RadImageAndTextTile Name="Fourth" NavigateUrl="http://www.wikipedia.org/" Text="Wikipedia"><br></telerik:RadImageAndTextTile><br></telerik:TileGroup><br></groups><br></telerik:RadTileList><br></div><br><div><br><telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" ImageUrl="~/Images/ProcessPhaseBar1.png"<br>ResizeMode="Fit" Width="100%" /><br></div><br></div>


The codebehind:

<font face="'Times New Roman', serif" style="font-size: 14px; line-height: 24px;">        private void BindTileList()</font><font face="'Times New Roman', serif" style="font-size: 14px; line-height: 24px;"><br>        {<br>            List<RadImageAndTextTile> listRadImageTiles = new List<RadImageAndTextTile>(Utils.Tiles.CreateSubjectRootTiles());<br>            foreach (RadImageAndTextTile radImageTile in listRadImageTiles)<br>                RadTileList2.Groups[0].Tiles.Add(radImageTile);<br><br>            RadTileList2.Groups.Add(tileGroup);<br></font><font face="'Times New Roman', serif" style="font-size: 14px; line-height: 24px;">        }</font><font face="'Times New Roman', serif" style="font-size: 14px; line-height: 24px;"><br><br></font><font face="'Times New Roman', serif" style="font-size: 14px; line-height: 24px;">        protected void OnTileClick(object sender, TileListEventArgs e)</font><font face="'Times New Roman', serif" style="font-size: 14px; line-height: 24px;"><br>        {<br>            clickResult.InnerHtml = "Clicked tile name and URL: " + e.Tile.Name + "<br />" + e.Tile.NavigateUrl;<br>            //note: e.Tile is of type RadBaseTile<br>        }</font>


We're able to get the event firing for the tiles created in the markup, but for the tiles created in the codebehind the event is not fired...

What could be wrong?

Thanks.

Marin Bratanov
Telerik team
 answered on 16 Jul 2013
2 answers
155 views
I am using RAD GRID in as ASP.net AJAX page, with RADSCRIPTMANAGER. the page works well in IE 7, but gives Invalid argument JS error every time the grid is bound to dataset.

http://localhost:56222/mypro/Telerik.Web.UI.WebResource.axd?
_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&
compress=1&
_TSM_CombinedScripts_=%3b%3b
System.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3de828f0-5e0d-4c7d-a36b-56a9773c0def%3aea597d4b%3ab25378d2%3b
Telerik.Web.UI%2c+Version%3d2011.2.712.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a326e32e2-cd52-462c-ba2c-db5128e4371b%3a16e4e7cd%3af7645509%3a24ee1bba%3a874f8ea2%3ac172ae1e%3af46195d3%3a9cdfc6e7%3a7165f74%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289%3a58366029%3b
AjaxControlToolkit%2c+Version%3d3.0.30512.20315%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a2a404968-beb9-41c5-98fb-26019e941d81%3ab14bb7d5%3a13f47f54%3a3c55b13e%3adc2d6e36%3ade51bc8f%3a1d056c78%3aa3e10fa2%3a701e375f%3aa4313c7a

can anybody help me out here?
Maria Ilieva
Telerik team
 answered on 16 Jul 2013
1 answer
110 views
Hello,

I would like to know if it is possible to drag a row from a RadGrid onto a RadCalendar date, determine which date the row was dropped on, and then update the RadGrid data item with that date.  I have not been able to find a demo or example of this, and my preliminary efforts have not worked at all.  Using the client-side get_destinationHtmlElement method does not return the element/date the row was dropped on.

I can accomplish this with the RadScheduler, but not the RadCalendar.    Any help would be appreciated.
Angel Petrov
Telerik team
 answered on 16 Jul 2013
4 answers
457 views
Hi All

Have a RadGrid with AutoGenerateColumn ="true" and EditMode="InPlace".

have a datatable with some flag. If the flag is 1 need to hide the Textbox in EditMode. 

Have to compare with the datatable and hide the Textbox.

Need to know whether there is any option to hide the Textbox.

-Anto
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
 answered on 16 Jul 2013
1 answer
125 views
Say I have 3 items in a drop down with widths of 100px, 200px and 300px.

I set the DropDownAutoWidth to enabled.  I do not set a width property so it is defaulting to it looks like 158px.

I expand the drop down and the width of the drop down gets set to 300px, so all items are shown on one line.  I select the 300px item, the selection box is still at 158 px, so the last 162 pixels are trimmed and you can't see them.

Would it be possible to instead.

I select an item that is 100px, after selection the box trims to 100 pixels.  I select another item 300px, the selection box now turns to 300 pixels, and so fourth.

A2H
Top achievements
Rank 1
 answered on 16 Jul 2013
3 answers
113 views
Hi ,
I have a problem.
I want to hide radribbon group bar in code behind according to user roles
I applied this technique : 
RadribbonGroupbarControl.visible = false;

It works but hide all Radribbon Groupbar Controls , but after clicking between two tabs for a while it appears again.
Thanks In Advance. 

Princy
Top achievements
Rank 2
 answered on 16 Jul 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?