| <Telerik:RadTimePicker id="rdpArrestTime" SelectedDate='<%# Eval("ArrestDateTime") %>' DateInput-DateFormat="HH:mm" Width="97" TimePopupButton-Visible="false" TabIndex="22" Runat="server" /> |
| if(!this.get_numberFormat().KeepNotRoundedValue){ |
| _49=NumberFormat.Round(_49,this); |
| } |
It seems as though that _49 = 5, NumberFormat is an object but there is no Round Method and so it dies.
Any ideas on how to resolve this please.
Many Thanks
Greg
Hi,
I am adding a user control into a rad dock programatically on click of a button.
There is a Rad grid with in the user control that is created and added dynamically to the controls of Web User Control.
This grid does not show up in the Web User Control added to thedock.
As an alternative, i tried adding the grid in the design view and try to set the data source in the Page_Init function. When doing this, null reference exception comes up as the grid seems to be a null object.
Objective is to set different properties to the grid (in the web user control) based on the button click event and add that user control to the dock.
| <asp:Label runat="server" ID="lblTitle" Text='<%# Eval("title") %>' /> |
| <Nola:RequiredGridBoundColumn UniqueName="Name" HeaderText="Name" DataField="Name" MaxLength="50" /> |
| namespace CustomTelerikExtensions |
| { |
| /// <summary> |
| /// An extended GridBoundColumn that requires users to enter data into the GridBoundColumn's TextBox. |
| /// </summary> |
| public class RequiredGridBoundColumn : GridBoundColumn |
| { |
| public override void InitializeCell(TableCell cell, int columnIndex, GridItem gridItem) |
| { |
| base.InitializeCell(cell, columnIndex, gridItem); |
| // if in edit mode && the editor is not null |
| if (gridItem.IsInEditMode && cell.Controls[0] != null) |
| { |
| //assign ID of the default editor, if it is empty or null |
| if (!Strings.Exists(cell.Controls[0].ID)) |
| cell.Controls[0].ID = String.Format("{0}_TextBox", this.DataField); |
| //add new required-field-validator |
| RequiredFieldValidator requiredValidator = new RequiredFieldValidator(); |
| requiredValidator.ID = gridItem.OwnerGridID + "_RequiredFieldValidator" + columnIndex; |
| requiredValidator.ControlToValidate = cell.Controls[0].ID; |
| requiredValidator.Text = " Required"; |
| requiredValidator.CssClass = "required"; |
| string message = String.Format("\"{0}\" cannot be empty.", this.HeaderText); |
| requiredValidator.ErrorMessage = message; |
| requiredValidator.ToolTip = message; |
| //add validator to the cell |
| cell.Controls.Add(requiredValidator); |
| } |
| } |
| //''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
| public override GridColumn Clone() |
| { |
| return base.Clone(); |
| } |
| } |
| } |