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

I used the following example:

http://www.telerik.com/comhttp://www.telerik.com/community/forums/aspnet-ajax/grid/using-dynamicobject-as-a-datasource-or-expandoobject.aspx#1615190

which works fine but I have problems grouping.
When I try to group by one of the columns I get the following Server exception:
at Telerik.Web.UI.GridDataSetHelper.CreateGroupByTable(DataTable SourceTable, GridTableView view)
at Telerik.Web.UI.GridDataSetHelper.CalcGroupByTables(GridTableView gridTableView, DataTable SourceTable, String RowFilter, Int32 FirstIndex, Int32 LastIndex, Boolean applyPaging, Boolean isCustomPaging)
at Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation()
at Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable()
at Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray)
at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)
at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at Telerik.Web.UI.GridTableView.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at Telerik.Web.UI.GridTableView.DataBind()
at Telerik.Web.UI.GridTableView.BindAllInHierarchyLevel()
at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


or on Client side:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Field FirstName not found in the source table. Please check the expression syntax.

<telerik:RadGrid ID="RadGrid2" runat="server" PageSize="10" AllowSorting="True" AllowMultiRowSelection="True"
		AllowPaging="True" AllowCustomPaging="false" ShowGroupPanel="True" AutoGenerateColumns="false"
		GridLines="none">
		<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
		<ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
			<Selecting AllowRowSelect="True"></Selecting>
			<Resizing AllowRowResize="false" AllowColumnResize="True" EnableRealTimeResize="True"
				ResizeGridOnColumnResize="False"></Resizing>
		</ClientSettings>
		<GroupingSettings ShowUnGroupButton="true" />
		<MasterTableView Width="100%">
			<Columns>
				<telerik:GridTemplateColumn HeaderText="First name" DataField="LastName" SortExpression="LastName"
					GroupByExpression="FirstName group by FirstName">
					<ItemTemplate>
						<%# (Container.DataItem as dynamic).FirstName%>
					</ItemTemplate>
					<EditItemTemplate>
						<asp:TextBox runat="server" ID="FirstNameTextbox" Text=" <%# (Container.DataItem as dynamic).FirstName%> "> </asp:TextBox>
					</EditItemTemplate>
				</telerik:GridTemplateColumn>
				<telerik:GridTemplateColumn HeaderText="Last name" DataField="LastName" SortExpression="LastName"
					GroupByExpression="LastName group by LastName">
					<ItemTemplate>
						<%# (Container.DataItem as dynamic).LastName%>
					</ItemTemplate>
					<EditItemTemplate>
						<asp:TextBox runat="server" ID="LastNameTextbox" Text=" <%# (Container.DataItem as dynamic).LastName%> "> </asp:TextBox>
					</EditItemTemplate>
				</telerik:GridTemplateColumn>
			</Columns>
		</MasterTableView>
	</telerik:RadGrid>
Radoslav
Telerik team
 answered on 22 Sep 2011
1 answer
101 views
I am working with a grid like in your demo at http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx.  The main difference is that mine is showing the MasterTableView on the top and bottom of the grid using <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" AlwaysVisible="True" />.

I want to do something like change the visible state of a button in the MasterTableView.  Think of changing the "First Page" button to "Visible=false" if you are on the first page.  I can find and change the control at the top just fine, but I can not seem to change the state of the controls in the footer.  Even if I recurse through the RadGrid Controls, I find the top panel twice, but never the bottom one.  If I search for the <div> id name, I can not seem to find it.

Oh, yes the other constraint is that for what I am trying to do, I need to change it from the "RadGridX_SelectedIndexChanged so I can not just put it into the databind for the control.

How do I access the footer controls?
Princy
Top achievements
Rank 2
 answered on 22 Sep 2011
0 answers
158 views
Hi

I use a radgrid on a search page to list search results in a paged manner. If a result-set returns more that 1 page of data and a user navigates to the last page all subsequent attempts to search result in no data displayed on the grid. This is despite that fact that on the quick-watch window the data is clearly there. The behaviour is the same regardless of whether simple or advanced data-binding is used. I have also tried to disable Viewstate and ViewstateMode to resolve this issue to no avail. Please see the grid client code below.

