Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
88 views
Hi,
When I am trying to bind the empty array into Grid on Client side, the Grid's Bottom CommandItem row is made invisible automatically .
How can I solve this problem ? Pls fix the bug ? 


var

 

codeMasterSource = new Array();

 

function

 

DataBind() {

 

grd = $find(

'Grid').get_masterTableView();

 

grd.set_dataSource(codeMasterSource);

grd.dataBind();

}

Kavi
Top achievements
Rank 1
 answered on 09 Jun 2010
6 answers
188 views
Hi..

I'm just wondering.. How can I implement URL Routing with Telerik using GridHyperLinkColumn?

We're kinda new to Telerik so we can't really go around it ourselves. =)

Thank you, in advance.
Gabrielle
Top achievements
Rank 1
 answered on 09 Jun 2010
9 answers
498 views
I have a RadGrid that is contained within a RadTabStrip/RadMultiPage/RadPageView.  This grid consists of a MasterTableView and two detail tables.  The data source for the grid is an ObjectDataSource and is being set in the OnNeedDataSource method.  The user enters a date range and clicks a button to populate the grid.  The button click event fires the grid.Rebind method.  The Rebind fires, calling the OnNeedDataSourceMethod.  After this method fires the select method of the ObjectDataSource gets called three times.

Is there a reason it's hitting the database three times?  Is there a way to get around this?  The dataset returns fairly quickly, but pulling it back three times is slowing down  the load of the grid.


Jessica
Top achievements
Rank 1
 answered on 08 Jun 2010
1 answer
60 views
Hi,

I am getting an error when i do an export to pdf from the radgrid
"adobe reader could not open radgridemport[1].pdf because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and was'nt correctly decoded)."
Please help.

Thanks.
Viji

Daniel
Telerik team
 answered on 08 Jun 2010
2 answers
162 views

Hello Telerik Team,

I have a requirement where i need to bind the scheduler to a sql database table and display some columns
from the table on top of the cell.I mean by default scheduler just shows up the subject on the cell but i wanted to display some additional columns from database example priority column, Description column,etc on top of each cell instead of the edit template.At the same time i need to colour code the cell based on the status column values.

I have connected the scheduler to sql datasource already and able to fetch the information.

Any pointers in this direction are greatly appreciated.

Thank you
Smith

smith spd
Top achievements
Rank 1
 answered on 08 Jun 2010
2 answers
145 views
Hi, I've just upgraded to VS2010 and am using the Q1/2010 releaase of ASP.Net AJAX controls. I can't seem to find any help files for the Telerik controls in the new VS2010 help system. Do they have to be manually installed?
Ian
Top achievements
Rank 1
 answered on 08 Jun 2010
1 answer
70 views
HI FRIENDS
   i'm using RadNumericTextBox in my asp.net page but i assign value in code behind in RadNumericTextBoxid="" thats not working in IE8
but its working in IE7 and other browser    anybody knows tell me
 
Sebastian
Telerik team
 answered on 08 Jun 2010
1 answer
375 views
Hi I have problem in exporting to excel from the grid. It throws exception if I set
<Excel Format = "excelML">
for <Excel Format="html"> its working fine.
Here is my grid settings.

 

 

 

 

<telerik:RadGrid ID="grdCheckData" runat="server" AllowPaging="True"  AllowSorting ="true"  GridLines="both"  OnPageIndexChanged="grdCheckData_PageIndexChanged" OnPageSizeChanged="grdCheckData_PageSizeChanged"    
    OnSortCommand="grdCheckData_SortCommand"  ShowGroupPanel="true"  ><%--OnExcelExportCellFormatting="grdCheckData_ExcelExportCellFormatting" OnExcelMLExportRowCreated="grdCheckData_ExcelMLExportRowCreated" OnExcelMLExportStylesCreated="grdCheckData_ExcelMLExportStylesCreated" --%> 
     
         <ClientSettings  AllowColumnsReorder ="true"  AllowDragToGroup="true"  ReorderColumnsOnClient="true"  Scrolling-AllowScroll="true"   > 
             <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" 
                            AllowColumnResize="True"></Resizing> 
                  
            </ClientSettings> 
            <GroupingSettings ShowUnGroupButton="true" UnGroupTooltip ="Drag the field to group by." /> 
            <SortingSettings SortedBackColor="Azure" EnableSkinSortStyles="false" /> 
            <ExportSettings FileName ="CheckInfo" OpenInNewWindow="true"   IgnorePaging ="true" ExportOnlyData="true"  > 
