<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadTreeView.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
script
runat
=
"server"
>
protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
}
</
script
>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
div
>
<
telerik:RadTreeView
ID
=
"RadTreeView1"
Runat
=
"server"
DataFieldID
=
"id_num"
DataFieldParentID
=
"manager"
DataSourceID
=
"SqlDataSource1"
DataTextField
=
"fname"
DataValueField
=
"fname"
>
</
telerik:RadTreeView
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:nayan_alphametrixConnectionString2 %>"
SelectCommand="SELECT [id_num], [fname], [manager] FROM [TreeView]"
onselecting="SqlDataSource1_Selecting">
</
asp:SqlDataSource
>
<
telerik:RadButton
ID
=
"RadButton1"
runat
=
"server"
>
</
telerik:RadButton
>
</
div
>
</
form
>
</
body
>
</
html
>
Problem: after put rgDataRetrieval.MasterTableView.FilterExpression=... on grid PreRender makes grid all the column filter function not work. Please help!
I have a radgrid, has allow filter for all the columns turn to true.
I also need to have a date manually filtered by a search button click to filter the datagrid manually by start and end date.
I put the following code on PreRender, the serach button manually filter works fine, but after put
rgDataRetrieval.MasterTableView.FilterExpression=... in PreRender, the grid column auto filter for all the columns does not work right- not work at all
protected void rgDataRetrieval_PreRender(object sender, EventArgs e)
{
DateTime startDate =Convert.ToDateTime("1/1/1900");
DateTime endDate = Convert.ToDateTime("1/1/2900");
if (rdpFrom.SelectedDate!=null)
startDate=rdpFrom.SelectedDate.Value;
if (rdpTo.SelectedDate!=null)
endDate=rdpTo.SelectedDate.Value.AddDays(1);
if (rdpFrom.SelectedDate != null || rdpTo.SelectedDate != null)
{
rgDataRetrieval.MasterTableView.FilterExpression =
null;
rgDataRetrieval.MasterTableView.FilterExpression =
"(([DownloadEnd] >= '" + startDate +
"') AND ([DownloadEnd] <= '" + endDate + "')) ";
rgDataRetrieval.MasterTableView.Rebind();
}
}
<
td
><
asp:CheckBox
ID
=
"chkIsActive"
runat
=
"server"
Checked='<%# DataBinder.Eval( Container, "DataItem.con_Is_Active") %>' /></
td
>
Line 24: <tr>
Line 25: <td align="right">Active:</td>
Line 26: <td><asp:CheckBox ID="chkIsActive" runat="server" Checked='<%# DataBinder.Eval( Container, "DataItem.con_Is_Active") %>' /></td>
Line 27: <td></td>
Line 28: <td></td>
|
Guid uniqueIdentifer= Guid.Parse((RadGrid1.Items[e.Item.ItemIndex] as GridDataItem)["UniqueIdentifier"].Text);
RadGridResult.ExportSettings.Pdf.PageHeight = Unit.Parse("215mm")
RadGridResult.ExportSettings.Pdf.PageWidth = Unit.Parse("260mm");
But it didn't work, and I have no idea on how to export to Word in Landscape orientation.
But I can do it with Excel just fine. Is there anyway to "convert" Excel to PDF or Word format on the fly?
THanks
LamK.