<telerik:RadGrid id="gvSearchDetails" runat="server" autogeneratecolumns="false" 
                        allowfilteringbycolumn="true" allowpaging="true" allowsorting="true"  ViewStateMode="Disabled"
                        allowmultirowselection="false" PageSize="10" onneeddatasource="gvSearchDetails_NeedDataSource" onitemdatabound="gvSearchDetails_ItemDataBound" EnableViewState="False">
                    <MasterTableView DataKeyNames="ReferenceNumber">
                        <Columns>
                            <telerik:GridTemplateColumn DataField="ReferenceNumber" headertext="Ref #" headerstyle-font-bold="true" UniqueName="clSensAnnouncementReference">
                                <ItemTemplate>
                                    <asp:LinkButton id="lnkReferenceNumber" runat="server" readonly="false" guid='<%# Eval("AnnouncementID") %>' text='<%# Eval("ReferenceNumber") %>' OnClick="lnkReferenceNumber_Click"></asp:LinkButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn UniqueName="clIssuer" DataField="Issuer" HeaderText="Issuer"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clIssuerRole" DataField="IssuerRole" HeaderText="Issuer Role"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clExchange" DataField="ExchangeName" HeaderText="Exchange"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clSubmitter" DataField="SubmitterCompany" HeaderText="Submitter"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clSubmissionDate" DataField="SubmissionDate" HeaderText="Submission Date"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clDisseminationDate" DataField="DisseminationDate" HeaderText="Dissemintation Date"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clFlashHeadline" DataField="FlashHeadlineText" HeaderText="Flash Headline"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
Masande Dyasi
Top achievements
Rank 1
 asked on 22 Sep 2011
1 answer
173 views
Has anybody been able to extract images from the new office 2010 themes as in the example below.

Many thanks
James
// Works
<img src='<%= Page.ClientScript.GetWebResourceUrl(grid.GetType(), "Telerik.Web.UI.Skins.Black.Grid.AddRecord.gif") %>' />
 
// Doesn't work
<img src='<%= Page.ClientScript.GetWebResourceUrl(grid.GetType(), "Telerik.Web.UI.Skins.Office2010Black.Grid.AddRecord.gif") %>' />


Iana Tsolova
Telerik team
 answered on 22 Sep 2011
3 answers
96 views
Hello,

I have two drag and drop grids and i would like to export all the shipped orders to an excel file. How could i make this?

Thank you very much.

Daniel
Telerik team
 answered on 22 Sep 2011
2 answers
185 views
Hi.
using ASP.NET MVC here, and using the Telerik Grid control.
I ran into a problem where, the initial databinding is fine from the server end, which contains a timespan object. it shows the value just fine.

However, when you press the refresh button on the Grid, the data just disappears even though, the AJAX select call IS being called.

I then ran into this thread:

http://www.telerik.com/community/forums/preview-thread/aspnet-ajax/grid/timespan-object-with-mvc-grid.aspx

So I implemented the Client Template and that works. The problem now is that when you hit the refresh button - I see the icon just indicating its doing work but there is no work being done at all! No errors either.

so what can I do here to display the TimeSpan object correctly on client side, with these issues even when you hit the refresh button?



Ahmed Ilyas
Top achievements
Rank 1
 answered on 22 Sep 2011
1 answer
138 views
Hi all :)


how can I get the first index or specified index of a rad list box ?


for example:


I want to put the value of a the first or second index as a text in a textbox


how can I do that ?


thank you all :)
Shinu
Top achievements
Rank 2
 answered on 22 Sep 2011
1 answer
133 views
I have a grid with a parent/detail table. Clicking on the expand/collaps icon displays/hides the detail column. Everything works fine except, clicking on the parent table row "Selects" it and this is undesirable behavior in my scenario since selecting the row doesn't do anything and isn't used. I tried setting the "Selecting" clientSettings Parameter AllowRowSelect='False", and this prevented the row being selected, however, this also prevents the expand/collapse column from working to display the detail table. Apparently you need to be able to select the parent row to display the child table. Is there a way to prevent the selection of the parent row and still have the expand/collapse column work? If not, is there a way of preventing the selected parent row from being shown as "highlighted". The visual appearance is all I really care about.
Princy
Top achievements
Rank 2
 answered on 22 Sep 2011
46 answers
2.5K+ views
Hi,

I want to evaluate the radScheduler component. I have dowloanded the latest version of Prometheus.

I only put a on a radScheduler component on a form with a datasource but at exection I obtain the following popup message :

'Telerik' is undefined

The code generated is  :

...

</
div><div class="rsFooter">

<a class="rsFullTime" href="#">Show 24 hours...</a>

</div><script type="text/javascript">

Telerik.Web.UI.RadScheduler.FixHeight("RadScheduler1");

<


PS : My global settings for my machine are "French".

Best regards,

Vina
Top achievements
Rank 1
 answered on 22 Sep 2011
2 answers
146 views
I was wondering if you guys could jQuery up a better visualization for drag\drop...Sitefinity has an awesome widget drag\drop visualization (as an example)...so instead of the row with an arrow following the mouse, the place in the tree in which it will place itself contains a placeholder (like dashed border)

Does that make sense?...so we can see in realtime where it'll appear
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 22 Sep 2011
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?