Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
44 views
Hi,

I'm getting errors when trying to use the Template Manager to add a template to the editor. We are using the custom content provider for Azure from Codeplex. The images are inserted ok, just when we try to insert the .html template we are getting a couple of errors (attached). Any advice would be greatly appreciated!

Kind regards,
Randy Sullivan
Slav
Telerik team
 answered on 16 Jul 2013
3 answers
61 views
Hi Guys - I've had this nagging issue for a while now, and just encountered another thread here with a similar issue. When you work on a PC with a resolution such that you start seeing a horizontal scrollbar inside your dock, you will start facing this problem. The dock starts expanding downwards and on mouse out restores back to original state. I'm using rad controls version 2011.3.1115.35. My dock code looks something like this

<telerik:RadDockLayout runat="server" ID="[DUMMYID-1]">
    <telerik:RadDockZone runat="server" ID="[DUMMYID-2]" Orientation="vertical" Skin="Vista" Width="99.7%">
        <telerik:RadDock runat="server" ID="[DUMMYID-3]Title="More"
            Style="min-height0pxmargin0px autovisibilityhidden;" Collapsed="true"
            DefaultCommands="ExpandCollapse" Skin="Vista" EnableDrag="false"
            DockHandle="None" Width="99.5%" BorderStyle="None">
            <ContentTemplate>
             ...... [some code here]
            </ContentTemplate>
    </telerik:RadDock>
</telerik:RadDockZone>

Tips to repro:
1. Make sure you are on IE9, NOT in compatibility mode.
2. Make sure you have a horizontal scrollbar on inside your dock.
3. Mouse over your dock, and see the dock expand vertically.
Slav
Telerik team
 answered on 16 Jul 2013
3 answers
298 views
Hi,

I am trying to upload an image using the radupload control and save it on the file system. 

I need to convert the file stream to a byte array and then save it. 

While debugging, i found that 
coll[0].InputStream.Read(byteFile, 0, byteFile.Length + 1); 

the byteFile has 0 in all the position (which means its a corrupted file).


Can you please provide the code using which i can convert this input stream into byte array and save it on the file system?

foreach (RepeaterItem item in this.uploadRepeater.Items)
                            {
                                int imageId;
                                UploadedFileCollection coll = ((RadUpload)item.FindControl("radUpload")).UploadedFiles;
                                RadUpload up = ((RadUpload)item.FindControl("radUpload"));
                                if (null != coll && 0 != coll.Count)
                                {
                                    fileManager = new FileManager(coll);
                                    isImageValid = isImageValid & fileManager.ValidateFile();
 
                                    if (true == isImageValid)
                                    {
                                        byte[] byteFile = new byte[coll[0].InputStream.Length];
                                        coll[0].InputStream.Read(byteFile, 0, byteFile.Length + 1); // reading into //a byte arrary. Here while debugging, i see that all location in the array have value 0.                                       
                                    Guid guid =  this.SaveFileToDisk(byteFile , coll[0].GetExtension());
                                      
                                         
                                    }
                                    else
                                    {
                    // show error message
                                    }
                                }
                                 
                            }
 
 
 
 
 
 
        public static Guid SaveFileToDisk(byte[] fileBytes, string fileExtension)
        {
 
            Guid imageGuid = Guid.Empty;
            FileStream stream = null;
 
 
 
            imageGuid = Guid.NewGuid();
            string fileLocation = ConfigurationManager.Configurations().ImageSaveLocation + imageGuid + "." + fileExtension;
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                // Open file for reading .
                using (stream = new FileStream(fileLocation, FileMode.Create, FileAccess.Write))
                {
                    // Writes a block of bytes to this stream using data from a byte array.
                    stream.Write(fileBytes, 0, fileBytes.Length);
                     
                }
            });
            return imageGuid;
        }
Kalpna
Top achievements
Rank 1
 answered on 16 Jul 2013
1 answer
131 views
I'm using the 2013.2.611.35 version of Telerik.Web.UI, and I found that when using the RadMenu and RadDropDownList is same page. the RadMenu will expand at wrong direction.
Kate
Telerik team
 answered on 16 Jul 2013
8 answers
781 views
I have a modal popup panel that includes a Rad DDL.  The control appears correctly on the form but when the control drops down, all of the items appear behind the panel.  The panel is set to a Z-Indiex of 10001 (MS standard) but even with a number higher than that, it still appears incorrectly on drop down.  Is there another setting to force it to appear in front of the panel?
Jon
Top achievements
Rank 1
 answered on 16 Jul 2013
1 answer
104 views
I have a RadGrid with auto generated columns.i'm getting the below error when i try to bind a datetime column to the grid and it causes filtering options not to show up but grid is working fine when i bind only string columns.error occurs when i try to bind date column to the grid.

Uncaught TypeError: Cannot set property 'control' of undefined Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
H.b.UI.Control Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
H.z.initializeBase Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
Telerik.Web.UI.RadWebControl Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:740
H.z.initializeBase Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
Telerik.Web.UI.RadInputControl Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…6ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:16994
H.z.initializeBase Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
Telerik.Web.UI.RadDateInput Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…6ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:18320
H.w.create Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
(anonymous function) Search.aspx:1561
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
H.w.raiseEvent Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
H.w._raiseInit Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
H.w._doInitialize Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
p Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
H.b._2Pass Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
F Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
d Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
c Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress…82b16ab%3ad754780e%3a1e088fb%3a52c703eb%3af48dface%3a28a7831e%3a6e2c54c1:3
Deyan Enchev
Telerik team
 answered on 16 Jul 2013
12 answers
685 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
176 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
182 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
108 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?