Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
164 views
Hello,,
I have aproblem with the radtooltip control (demo: http://demos.telerik.com/aspnet-ajax/tooltip/examples/onclientresponseend/defaultcs.aspx).
I always got the webpage error : Unable to get value of the property 'style': object is null or undefined.
If I remove the following javascript lines then the error doesn't display:
$get("startRequest").style.display = "none";
        $get("endRequest").style.display = "";

Note: I'm using the version 2009.3.1314.35

Please, I need your help,
It is appreciated to send me the solution of the problem,

Regards,
Bader
Svetlina Anati
Telerik team
 answered on 02 Aug 2011
4 answers
116 views
Hi,

I´m using RadEditor control and I need to specify that when an user introduces some text in the content area, for default align the text to the left side for example.

Thanks for the help.
Rumen
Telerik team
 answered on 02 Aug 2011
3 answers
108 views
My grid is exporting but the format is not acceptable.  I really want the export to put each column in the grid is 1 separate column in the export and I'm having a problem.  Here is the sample of my grid.

<

 

telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowSorting="True" AutoGenerateColumns="False"

 

 

GridLines="None" Skin="Web20" Style="margin-right: 0px" Width="673px" Height="260px"

 

 

OnNeedDataSource="grdCurrentandPrior_NeedDataSource" OnItemDataBound="grdCurrentandPrior_ItemDataBound">

 

 

<ExportSettings FileName="OpenItemsCurrentInventory" IgnorePaging="True" OpenInNewWindow="True">

 

 

<Excel Format="HTML" />

 

 

</ExportSettings>

 

 

<MasterTableView CommandItemDisplay="Bottom" AllowNaturalSort="false">

 

 

<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false"/>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="Assignee" UniqueName="Assignee" SortExpression="Assignee">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Jurisdictions" UniqueName="JurisdictionCount" SortExpression="JurisdictionCount">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />

 

 

<ItemTemplate >

 

 

<asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn">

 

 

<HeaderTemplate>

 

 

<table id="Table1" cellspacing="1" cellpadding="1" width="200px" border="1">

 

 

<tr>

 

 

<td colspan="2" align="center">

 

 

<b>Open Items by Age</b>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="center" width="50%">

 

 

<b>Prior</b>

 

 

</td>

 

 

<td align="center" width="50%">

 

 

<b>Current</b>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

<table id="Table2" cellspacing="1" cellpadding="1" width="260px" border="1">

 

 

<tr>

 

 

<td width="50%">

 

 

<asp:Label ID="lblPriorCount" runat="server" Text='<%# Eval("OpenItemsCountPrior") %>'></asp:Label>

 

 

</td>

 

 

<td width="50%">

 

 

<asp:Label ID="lblCurrentCount" runat="server" Text='<%# Eval("OpenItemsCountELD") %>'></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Items Left to Pay" UniqueName="TotalRemainingItems" SortExpression="TotalRemainingItems">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("TotalRemainingItems") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="% Complete" UniqueName="clmPctComplete">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("TotalRemainingItems") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="AssigneeEmployeeKey" ReadOnly="True" UniqueName="AssigneeEmployeeKey"

 

 

Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<HeaderStyle BorderStyle="Solid" />

 

 

 

<ClientSettings>

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

Princy
Top achievements
Rank 2
 answered on 02 Aug 2011
3 answers
1.0K+ views
Hi,

I am getting the error "Object reference not set to an instance of an object" when I click on Export to Excel button:

Here are the details:

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.GridTableView.PrepareExport() +72
   Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExportInternal(GridTableView tableView, Boolean ignorePaging, Boolean dataOnly) +373
   Telerik.Web.UI.GridTableView.ClearTableViewControls(Control control, TableViewExporter exporter, GridTableView ownerTable) +597
   Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExportInternal(GridTableView tableView, Boolean ignorePaging, Boolean dataOnly) +670
   Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExport() +59
   Telerik.Web.UI.Grid.Export.TableViewExporter.page_PreRender(Object sender, EventArgs e) +34
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +8686422
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3618



What might be the possible reason for this?

-Rajesh
Princy
Top achievements
Rank 2
 answered on 02 Aug 2011
2 answers
188 views
Please help me to set Text in InsertCaption and  and CaptionFormatString of EditFormSettings in Code Behind. Thanks
Henry John
Top achievements
Rank 1
 answered on 02 Aug 2011
2 answers
170 views

I am trying to use the Selected index of one RadComboBox help build the query to populate another RadComboBox, they are both in the <EditItemTemplate>.
I get an Object reference not set to instance of an object when I run this code just adding a RadComboBoxItem without even building the query.

Protected Sub ItemType_SelectedIndexChanged(ByVal o As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs)
Dim DDL As RadComboBox = TryCast(RadGrid1.FindControl("FlatFileType").Controls(0), RadComboBox)
Dim RadComboBoxItem1 As New RadComboBoxItem("First Item")
DDL.Items.Add(RadComboBoxItem1)
End Sub

I am not sure how to correctly access the second radcombobox to be able to populate it.
Any help is greatly appreciated.

Bill
Top achievements
Rank 1
 answered on 02 Aug 2011
0 answers
92 views
rad ratin display bad
ali
Top achievements
Rank 1
 asked on 02 Aug 2011
2 answers
218 views
Hi all,
 
I am using the GridBoundColumn to display my DateTime data.
And I use the  DataFormatString="{0:MM/dd/yyyy}"  to make time invisible.
However, when export to Excel, it appears (see Image)
I just want to display day only.
<telerik:GridBoundColumn HeaderText="ETA Date" UniqueName="ETA_Date" DataField="ETA_Date" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true" SortExpression="ETA_Date"  >
     <HeaderStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center"></HeaderStyle>
      <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
</telerik:GridBoundColumn>

Thanks.

Andy,
Andy
Top achievements
Rank 1
 answered on 01 Aug 2011
1 answer
54 views
If i comment out the selectvalue portion it works and i am able to ADD NEW Item.
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
            Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
 
            Dim Manufacturers As RadComboBox = CType(editedItem.FindControl("ManufacturerEdit"), RadComboBox)
            ProductsAccess.BindManufacturers(Manufacturers)
            'Dim Manufacturer As Integer = DataBinder.Eval(editedItem.DataItem, "Manufacturer").ToString
            'Manufacturers.SelectedValue = Manufacturer
 
            Dim Categories As RadComboBox = CType(editedItem.FindControl("CategoryEdit"), RadComboBox)
            ProductsAccess.BindCategories(Categories)
            'Dim Category As Integer = DataBinder.Eval(editedItem.DataItem, "Category").ToString
            'Categories.SelectedValue = Category

If i un-comment those lines i am only able to EDIT the items but when i click add new button it does nothing.
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
            Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
 
            Dim Manufacturers As RadComboBox = CType(editedItem.FindControl("ManufacturerEdit"), RadComboBox)
            ProductsAccess.BindManufacturers(Manufacturers)
            Dim Manufacturer As Integer = DataBinder.Eval(editedItem.DataItem, "Manufacturer").ToString
            Manufacturers.SelectedValue = Manufacturer
 
            Dim Categories As RadComboBox = CType(editedItem.FindControl("CategoryEdit"), RadComboBox)
            ProductsAccess.BindCategories(Categories)
            Dim Category As Integer = DataBinder.Eval(editedItem.DataItem, "Category").ToString
            Categories.SelectedValue = Category

ProductsAccess.BindManufacturers(Manufacturers) is a pretty simple Sub that bind combobox to datatable. I even tried with iterating DataRows in the DataTable.Rows collection and populating the combo one by one. The problem persisted :(
THanks
Jugoslav
Top achievements
Rank 1
 answered on 01 Aug 2011
1 answer
70 views
I have a grid inside a JQuery accordian control.  The grid is using the windows7 skin.
Alternate rows in the grid have white borders around vertcal edgaes of cells and bottom edges of cells.
Im assuming something is 'interfering' with the css of the grid.  How can I force the grid to not show these borders ?

Ive attached a screenshot to show whats happening
Pavlina
Telerik team
 answered on 01 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?