or
Hi,
Currently, we have implemented the RadTimePicker controller in our web application. But the customer wants to use the dropdownlist like outlook style? Could the control display like that?
If not, is there any code refactoring we could implement it to that style?
Alex
| <telerik:RadChart ID="chart" Skin="Vista" runat="server"> |
| <Appearance> |
| <Border Visible="false" /> |
| <FillStyle FillType="Solid" MainColor="White" /> |
| </Appearance> |
| </telerik:RadChart> |
<telerik:GridCheckBoxColumn ConvertEmptyStringToNull="False" FilterControlAltText="Filter checked column" SortExpression="Checked" UniqueName="Checked" DataField="Checked" HeaderText="Remove" ToolTip="Check this box to remove this item from your cart" DataType="System.Boolean"> <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="80px" CssClass="grid-header grid-header-first" /> <ItemStyle HorizontalAlign="Center" Width="100%" VerticalAlign="Top" /></telerik:GridCheckBoxColumn>protected void grdItems_PreRender(object sender, EventArgs e){ try { foreach (GridDataItem colGridField in grdItems.MasterTableView.Items) colGridField.Edit = true; grdItems.Rebind(); } catch (Exception ex) { System.Diagnostics.Debug.Print("Error: " + ex.ToString()); Exceptions.ProcessModuleLoadException(this, ex); }}protected void btnUpdateCart_Click(object sender, EventArgs e){ try { //grdItems.MasterTableView.Items[grdItems.MasterTableView.Items.Count - 1].FireCommandEvent("UpdateAll", string.Empty); grdItems.EditItems[0].FireCommandEvent("UpdateEdited", string.Empty); } catch (Exception ex) { System.Diagnostics.Debug.Print("Error: " + ex.ToString()); Exceptions.ProcessModuleLoadException(this, ex); }}protected void grdItems_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e){ GridEditableItem itmUpdatedRow = null; Hashtable tblUpdatedValues = null; try { //Get the details of the item that needs to be updated itmUpdatedRow = e.Item as GridEditableItem; tblUpdatedValues = new Hashtable(); //Parse out the updated data e.Item.OwnerTableView.ExtractValuesFromItem(tblUpdatedValues, itmUpdatedRow); //Update the underlying data table with the updated information (THIS IS ALWAYS FALSE REGARDLESS OF CHECKED STATUS) _propsSettings.Records.Rows[e.Item.DataSetIndex]["Checked"] = tblUpdatedValues["Checked"].ToString().GetBoolean(); grdItems.Rebind(); CleanUpData(); } catch (Exception ex) { System.Diagnostics.Debug.Print("Error: " + ex.ToString()); Exceptions.ProcessModuleLoadException(this, ex); } finally { SaveControlState(); //Clean up if (tblUpdatedValues != null) { tblUpdatedValues.Clear(); tblUpdatedValues = null; } }}tblUpdatedValues["Checked"]' is ALWAYS False regardless of the check boxes status. I had a similar issue before using a dropdown column but I got around that by changing it's editor to a standard ASP.NET dropdown. I tried doing the same here but I got the same results. The value of the Checked column is ALWAYS False no matter what I do./// <summary>/// Cleans up the Items grid data to make sure any invalid rows are removed./// </summary>private void CleanUpData(){ try { _propsSettings.TotalPrice = 0; _propsSettings.ShippingTotal = 0; _propsSettings.LateFees = 0; if (_propsSettings.Records.Rows.Count > 0) { //Start at the end so that removing rows won't cause the index to be incorrect for (int iItems = (_propsSettings.Records.Rows.Count - 1); iItems > -1; iItems--) { try { //Item was selected for removal if (_propsSettings.Records.Rows[iItems][0].ToString().GetBoolean()) { //Delete the line item database record and remove it from the data set } else { //Track the calculated totals _propsSettings.ShippingTotal += _propsSettings.Records.Rows[iItems]["ShippingPrice"].ToString().GetNumber(); _propsSettings.TotalPrice += ((_propsSettings.Records.Rows[iItems]["OriginalPrice"].ToString().GetNumber() * _propsSettings.Records.Rows[iItems]["Quantity"].ToString().GetNumber()) + _propsSettings.Records.Rows[iItems]["ShippingPrice"].ToString().GetNumber()); } } catch (Exception ex) { System.Diagnostics.Debug.Print("Error: " + ex.ToString()); } } } } catch (Exception ex) { System.Diagnostics.Debug.Print("Error: " + ex.ToString()); Exceptions.ProcessModuleLoadException(this, ex); } finally { SaveControlState(); UpdateCartTotals(); grdItems.Rebind(); }}