<Excel Format="excelML"   /> 
<Pdf AllowPrinting="true" /> 
</ExportSettings> 
        <MasterTableView AutoGenerateColumns ="false"  > 
         
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn > 
            <Columns  > 
            <telerik:GridBoundColumn DataField ="BANK"  UniqueName ="BANK" SortExpression="BANK" ReadOnly ="true" HeaderText ="Bank" > <ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="BANKNO" UniqueName ="BANKNO" SortExpression ="BANKNO" ReadOnly ="true" HeaderText ="Bank ID" ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="PMSID" UniqueName ="PMSID" SortExpression ="PMSID" ReadOnly ="true" HeaderText ="PMS ID" ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="SSN" UniqueName ="SSN" ReadOnly ="true" SortExpression ="SSN" HeaderText ="SSN" ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="FNAME" UniqueName ="FNAME" ReadOnly ="true" SortExpression ="FNAME" HeaderText ="First Name" ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="LNAME" UniqueName ="LNAME" ReadOnly ="true" SortExpression ="LNAME" HeaderText ="Last Name" ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="LET" UniqueName ="LET" ReadOnly ="true" HeaderText ="Let" SortExpression ="LET" ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="CHECKNUM" UniqueName ="CHECKNUM" ReadOnly ="true" SortExpression ="CHECKNUM" HeaderText ="Check No." ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="CHECKDT" UniqueName ="CHECKDT" ReadOnly ="true" SortExpression ="CHECKDT" HeaderText ="Check Date" DataType = "System.DateTime" DataFormatString="{0:MM/dd/yyyy}"  HtmlEncode="false" ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="NETPAY" UniqueName ="NETPAY" DataFormatString="{0:$###,###.##}" ReadOnly ="true" SortExpression ="NETPAY" HeaderText ="Net Amt." ><ItemStyle Width ="100" /></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField ="DISPDT" UniqueName ="DISPDT" ReadOnly ="true" SortExpression ="DISPDT"  HeaderText ="Disp. Date" DataType = "System.DateTime" DataFormatString="{0:MM/dd/yyyy}"  HtmlEncode="false" > 
            <ItemStyle Width ="100" /> 
            </telerik:GridBoundColumn> 
              
            </Columns> 
        </MasterTableView> 
      
    </telerik:RadGrid> 

Here is my code for export.

protected void btnExportExl_Click(object sender, EventArgs e)  
        {  
            try  
            {  
                if ((!IsPostBack) || (!IsValid))  
                    return;  
 
                RadGrid grdCheckData = (RadGrid)dataPanel.FindItemByValue("CheckData").FindControl("grdCheckData");  
                  
                grdCheckData.MasterTableView.ExportToExcel();  
            }  
            catch (Exception ex)  
            {  
                throw;  
            }  
        }  
 
        protected void grdCheckData_ExcelExportCellFormatting(object source, ExcelExportCellFormattingEventArgs e)  
        {  
              
        }  
 
        protected void grdCheckData_ExcelMLExportStylesCreated(object source, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLStyleCreatedArgs e)  
        {  
            foreach (Telerik.Web.UI.GridExcelBuilder.StyleElement style in e.Styles)  
            {  
                if (style.Id == "headerStyle")  
                {  
                    style.FontStyle.Bold = true;  
                    style.FontStyle.Color = System.Drawing.Color.Brown;  
                    style.InteriorStyle.Color = System.Drawing.Color.Wheat;  
                    style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid;  
                }  
                else if (style.Id == "itemStyle")  
                {  
                    style.NumberFormat.FormatType = Telerik.Web.UI.GridExcelBuilder.NumberFormatType.Currency;  
                    style.AlignmentElement.HorizontalAlignment = Telerik.Web.UI.GridExcelBuilder.HorizontalAlignmentType.Left;  
                    style.InteriorStyle.Color = System.Drawing.Color.WhiteSmoke;  
                    style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid;  
                }  
                else if (style.Id == "alternatingItemStyle")  
                {  
                    style.NumberFormat.FormatType = Telerik.Web.UI.GridExcelBuilder.NumberFormatType.Currency;  
                    style.AlignmentElement.HorizontalAlignment = Telerik.Web.UI.GridExcelBuilder.HorizontalAlignmentType.Left;  
                    style.InteriorStyle.Color = System.Drawing.Color.LightGray;  
                    style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid;  
                }  
 
 
            }  
        }  
 
        protected void grdCheckData_ExcelMLExportRowCreated(object source, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e)  
        {  
            if (e.RowType == Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowType.HeaderRow)  
            {  
                Telerik.Web.UI.GridExcelBuilder.RowElement row = new Telerik.Web.UI.GridExcelBuilder.RowElement();  
                Telerik.Web.UI.GridExcelBuilder.CellElement cell = new Telerik.Web.UI.GridExcelBuilder.CellElement();  
                cell.Data.DataItem = "NYC Department Of Education";  
                row.Cells.Add(cell);  
                e.Worksheet.Table.Rows.Insert(0, row);  
            }    
 
        }  
 
        

