We have multiple RadGrids with the MasterTableView configured thusly:
<MasterTableView EditFormSettings-PopUpSettings-KeepInScreenBounds="true" EditMode="PopUp" TimeZoneID="Central Standard Time">
If a record from the database has a null datetime value, the min value of DATETIME data type is used (01/01/0001). When the grid tries convert UTC to CST, we get the error: The added or subtracted value results in an un-representable DateTime.
Parameter name: value.
How can this be handled so the Grid display an empty cell when a null datetime is encountered?
Trying to add a text box and button into a Column Group Header server side and can't seem to get to the cell of the specific header. I know how to set the text and all but want to place controls into the header.
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
foreach (GridColumnGroup cg in RadGrid1.MasterTableView.ColumnGroups)
{
if (cg.Name == "HeaderGroupName")
{
cg.HeaderText = "TEST";
}
}
}
Hello
I'm asking you a question because there's a tricky screen.
The screen consists of Grid and Dialog, as shown below.
[StudentGrid]
[StudentDialog]
I have telerik:RadGrid like this, when I select page 8 then select row and update/delete the Grid reload to page 1. So I want after update/delete the Grid still select page 8 and data update will to appear on Grid.
Before update/delete
After update/delete
Thanks,
Hi,
I am using a RadGrid with a several types of columns, one of them being a GridDropDownColumn. I am having trouble setting the width of this type of column. I can get the column width smaller, but the combobox in the column does not get smaller. What is the correct way to set the width of GridDropDownColumn?
Thank you,
Mary
Hi Scenario is like when I have made a grouping in my kendo grid and after that if try to search the Id(int) of the grid it throws an error also my grid is server side . getting the error when I am trying to return the list from the controller also it works fine for other columns that are of type string . only the error is coming if we try to search after grouping .
return isGrouping ? Json(lstofToolAction.ToDataSourceResult(request), JsonRequestBehavior.AllowGet) : Json(new { Data = lstofToolAction, Total = total }, JsonRequestBehavior.AllowGet);
Error :
Provided expression should have string type\r\nParameter name: stringExpression filter.
How to attach doc/xlsx/pdf file from host located under virtual directory root to that virtual directory, following by storing its path to MSSQL db
having loading grid and its controls dynamically. experiencing lots of access issues have to use Sys. authentication w/o identity impersonation. cannot retrieve file path of posted file
I have a radgrid that binds an object stored in the ViewState (Case). When I click on the radgrid's "Add" button (firing the OnInsertCommand) I get the following error: 'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'LookupValue'.' The specific control I am having problems with is the RadDropDownTree, and only when its definition contains this "SelectedValue='<%# Bind("LookupValue.Code") %>'"
I do not understand why this is happening. What is so different now that my radgrid is binding to a object that contains a subobject?? What do I need to be doing differently?
Just as an fyi, I do not get this error when the OnUpdateCommand fires. Below is my code.
<telerik:RadGrid ID="gvAllegations" runat="server"
AllowAutomaticDeletes="false"
AllowAutomaticInserts="false"
AllowAutomaticUpdates="false"
AllowFilteringByColumn="false"
AllowMultiRowEdit="false"
AllowMultiRowSelection="false"
AllowPaging="false"
AllowSorting="false"
AutoGenerateColumns="false"
OnNeedDataSource="gvAllegations_NeedDataSource"
OnInsertCommand="gvAllegations_InsertCommand"
OnUpdateCommand="gvAllegations_UpdateCommand">
<ClientSettings Selecting-AllowRowSelect="true" />
<GroupingSettings CaseSensitive="false" />
<MasterTableView
CommandItemDisplay="Top"
DataKeyNames="CaseAllegationID"
ClientDataKeyNames="CaseAllegationID">
<Columns>
<telerik:GridBoundColumn UniqueName="AllegationType" DataField="Type" HeaderText="Type" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
<telerik:GridBoundColumn UniqueName="AllegationCodeDescription" DataField="LookupValue.CodeDescription" HeaderText="Allegation" />
</Columns>
<CommandItemTemplate>
<div class="CommandButtonDiv">
<asp:LinkButton ID="LinkButton2" runat="server"
CssClass="CommandButton"
CommandName="InitInsert"
Visible='<%# !gvAllegations.MasterTableView.IsItemInserted && gvAllegations.EditIndexes.Count == 0 %>'>
<img src="Images/AddRecord.png"/> Add
</asp:LinkButton>
<asp:LinkButton ID="btnEditSelected" runat="server"
CssClass="CommandButton"
CommandName="EditSelected"
Visible='<%# !gvAllegations.MasterTableView.IsItemInserted && gvAllegations.EditIndexes.Count == 0 %>'>
<img src="Images/Edit.png" /> Edit
</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server"
CssClass="CommandButton"
CommandName="DeleteSelected"
Visible='<%# !gvAllegations.MasterTableView.IsItemInserted && gvAllegations.EditIndexes.Count == 0 %>'>
<img src="Images/Delete.png"/> Delete
</asp:LinkButton>
<asp:LinkButton ID="LinkButton4" runat="server"
CssClass="CommandButton"
CommandName="RebindGrid"
Visible='<%# !gvAllegations.MasterTableView.IsItemInserted && gvAllegations.EditIndexes.Count == 0 %>'>
<img src="Images/Refresh.png"/> Refresh
</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server"
CssClass="CommandButton"
CommandName="PerformInsert" Visible='<%# gvAllegations.MasterTableView.IsItemInserted %>'>
<img src="Images/Insert.gif"/> Save
</asp:LinkButton>
<asp:LinkButton ID="LinkButton5" runat="server"
CssClass="CommandButton"
CommandName="UpdateEdited" Visible='<%# gvAllegations.EditIndexes.Count > 0 %>'>
<img src="Images/Update.png"/> Update
</asp:LinkButton>
<asp:LinkButton ID="btnCancel" runat="server"
CssClass="CommandButton"
CommandName="CancelAll" Visible='<%# gvAllegations.MasterTableView.IsItemInserted || gvAllegations.EditIndexes.Count > 0 %>'>
<img src="Images/Cancel.png"/> Cancel
</asp:LinkButton>
</div>
</CommandItemTemplate>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table style="width: 100%">
<tr>
<td>Allegation</td>
<td>
<telerik:RadDropDownTree ID="ddtAllegation" runat="server"
AutoPostBack="False"
DataFieldId="Code"
DataFieldParentID="ParentCode"
DataValueField="Code"
DataSourceID="odsAllegationLookupValues"
DataTextField="CodeDescription"
EnableFiltering="True"
ExpandNodeOnSingleClick="True"
SelectedValue='<%# Bind("LookupValue.Code") %>'
Width="300px">
<DropDownSettings AutoWidth="Enabled" CloseDropDownOnSelection="true" />
<FilterSettings EmptyMessage="Search Allegation" Filter="Contains" Highlight="Matches" />
</telerik:RadDropDownTree>
</td>
</tr>
<tr>
<td>Major Allegation</td>
<td><telerik:RadCheckBox ID="chbMajorAllegation" runat="server"
AutoPostBack="False" Checked='<%# Bind("IsMajor") %>' /></td>
</tr>
<tr>
<td colspan="2" style="text-align: center">
<telerik:RadButton ID="btnInsert" runat="server"
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
Width="100px" />
<telerik:RadButton ID="btnCancel" runat="server"
Text="Cancel"
CommandName="Cancel"
Width="100px" />
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
[Serializable]
public class Case
{
public int ID { get; set; }
public List<Allegation> Allegations { get; set; }
}
[Serializable]
public class Allegation
{
public int CaseAllegationID { get; set; }
public bool IsMajor { get; set; }
public string Type
{
get
{
if (IsMajor)
return "Major";
else
return "Other";
}
}
public LookupValue LookupValue { get; set; }
}
[Serializable]
public class LookupValue
{
public string Code { get; set; }
public string Description { get; set; }
public string CodeDescription { get { return Code + " - " + Description; } }
public string ParentCode { get; set; }
public int DimID { get; set; }
public DateTime DimStartDate { get; set; }
public DateTime DimEndDate { get; set; }
public bool DimIsActive { get; set; }
}
protected void gvAllegations_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
gvAllegations.DataSource = ((Case)ViewState["rcaCase"]).Allegations;
}
protected void gvAllegations_InsertCommand(object sender, GridCommandEventArgs e)
{
}
Hello!
I was wondering, is it possible to change the icons of the export button in the footer of the radgrid? (Xls, pdf and csv).
I tried modifying their CSS classes, but did not work.
Thanks!