Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
180 views
Greetings,
  I have a RadGrid within a CompositeControl (along with a couple RadMenus and some other controls). I store a user's column visibility and sort preferences serverside and manually add the columns and sortexpression when a grid is loaded. The error I am getting is:

Unable to cast object of type 'Telerik.Web.UI.GridImageButton' to type 'System.Web.UI.WebControls.Button'.

which occurs Only when I add my own sortexpression to the mastertableview during Grid.Init (after all the columns have been added). If I comment out the
Grid.MasterTableView.SortExpressions.AddSortExpression(sortExp);
then everything works as expected, but I don't get my sort, of course.

I have tried setting Col.ShowSortIcon to false but that did not change anything. I have also played with different values for Col.HeaderButtonType, also without change.

Any insight would be greatly appreciated.

Thanks,
 - Forrest
Forrest
Top achievements
Rank 1
 answered on 24 Jul 2008
2 answers
94 views

I have a RadGrid in a user control on a page.  In IE I am able to select text in the grid and copy it.  So in an email column I can select one of the addresses right click and copy.  Yet in FireFox I dont seem to be able too.  In Fire Fox I dont even get the correct cursur.  Does anyone know any reason for this?

Thanks for any help.

Mark
Mark
Top achievements
Rank 1
 answered on 24 Jul 2008
1 answer
284 views
Hello,

   I am getting an error with the viewstate. I need to do some stuff in the code behind of the child radwindow prior to closing it. Then I need to do some other tasks on the parent form. After I click the close window of the child radwindow and then click the button on the parent form I get the message "Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. " I am new to this and have read the __doPostBack, but am not sure if I need that or where to start. I would appreciate any insight. I have supplied the code below. Thanks.

John

parentForm

aspx

<

html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body>

<form id="form1" runat="server">

<telerik:radscriptmanager id="ScriptManager1" runat="server" enabletheming="True"></telerik:radscriptmanager>

<div>

</div>

<telerik:radwindowmanager id="RadWindowManager1" runat="server" behavior="Default"

initialbehavior="None" left="" top=""></telerik:radwindowmanager>

<asp:Button ID="Button1" runat="server" Text="Button" />

</form>

</

body>

</

html>



code behind

Public

Partial Class frmMDI

Inherits System.Web.UI.Page

Dim newWindow1 As New Telerik.Web.UI.RadWindow()

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not IsPostBack Then

Try

'create child modal window

newWindow1.Behaviors = Telerik.Web.UI.WindowBehaviors.Move

newWindow1.Height =

"320"

newWindow1.Width =

"422"

newWindow1.Title =

"Child Window"

newWindow1.Modal =

True

newWindow1.VisibleTitlebar =

False

newWindow1.VisibleOnPageLoad =

True

newWindow1.NavigateUrl =

"frmChild.aspx"

newWindow1.Visible =

True

newWindow1.DestroyOnClose =

True

RadWindowManager1.Windows.Add(newWindow1)

Catch ex As Exception

Dim strEr As String = ex.ToString

End Try

Else

End If

End Sub

Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'do some code behind

Button1.Text =

"Refreshed"

End Sub

End

Class


child form

aspx

<

html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">

<title>Child Window</title>

<script type="text/javascript">

function get_RadWindow() //verify that it's a radWindow

{

var oWindow = null;

if (window.radWindow)

{ oWindow = window.radWindow; }

else if (window.frameElement.radWindow)

{ oWindow = window.frameElement.radWindow; }

return oWindow;

}

function JustClose()

{

get_RadWindow().Close();

}

</script>

</

head>

<

body>

<form id="form1" runat="server">

<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">

</telerik:RadScriptManager>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

</telerik:RadAjaxManager>

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">

<asp:Button ID="Button1" runat="server" Text="Close Window" /></telerik:RadAjaxPanel>

</form>

</

body>

</

html>



code behind

Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'do some code behind

RadAjaxManager1.ResponseScripts.Add(

"JustClose()")

End Sub

Georgi Tunev
Telerik team
 answered on 24 Jul 2008
1 answer
103 views
I would like to configure a drop down button on the tool bar that has items that can be checked (selected) or unchecked.  The visual appearance would show the check/unchecked status.  I figured this might be common enough that you had a sample lying around somewhere or could point me in the best direction.

Regards,
Bob
Peter
Telerik team
 answered on 24 Jul 2008
2 answers
101 views
Hi,
I have noticed that there are a few stings appearing in command history (undo) of the radeditor which don't seem to be in any of the resx files. Specifically "Unlink" and "Insert HTML". Is there a way to localize these strings?

