
protected
void btnUpdateSearch_Click(object sender, EventArgs e)
{
foreach
(GridDataItem gridDataItem in (GridDataItemCollection)SearchUsersGrid.Items)
{
checkForNorecords = true;
CheckBox chkSelect = gridDataItem["CheckBoxTemplateColumn"].FindControl("chkboxSelectRows") as CheckBox;
if (chkSelect.Checked)// If cheked then maintain the same in MpaList and UserStatus list.
{
gridDataItem.Selected = true;
}
}
}
My question is how to find the checked data items in the Details table and how to check the data items in the details table .
Awaiting for your reply.
Thanks and Regards,
Nagireddy T

<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageRedirect.aspx.cs" Inherits="SampleTestProgress.Telerik.PageRedirect" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.BODY
{
font-size:62.5%;
line-height:1.2;
font-family:"segoe ui",arial,sans-serif;
}
</style>
</
head>
<
body class="BODY">
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px" LoadingPanelID="RadAjaxLoadingPanel1">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="list1_SelectedIndexChanged" >
<asp:ListItem Value="http://www.google.com/">www.google.com</asp:ListItem>
<asp:ListItem Value="http://www.yahoo.com/">www.yahoo.com</asp:ListItem>
<asp:ListItem Value="http://www.microsoft.com/">www.microsoft.com</asp:ListItem>
<asp:ListItem Value="http://www.slashdot.org/">www.slashdot.org</asp:ListItem>
</asp:RadioButtonList>
</telerik:RadAjaxPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
Width="75px" InitialDelayTime="0">
<asp:Image ID="Image1" Style="margin-top: 50px" runat="server" BorderWidth="0px"
ImageUrl="../_assets/img/Telerik/loading1.gif" AlternateText="Loading..."></asp:Image>
</telerik:RadAjaxLoadingPanel>
</div>
</form>
</
body>
</
html>
----------------------------CS File ---------------------
protected void list1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect(RadioButtonList1.SelectedValue);
}
Regards
Vikas
I'm sure I am just missing some information here.
When a radGrid for Ajax goes into edit mode it shouldn't submit the form right?
I don't want the radGrid to refresh when it goes into edit mode.
The aspx and code behind is rather large. I'll try to cut it down to just the relevant pieces for you. The entire page is meant to mimik the behavior of the Windows File Explorer. What I'm trying to do now is put the grid into edit in place mode so the end user can edit the name of the folder or file prior to submitting to the server to do that action on the server. But like I said, when I put it into edit mode, it refreshes and returns the "empty data" template, not the edit mode template.
Here's the JavaScript code I use to put the grid into edit mode...
| function onGridRowClick(sender, args) { |
| var index = args.get_itemIndexHierarchical(); |
| // Put item into edit mode if clicked after selected (slow double-click) |
| if (currentSelectedGridRowIndex != null) { |
| if (index == currentSelectedGridRowIndex) { |
| var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView(); |
| masterTable.editItem(index); |
| } |
| } |
| currentSelectedGridRowIndex = index; |
| } |
| <telerik:RadGrid ID="RadGrid1" runat="server" |
| AutoGenerateColumns="False" |
| GridLines="None" |
| Skin="Office2007" |
| Width="100%" |
| BorderWidth="0px"> |
| <MasterTableView |
| clientDataKeyNames="Path,Name,Type" |
| EditMode="InPlace"> |
| <Columns> |
| <telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name"> |
| <ItemTemplate> |
| <asp:Image ID="icon" runat="server" ImageAlign="absmiddle" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Icon") %>' AlternateText="icon" BorderWidth="0" /> |
| <asp:Label ID="name" runat="server" style="cursor:default;" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle BorderStyle="None" Wrap="False" /> |
| <HeaderStyle Width="300px" /> |
| <EditItemTemplate> |
| <asp:TextBox ID="TextBox_NewName" runat="server"></asp:TextBox> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Size" UniqueName="Size"> |
| <ItemTemplate> |
| <asp:Label ID="size" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Size") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle BorderStyle="None" Width="100px" Wrap="False" /> |
| <HeaderStyle Width="100px" /> |
| <EditItemTemplate> |
| <asp:Label ID="size" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Size") %>'></asp:Label> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Modified" UniqueName="Modified"> |
| <ItemTemplate> |
| <asp:Label ID="modified" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Modified") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle BorderStyle="None" Width="230px" Wrap="False" /> |
| <HeaderStyle Width="230px" /> |
| <EditItemTemplate> |
| <asp:Label ID="modified" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Modified") %>'></asp:Label> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| <NoRecordsTemplate> |
| No Files or Folders. |
| </NoRecordsTemplate> |
| <ExpandCollapseColumn Visible="False" Resizable="False"> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <EditFormSettings> |
| <PopUpSettings ScrollBars="None" /> |
| </EditFormSettings> |
| </MasterTableView> |
| <ItemStyle BorderStyle="None" /> |
| <ClientSettings> |
| <Resizing AllowColumnResize="True" /> |
| <Selecting AllowRowSelect="True" /> |
| <ClientEvents OnRowClick="onGridRowClick" OnRowContextMenu="onGridRowContextMenu" OnRowDblClick="onGridRowDoubleClick" OnRowSelecting="onGridRowSelecting" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| Private Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource |
| If RadTreeView1.SelectedNode IsNot Nothing Then |
| LoadGrid(RadTreeView1.SelectedNode.Value) |
| Else |
| LoadGrid(selectedPath) |
| End If |
| End Sub |
| Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated |
| If TypeOf e.Item Is GridDataItem Then |
| Dim dataItem As GridDataItem = TryCast(e.Item, GridDataItem) |
| e.Item.Attributes("onmousedown") = String.Format("onGridMouseDown(event, this,{0})", dataItem.DataSetIndex) |
| End If |
| End Sub |
<
AxisLabel>
<TextBlock Text="Company Name">
</TextBlock>
<Appearance Position-AlignedPosition="Bottom">
</Appearance>
</AxisLabel>