<telerik:RadGrid ID="radGridComments" Skin="WebBlue" GridLines="None" runat="server" Width="100%" PageSize="20"
AllowPaging="True" AutoGenerateColumns="False"
ShowStatusBar="True" ShowFooter="False" OnDetailTableDataBind="radGridComments_DetailTableDataBind" >
<PagerStyle Mode="NextPrevAndNumeric" />
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="PKey" HorizontalAlign="NotSet">
<DetailTables>
<telerik:GridTableView DataKeyNames="PKey" Width=70% Name="Actions" CommandItemDisplay=Top ed HorizontalAlign="NotSet">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="CommentsPkey" MasterKeyField="PKey" />
</ParentTableRelation>
<Columns>
<telerik:GridTemplateColumn HeaderText="PKey" Visible=False UniqueName="Pkey" >
<ItemTemplate >
<asp:Label runat="server" ID="lblID" Text='<%# Bind("Pkey") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="CommentPKey" Visible=False UniqueName="Pkey" >
<ItemTemplate >
<asp:Label runat="server" ID="lblCommentPKey" Text='<%# Bind("CommentPkey") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="StatusPKey" Visible=False UniqueName="StatusPkey" >
<ItemTemplate >
<asp:Label runat="server" ID="lblID" Text='<%# Bind("StatusPkey") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Subject" UniqueName="Subject" EditFormColumnIndex="1">
<HeaderStyle Width="15%" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label runat="server" ID="lblSubject" Text='<%# DataBinder.Eval(Container.DataItem,"ActionSubject") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox CssClass="TextBox" Text='<%# ViewState("ActionSubject")%>' ID="txtSubject" runat=server></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvSubject" runat="server" ErrorMessage="*" ControlToValidate="txtSubject"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridTemplateColumn HeaderText="FromDB" Visible=False UniqueName="TemplateColumn" >
<ItemTemplate >
<asp:Label runat="server" ID="lblFromDB" Text='<%# Bind("FromDB") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="PKey" Visible=False UniqueName="Pkey" >
<ItemTemplate >
<asp:Label runat="server" ID="lblID" Text='<%# Bind("Pkey") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="UserID" Visible=False UniqueName="UserID" >
<ItemTemplate >
<asp:Label runat="server" ID="lblUserID" Text='<%# Bind("UserId") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Comments Date" UniqueName="CommentsDate" EditFormColumnIndex="1">
<HeaderStyle Width="15%" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label runat="server" ID="lblCommentsDate" Text='<%# Format(DataBinder.Eval(Container.DataItem,"CommentsDate"),"dd-MMM-yyyy") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDatePicker ID="radCommentsDate" runat="server">
<DatePopupButton HoverImageUrl="" ImageUrl="" />
<Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">
</Calendar>
<DateInput DateFormat="dd-MMM-yyyy" Skin="">
</DateInput>
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="rfvCommentsDate" runat="server" ErrorMessage="*" ControlToValidate="txtSubject"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Subject" UniqueName="Subject" EditFormColumnIndex="1">
<HeaderStyle Width="15%" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label runat="server" ID="lblSubject" Text='<%# DataBinder.Eval(Container.DataItem,"CommentsSubject") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox CssClass="TextBox" Text='<%# ViewState("Subject")%>' ID="txtSubject" runat=server></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvSubject" runat="server" ErrorMessage="*" ControlToValidate="txtSubject"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Comments By" UniqueName="CommentsBy" EditFormColumnIndex="1">
<HeaderStyle Width="20%" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label runat="server" ID="lblCommentsBy" Text='<%# Bind("CommentsBy") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox ID="radCommentsBy" runat="server">
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
<asp:RequiredFieldValidator ID="rfvCommentsBy" runat="server" ErrorMessage="*" ControlToValidate="radCommentsBy"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Comments" UniqueName="Comments" EditFormColumnIndex="1">
<HeaderStyle Width="50%" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label runat="server" ID="lblComments" Text='<%# Bind("Comments") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadEditor ID="radComments" width="400px" runat="server" ToolsFile="../App_Data/RadEdit/ToolsFile.xml" >
<Content></Content>
</telerik:RadEditor>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn UniqueName="EditButton">
<HeaderStyle Width="50px" />
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
<HeaderStyle Width="60px" />
<ItemStyle Width="60px" />
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings ColumnNumber="3" >
<FormTableItemStyle Wrap="False"></FormTableItemStyle>
<FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
<FormMainTableStyle CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" />
<FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" BackColor="White" />
<FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
<EditColumn ButtonType="ImageButton" InsertText="Save" UpdateText="Save" UniqueName="EditCommandColumn1"></EditColumn>
<FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
</EditFormSettings>
</MasterTableView>
<HeaderContextMenu Skin="">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<FilterMenu Skin="">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>
hi!
I'm using a javascript to launch a window.
| <script type="text/javascript"> |
| function openRadWin() |
| { |
| radopen("http://www.telerik.com","RadWindow1"); |
| } |
| </script> |
The problem is that this window is launched inside a frame.
I want to know :
In a word, how to popup the window from iframe, fixing it in screen center and moving out of the frame?
In my page, left side is a masterpage and right side there is an iframe in it, maybe like this demo effects:
http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx
If luanching window in iframe can't make this effects, is it necessary to popup a window from main page where the iframe is contained?
Hope I described the situation clearly, thank you!
Airad
Hello,
In my site i am using Rad Grid,Rad Contex menu and Rad popup features.
i am facing some problems :-
1. while i am inserting some through the Rad Popup , i am not being able to rebining it.so newly inserted data are not showing in
the Rad grid.Rad grid and Rad popup are 2 diiferent Aspx page.
2. After inserting data through Rad popup i want to close it automatically,How can i do this?
Thanks.
Denny
Hi, I have a button to programatically build the url for one RadWindow, but I have some strange problem showing the window, after the Window is closed, every control that must initiate an Ajax request forces a page reload on postback and the window apperas again.
RadGrid
r = new RadGrid();
r.MasterTableView.DataKeyNames =
new string[] { "DepartmentID" };
r.Skin =
"Default";
r.Width =
Unit.Percentage(100);
r.PageSize = 5;
r.AllowPaging =
true;
r.AutoGenerateColumns =
false;
r.MasterTableView.PageSize = 15;
//Add columns
GridBoundColumn boundColumn;
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"DepartmentID";
boundColumn.HeaderText =
"DepartmentID";
r.MasterTableView.Columns.Add(boundColumn);
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"Budget";
boundColumn.HeaderText =
"Budget";
r.MasterTableView.Columns.Add(boundColumn);
//Detail table - Orders (II in hierarchy level)
GridTableView tableViewOrders = new GridTableView(r);
//tableViewOrders.DataSourceID = "AccessDataSource2";
tableViewOrders.DataKeyNames =
new string[] { "CourseID" };
GridRelationFields relationFields = new GridRelationFields();
relationFields.MasterKeyField =
"DepartmentID";
relationFields.DetailKeyField =
"DepartmentID";
tableViewOrders.ParentTableRelation.Add(relationFields);
RadGrid1.MasterTableView.DetailTables.Add(tableViewOrders);
//Add columns
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"CourseID";
boundColumn.HeaderText =
"CourseID";
tableViewOrders.Columns.Add(boundColumn);
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"Title";
boundColumn.HeaderText =
"Title";
tableViewOrders.Columns.Add(boundColumn);
r.AllowMultiRowSelection =
true;
r.MasterTableView.DetailTables.Add(tableViewOrders);
r.DetailTableDataBind +=
new GridDetailTableDataBindEventHandler(r_DetailTableDataBind);
r.NeedDataSource +=
new GridNeedDataSourceEventHandler(r_NeedDataSource);
r.ID =
"RockOn";
this.PlaceHolder1.Controls.Add(r);
its the same code posted on Site Examples..
it loads ok but when i try to expand the grid Row ... i get an error--
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
on page load i m binding the DataSets to the Grid
Value='<%#Eval("answer")%>'
but I get error !!???