And this is the Error I m getting after execution of btnExport_Click event.
Object reference not set to an instance of an object.   
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
 
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.  
 
Source Error:   
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    
 
Stack Trace:   
 
 
[NullReferenceException: Object reference not set to an instance of an object.]  
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +864  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8676409  
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32  
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40  
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderPage(HtmlTextWriter nullWriter, Control page) +93  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266  
 
   
 
 
--------------------------------------------------------------------------------  
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082  

Daniel
Telerik team
 answered on 08 Jun 2010
4 answers
143 views
I have a page where there are multiple editors on the screen, on the initial load only one editor is visible to the user and using javascript the divs style are changed from display: none to display: block in IE 7 when the editor is initially hidden and then told to display the toolbar is missing.  Works in FF/Chrome/IE 8

Is there a way to have the toolbar show up for IE 7 in this instance:

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <script type="text/javascript"> 
        function ChangeDisplay(elm) { 
            var div = document.getElementById("Wrapper2"); 
            if (elm.value == "0") { 
                div.style.cssText = "display: none;"; 
            } 
            else { 
                div.style.cssText = "display: block;"; 
            } 
        } 
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <asp:ScriptManager ID="SM" runat="server"></asp:ScriptManager> 
            <asp:ListBox ID="LB1" runat="server" onchange="ChangeDisplay(this);" Rows="1" SelectionMode="Single"> 
            <asp:ListItem Text="Hide" Value="0"></asp:ListItem> 
            <asp:ListItem Text="Show" Value="1"></asp:ListItem> 
        </asp:ListBox> 
        <div id="Wrapper"> 
        <div style="float: left; padding-top: 2px;"> 
            <telerik:RadEditor ID="RadEditor1" runat="server"  Skin="Default" Height="200" Width="610"   ContentFilters="RemoveScripts" EnableResize="false" EditModes="Design"> 
            </telerik:RadEditor> 
        </div> 
        </div> 
        <div id="Wrapper2" style="display: none;"> 
        <div style="float: left; padding-top: 2px;"> 
            <telerik:RadEditor ID="RadEditor2" runat="server"  Skin="Default" Height="200" Width="610" ContentFilters="RemoveScripts" EnableResize="false" EditModes="Design"> 
            </telerik:RadEditor> 
        </div> 
        </div> 
    </form> 
</body> 
</html> 

mohammed
Top achievements
Rank 1
 answered on 08 Jun 2010
1 answer
132 views

Hello ,

I'm using radticker in my form in that I need to take data from xml file but I'm getting error, FOA I'm using following XML code

<test>
  <test Heading="Heading One" Body="This is Body"/>
  <test Heading="Heasing two" Body="This is body two."/>
</test>

below is what I'm using in aspx code

    <telerik:RadRotator ID="RadRotator1" runat="server" ScrollDirection="Left" ScrollDuration="7000" DataSourceID="XmlDataSource1" RenderingCompatibility="3.5" Skin="Windows7">
    <ItemTemplate>
        <telerik:RadTicker ID="RadTicker1" runat="server" AutoStart="true" LineDuration="4000" Loop="true">
        <Items>
            <telerik:RadTickerItem Text='<%# XPath("Heading") %>'>
            </telerik:RadTickerItem>
            <telerik:RadTickerItem Text='<%# XPath("Body") %>'>
            </telerik:RadTickerItem>
        </Items>
    </telerik:RadTicker>
    </ItemTemplate>
    </telerik:RadRotator>
    <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XMLFile.xml">
    </asp:XmlDataSource>

After running this I don't get any output in browser, but if I put simple text instead of xpath.... it appears in browser tickering & rotating but not if I choose from xml file

In above code what I need to do is that firstly heading1 and body1 should ticker in first rotation and heading2 and body2 should ticker in second rotation

If anyone could provide solution for this that would be great for me I tried for this a lot but with no success till now

Plz reply

Thanks

Fiko
Telerik team
 answered on 08 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?