Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
83 views
Hi, 

i am working on telerik grid.

 <telerik:RadGrid runat="server" ID="telerikGrid" AutoGenerateColumns="false"                                                        
                                                        AllowPaging="true" Skin="Outlook" PageSize="20" AllowSorting="True" ClientSettings-DataBinding-EnableCaching="true" Visible="false" OnItemCommand="gvTitlesInOperations_TitleDetails">
                                                        <MasterTableView DataKeyNames="ID" InsertItemPageIndexAction="ShowItemOnCurrentPage"
                                                            EnableHeaderContextMenu="True" CommandItemDisplay="Top">
                                                            <CommandItemSettings AddNewRecordText="" ShowAddNewRecordButton="False" ShowExportToExcelButton="True" />
                                                                <Columns>
                                                                    <telerik:GridBoundColumn DataField="MetaBook_ID" HeaderStyle-Width="60px" HeaderText="Book ID" />
                                                                    <telerik:GridBoundColumn DataField="Title" HeaderStyle-Width="360px" HeaderText="Title" />
                                                                    <telerik:GridBoundColumn DataField="SubTitle" HeaderStyle-Width="300px" HeaderText="Sub-title" />
                                                                    <telerik:GridBoundColumn DataField="abc" HeaderText="" />
                                                                    <telerik:GridBoundColumn DataField="xyz" HeaderText="" />
                                                                     <telerik:GridBoundColumn DataField="" HeaderText="" />
                                                                      <telerik:GridBoundColumn DataField="" HeaderText="" />                                                                
                                </telerik:GridButtonColumn>
                                                                </Columns>
                                                            <HeaderStyle Font-Bold="False" />
                                                        </MasterTableView>
                                                        <PagerStyle Mode="NextPrevAndNumeric" />
                                                    </telerik:RadGrid>


i just want to add one row. simple static one row to this grid in javascript in a simple function. plz guide me how to do this

function populategrid()
{
code here
}

regards,

Faisal
Iana Tsolova
Telerik team
 answered on 13 Jun 2011
1 answer
67 views
Hi

I already have text AND images in my ComboBoxItems, but I only show text in the text area.

Can I also show the image of my selected item in the text area?

TIA  
Helen
Telerik team
 answered on 13 Jun 2011
1 answer
179 views

Hi,

I am using RadEditor control in my website but not able to load the editor when I run the site.
Previously I was using .Net 2.0 and telerik version 2011.1.413.40 but as I mentioned in the this link
http://www.telerik.com/community/forums/aspnet-ajax/vs-extensions/314574.aspx I followed the instruction
and now I am facing the problem as "ASP.NET Ajax client-side framework failed to load." --Syntax error
for ScriptResource.axd and Telerik.Web.UI.WebResource.axd

The TargetFramework setting of my project is: .Net Framework 4;

The version of the Telerik.Web.UI assembly is: Product Version: 2011.1.413.40

Please help me in solving this issue.

Thanks

Rumen
Telerik team
 answered on 13 Jun 2011
3 answers
126 views
How do I get the clientside selected data key?  Only thing I can find is DisplayIndex....and not sure if that's what I want (does the display index change for an item if it's collapsed and thus hidden?)
Iana Tsolova
Telerik team
 answered on 13 Jun 2011
7 answers
129 views
We have a RadGrid that contains columns and a NestedViewTemplate which contains a user control that only has a RadGrid.  The export functionality has been working fine since Jan 2010, but ever since updating to Q1 2011 we receive an Object Reference error each time we try to export.  The stack trace shows that "Telerik.Web.UI.GridTableView.PrepareExport()" is the function throwing the error.  All other RadGrid export functions work fine, but they do not contain a NestedViewTemplate that contains another RadGrid.

The only way that the export will work is if I set IgnorePaging to false, but then all data that is on the other pages do not get exported to the excel.  So basically anytime the IgnorePaging is not false, you get the object reference error.  Also, if I remove the user control and just leave the empty NestedViewTemplate elements, the export works all the time.  Only when the user control (which just contains a RadGrid) is within a NestedViewTemplate do I get the object reference error.

The user control within the nestedviewtemplate is always set to visible = false, however, when you export, the radgrid within the user control, which is always visible = false, has its OnNeedDataSource event fired and after this is when you get the object reference error.  Below is the call stack

Using 2010 Q3 Telerik assembly, this problem does not exists and the RadGrid within the user control that exists in the NestedViewTemplate does not have the OnNeedDataSource event fired when exporting.

[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) +8695510
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


<

 

 

telerik:RadGrid ID="RadGridCustomers" runat="server" Width="100%" AllowSorting="true" SkinID="ExpandCollapse"

 

 

 

AllowPaging="true" OnItemDataBound="RadGridCustomers_ItemDataBound" PageSize="20"

 

 

 

OnItemCommand="RadGridCustomers_ItemCommand" OnNeedDataSource="RadGridCustomers_NeedDataSource">

 

 

 

