Hi,
I am working on a RadGrid that has worked perfectly up till now, I use the event below to translate the true/false returned from the database into yes/no, I have other situtions where the translation maybe more complex e.g. a specific string to another string like 'yes' = 'this item has been delivered!'
where my problem is, is that I have introduced grid paging, now the first page is formatted correctly and all subsequent pages dont have the translations in them.
void grdDelivery_ItemDataBound(object sender, GridItemEventArgs e) {
if (e.Item is GridDataItem) {
GridDataItem databounditem = e.Item as GridDataItem;
if (bool.Parse(databounditem["deliveryclosed"].Text) == false) {
databounditem[
"deliveryclosed"].Text = "No";
}
else {
databounditem[
"deliveryclosed"].Text = "Yes";
}
}
}
any help would be great.
<telerik:RadGrid ID="RadGridCompany" runat="server"
AllowFilteringByColumn="True" AutoGenerateColumns="False"
DataSourceID="EntityDataSourceCompany" GridLines="None" AllowPaging="true"
PageSize="100" onselectedindexchanged="RadGridCompany_SelectedIndexChanged"
onitemcommand="RadGridCompany_ItemCommand">
.
.
<MasterTableView DataSourceID="EntityDataSourceCompany"
FilterExpression = "(it.[OrganizationName] == 'Non Existent')">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridButtonColumn
CommandName="Select"
Text="Select"
UniqueName="Select">
<HeaderStyle Width="10%" />
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="OrganizationName" HeaderText="Company Name"
ReadOnly="True" SortExpression="OrganizationName" UniqueName="OrganizationName"
AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith" FilterControlWidth="250px" >
<HeaderStyle Width="90%" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OrganizationID" Display="False"
HeaderText="Organization ID" ReadOnly="True" SortExpression="OrganizationID"
UniqueName="OrganizationID">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
.
.
<asp:EntityDataSource ID="EntityDataSourceCompany" runat="server"
ConnectionString="name=LQDModel" DefaultContainerName="LQDModel"
EntitySetName="Organization" OrderBy="it.OrganizationName"
Select="it.[OrganizationName], it.[OrganizationID]">
</asp:EntityDataSource>
| <telerik:RadComboBox ID="ddlColor" Width="100px" Skin="Default" runat="server"> |
| <Items> |
| <telerik:RadComboBoxItem Value="" Text="Alle Farben" /> |
| <telerik:RadComboBoxItem Value="1" Text="s/w" /> |
| <telerik:RadComboBoxItem Value="0" Text="Farbe" /> |
| </Items> |
| </telerik:RadComboBox> |
I am facing an issue while using RadUpload control.
The control Select file button gets disabled and is not available to user at times. This happens randomly and there is no fixed pattern. We have the following code available on all our pages.
protected
void _DisablePageCache()
{
Response.Expires = -1;
Response.ExpiresAbsolute =
DateTime.Now.AddHours(-48);
Response.Cache.SetCacheability(HttpCacheability.Private);
Response.CacheControl =
"no-cache";
Response.Cache.SetNoStore();
}
The resolution to this takes us to clean browser cache which rectifies the issue and allows user to again upload by clicking on select button. An urgent solution to this problem will help a lot.
Thanks
Bhawesh