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.
If TypeOf e.Item Is GridEditFormItem And e.Item.IsInEditMode Then dp = e.Item.FindControl("dpRoles")
<
telerik:RadFilter ID="WorkOrdersRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true"
OnApplyExpressions="WorkOrdersRadFilter_Apply" ApplyButtonText="Filter Work Orders"
OnPreRender="RadFilter_PreRender" OnFieldEditorCreating="RadFilter_FieldEditorCreating"
OnFieldEditorCreated
="RadFilter_FieldEditorCreated"
>
<FieldEditors>
<telerik:RadFilterTextFieldEditor FieldName="WORKORDERNUMBER" DisplayName="Work Order#"
DataType="System.String" />
<
goldcustom:RadFilterComboBoxEditor FieldName="WOTYPENAME" DisplayName="WO Type"
DataTextField="WOTYPENAME" DataSourceID="WorkOrderTypeFilterODS" DataType="System.String"
ComboBoxSkin="WebBlue" />
<
telerik:RadFilterTextFieldEditor FieldName="TRACKINGNUMBER" DisplayName="Tracking#"
DataType="System.String" />
<telerik:RadFilterTextFieldEditor FieldName="KEYREFERENCE" DisplayName="Key Ref"
DataType="System.String" />
</FieldEditors>
</telerik:RadFilter>
i tried what was suggested in one of the tutorials, but it never seems to fire this event.i also tried OnFieldEditorCreating which simply is used to invoke the class for radComboBoxes and that never fires either unless of course it's a radComboBox.
i assume that i want to do this when i click the "Add Expression" button on the RadFilter. is there some way i can switch out the DisplayName?? i've been thru every tutorial i can find, but nothing really works.
can i get some direct help? i'm a registered developer, do you guys need any info from me?
thanks
rik
Want to run something like this to switch out the Display name depending on a condition:
protected void RadFilter_FieldEditorCreated(object sender, RadFilterFieldEditorCreatedEventArgs e)
{
if (e.Editor.FieldName == "WORKORDERNUMBER")
{
e.Editor.DisplayName = "My custom text";
}
}