<ExportSettings FileName="RelationshipList" />

 

 

 

<ClientSettings>

 

 

 

<Resizing AllowColumnResize="true" />

 

 

 

</ClientSettings>

 

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

 

<MasterTableView DataKeyNames="CcnNumber" Name="CcnList">

 

 

 

 

<NestedViewTemplate>

 

 

 

<tcb:ViewCustomers ID="ViewCustomersByCcn" runat="server" Visible="false" />

 

 

 

</NestedViewTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn HeaderText="Relationship Name" DataField="CcnName"

 

 

 

SortExpression="CcnName" HeaderStyle-Width="140px">

 

 

 

<ItemTemplate>

 

 

 

<asp:HyperLink ID="HyperLinkCcnAccountList" runat="server" Target="_blank"

 

 

 

NavigateUrl="#" ToolTip="View Accounts" />

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 


Thanks.
Mira
Telerik team
 answered on 13 Jun 2011
3 answers
211 views

When I programmatically add a grid in the Page Init event, I understand how I can create the paging and it works.

However if the grid is not created in the Page Init, but in the Ribbon Buttonclicked event the paging command on the grid is not working. How should I enable this.

Private Sub ribbon_ButtonClick(sender As Object, e As Telerik.Web.UI.RibbonBarButtonClickEventArgs) Handles ribbon.ButtonClick
Dim radGrid = New RadGrid() With {
.AllowCustomPaging = True,
.AllowFilteringByColumn = True,
.AllowPaging = True,
.AllowSorting = True,
.AutoGenerateColumns = True,
.ID = "myGrid",
.PageSize = 4,
.ShowGroupPanel = True,
.ShowStatusBar = True,
.VirtualItemCount = 20,
.Width = Unit.Percentage(95)
}
AddHandler radGrid.NeedDataSource, Sub(_sender As Object, _e As GridNeedDataSourceEventArgs) RefreshData(CType(_sender, RadGrid))
AddHandler radGrid.PageIndexChanged, Sub(_sender As Object, _e As GridPageChangedEventArgs) RefreshData(CType(_sender, RadGrid))
AddHandler radGrid.PageSizeChanged, Sub(_sender As Object, _e As GridPageSizeChangedEventArgs) RefreshData(CType(_sender, RadGrid))
phGrid.Controls.Add(radGrid)
RadAjaxManager.AjaxSettings.AddAjaxSetting(radGrid, radGrid)
End Sub
Private Sub RefreshData(grid As RadGrid)
grid.DataSource = New List(Of String)({grid.CurrentPageIndex, grid.PageSize})
End Sub
Iana Tsolova
Telerik team
 answered on 13 Jun 2011
2 answers
72 views
Hi,

I have 2 FilterEditors with the same FieldName, but when selecting the 2nd item, it displays the first.

<FieldEditors>
    <custom:CustomDropdown DisplayName="Priority" FieldName="post_priority" DataTextField="Display" DataValueField="Value" />
    <custom:CustomDate DisplayName="Date" FieldName="post_time" DataType="System.DateTime" />
    <telerik:RadFilterDateFieldEditor DisplayName="Post Date" FieldName="post_time" DataType="System.DateTime" />
</FieldEditors>

Can this be done?

Take Care
Mira
Telerik team
 answered on 13 Jun 2011
3 answers
380 views
As the title says, is this possible?

I would like to have a two- or three column based layout exported to pdf, instead of the gridview look which is one item per row.

Daniel
Telerik team
 answered on 13 Jun 2011
1 answer
40 views
I'm using a RadGrid to display a list of invoices. The Invoices can be in multiple currencies (dollars, pounds, euros, etc.) and I'd like to have each row use a different culture for currency display. I have the currency culture in a seperate database field, so I'd like to use that to determine the currency type.

Is there a way to do this? (Other than format it in SQL, which I can do, but would prefer not to)
Pavel
Telerik team
 answered on 13 Jun 2011
7 answers
221 views
I have RadWindow, inside page with RadTabStrip/RadMultiPage, each RadPageView have RadSplitter with Width/Height=100%. RadSplitter usualy have 2 horizontal panels, up for main content (grid or test boxes) and bottom is height=40 for buttons like Save/Cancel. When I open RadWindow, RadSplitter fills entire space and controls iniside fills pane and everything is ok.


When I resize RadWindow at same time is RadSplitter resized to fill space and that is ok but only in active RadPageView. Other  RadSplitters in other RadPageViews is frozen to initial size and it looks ugly and the useless.
How to persuade all RadSplitters in all RadPageViews to resize and fill Width/Height=100% when I resize RadWindow?


It can be done by some client function on RadTabStrip.OnClientTabSelected but what to do with RadPageViews without tabs? 
I have some RadPageViews that are accessed by code behind (not by tabs) and there is no RadMultiPage.OnClientSelected event. 
Niko
Telerik team
 answered on 13 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?