Thanks
Sub
Top achievements
Rank 1
 answered on 24 Jul 2008
8 answers
1.3K+ views
I am using a checkbox that needs to align right

<td style="align:right;"><checkbox></td>

it works fine but as soon as I drop the FormDecorator on the page, it aligns left (all other controls - ddl and txt align properly).

Any reason for this?

also note.  i put the formdecorator control on the masterpage and not directly in the form.
Georgi Tunev
Telerik team
 answered on 24 Jul 2008
1 answer
131 views
 

I have a radgrid which is

<radG:RadGrid TabIndex="11" ID="RadGrdFiltered" Skin="Glassy" EnableAJAX="True" AutoGenerateColumns="False"

LoadingTemplateTransparency="20" ItemStyle-Height="20px" AlternatingItemStyle-Height="20px"

AllowMultiRowEdit="false" AllowMultiRowSelection="true" MasterTableView-RetrieveAllDataFields="true"

EnableOutsideScripts="false" EnableAJAXLoadingTemplate="false" runat="server" AllowSorting="false"

AllowPaging="true" PageSize="10">

<ExportSettings OpenInNewWindow="true" ExportOnlyData="true" />

<MasterTableView Width="100%" HorizontalAlign="NotSet" AutoGenerateColumns="false"

AllowAutomaticDeletes="True" CssClass="master">

<Columns>

<radG:GridBoundColumn HeaderText="ID" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="ID" SortExpression="ID" HeaderStyle-Width="10%" />

<radG:GridBoundColumn HeaderText="First Name" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="First Name" SortExpression="First Name" HeaderStyle-Width="12%" />

<radG:GridBoundColumn HeaderText="Last Name" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="Last Name" SortExpression="Last Name" HeaderStyle-Width="12%" />

<radG:GridBoundColumn HeaderText="Plan Type" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="Plan Type" SortExpression="Plan Type" HeaderStyle-Width="12%" />

<radG:GridBoundColumn HeaderText="Status" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="Status" SortExpression="Status" HeaderStyle-Width="12%" />

<radG:GridBoundColumn HeaderText="Division" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="Division" SortExpression="Division" HeaderStyle-Width="12%" />

<radG:GridBoundColumn HeaderText="Department" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="Department" SortExpression="Department" HeaderStyle-Width="12%" />

<radG:GridBoundColumn HeaderText="Location" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"

DataField="Location" SortExpression="Location" HeaderStyle-Width="32%" />

</Columns>

</MasterTableView>

<AlternatingItemStyle Height="20px" />

<ItemStyle Height="20px" />

</radG:RadGrid>

Now I tried to export the data in the radgrid to excel using a button click event.  The event is

protected

void btnExport_Clicked(object sender, EventArgs e)

{

 

RadGrdFiltered.ExportSettings.IgnorePaging =

true;

RadGrdFiltered.ExportSettings.OpenInNewWindow =

true;

RadGrdFiltered.MasterTableView.ExportToExcel();

RadGrdFiltered.ExportSettings.FileName =

"QBOutput" + DateTime.Now.ToFileTime() + ".xls";

}

But inspite of giving these things, i am not able to achieve the result. 

Daniel
Telerik team
 answered on 24 Jul 2008
1 answer
90 views
hi,
I am using the sheduler for 5 year planning and was wondering how to present the data nicely. Since i am using timeline and have set the width to 3200px, i found that it is difficult to identify the appointments with its related year. I was wondering that if i could highlight the time slot for every year with different colors or you can provide other alternatives to improve the view.
The details are shown as following:
<TimelineView
GroupingDirection="Vertical" HeaderDateFormat="MM/yy" NumberOfSlots="60"  SlotDuration="31.00:00:00" GroupBy="Generation" /> 

regards,
Chun
Peter
Telerik team
 answered on 24 Jul 2008
1 answer
100 views
Hi All,

I want to know how can I delete or remove my previous thread.
Is there any provision for this?

Best Regards,
Hrushikesh.
Daniel
Telerik team
 answered on 24 Jul 2008
2 answers
160 views
Hi,

When double clicking to create an appointment, I want the appointment to just appear without having to enter an appointment name or click the green tick box. Also, I dont want the facility to edit the appointment, just to be able to move it and delete it.

I'm using the scheduler as part of a weekly schedule, and the appointment text is retrieved from the database. The user shouldnt have the option to change this.

Is this possible?

Thanks,
Jonathan
Top achievements
Rank 1
 answered on 24 Jul 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?