Hello!
I have created an auto generated RadGrid control.
I've found a solution for implementing an INSERT event with the help of RadGrid1.MasterTableView.AutoGeneratedColumns collection and IGridColumnEditor.
But how should I implement an UPDATE event? How can I write update statement(for databes update) without knowing the names of the primary key columns?
Thank you!
Hi,
Can I set date range for RangeSeriesItem inside of RangeBarSeries for RadHTML Chart something like this
can I set
RangeSeriesItem rsi = new RangeSeriesItem();
rsi.From = DateTime.Now.AddDays(-1);
rsi.To = DateTime.Now.AddDays(1);
bbs.SeriesItems.Add(rsi);
instead of setting decimal values in From and To for Range series Item??
Hi all,
On a radgrid, i want a context menu which has a single item. When i click on that item, it will open another window (modal popup extender) to input some information.
When i click on the item, it does not go to the event handler. Nothing happens.
Am i missing anything here?
why does the Radmenu2_itemclick not fire?
Thanks in advance
Grid:
<input type="hidden" id="radgridrowindex" name="radgridrowindex" /> <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="Both" DataKeyName="TripRequestID" OnEditCommand="RadGrid1_EditCommand" CellSpacing="0" BorderColor="#FF8000" ForeColor="Black" BackColor="SkyBlue" BorderStyle="Double" EnableHeaderContextMenu = "true" > <MasterTableView> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> </ExpandCollapseColumn> <Columns> <telerik:GridButtonColumn CommandName="Select" Text="Edit" ButtonType="PushButton" UniqueName="column"> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="TripRequestID" DataType="System.Int32" FilterControlAltText="Filter column1 column" HeaderText="TripRequestID" UniqueName="TripRequestID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="TripDate" FilterControlAltText="Filter column2 column" HeaderText="TripDate" UniqueName="column2"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PickupTime" FilterControlAltText="Filter column3 column" HeaderText="PickupTime" UniqueName="column3"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DropoffTime" FilterControlAltText="Filter column4 column" HeaderText="DropoffTime" UniqueName="column4"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Proc_Flag" FilterControlAltText="Filter column5 column" HeaderText="Processed" UniqueName="column5"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Start_Desc" FilterControlAltText="Filter column6 column" HeaderText="Description" UniqueName="column6"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="StartAddress" FilterControlAltText="Filter column7 column" HeaderText="Start Address" UniqueName="column7"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Dest_Desc" FilterControlAltText="Filter column8 column" HeaderText="Description" UniqueName="column8"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DestAddress" FilterControlAltText="Filter column9 column" HeaderText="Dest Address" UniqueName="column9"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Persons" FilterControlAltText="Filter column10 column" HeaderText="Persons" UniqueName="column10"> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column" UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> </MasterTableView> <HeaderStyle BackColor="DarkOrange" /> <ClientSettings> <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents> </ClientSettings> <FilterMenu EnableImageSprites="False"> </FilterMenu> </telerik:RadGrid>
Modal Popup Extender, Contextmenu:
<asp:Button ID="btnDummyDupTrip" runat="server" Text="Button" Style="display: none" /><asp:ModalPopupExtender ID="mpuDuplicateTrip" runat="server" TargetControlID="btnDummyDupTrip" PopupControlID="panDupTrip" BackgroundCssClass="modalBackground" OkControlID="btnDupCancel"></asp:ModalPopupExtender><asp:Panel ID="panDupTrip" runat="server" CssClass="ModalWindow" Style="display: none"> <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional"> <ContentTemplate> <table> <tr> <td colspan="2" align="center"> <asp:Label ID="lblClientsName" runat="server" CssClass="clntName" Text=""></asp:Label> </td> </tr> <tr> <td colspan="2"> <asp:Label ID="lblDupMsg" runat="server" CssClass="lblErrMsg" Text=""></asp:Label> </td> </tr> <tr> <td> <span class="text">Pickup Time: </span> </td> <td> <asp:Label ID="lblPickupTime" runat="server" CssClass="lbl" Text=""></asp:Label> <asp:DropDownList ID="ddlDupPkTime" runat="server" CssClass="ddl"> </asp:DropDownList> </td> </tr> <tr> <td> <span class="text">Pickup At: </span> </td> <td> <asp:Label ID="lblPickupAt" runat="server" CssClass="lbl" Text=""></asp:Label> </td> </tr> <tr> <td> <span class="text">Dropoff Time: </span> </td> <td> <asp:Label ID="lblDropoffTime" runat="server" CssClass="lbl" Text=""></asp:Label> <asp:DropDownList ID="ddlDupDrpTime" runat="server" CssClass="ddl"> </asp:DropDownList> </td> </tr> <tr> <td> <span class="text">Dropoff At: </span> </td> <td> <asp:Label ID="lblDropoffAt" runat="server" CssClass="lbl" Text=""></asp:Label> </td> </tr> <tr> <td> <span class="text">Date: </span> </td> <td> <asp:TextBox ID="txtDupDate" runat="server"></asp:TextBox> <asp:CalendarExtender ID="calDupTrip" runat="server" TargetControlID="txtDupDate"> </asp:CalendarExtender> <asp:RequiredFieldValidator ID="reqDupDt" runat="server" ValidationGroup="DupTrip" ControlToValidate="txtDupDate" ErrorMessage="Date is required." ToolTip="Date is required." SetFocusOnError="True">Date is required.</asp:RequiredFieldValidator> </td> </tr> <tr> <td> <span class="text">Route: </span> </td> <td> <asp:DropDownList ID="ddlDupRoute" runat="server"> </asp:DropDownList> <asp:RequiredFieldValidator ID="reqDupRoute" runat="server" ValidationGroup="DupTrip" InitialValue="-1" ControlToValidate="ddlDupRoute" ErrorMessage="Route is required." ToolTip="Route is required." SetFocusOnError="True">Route is required.</asp:RequiredFieldValidator> </td> </tr> <tr> <td colspan="2" align="center"> <asp:Button ID="btnDupTrip" runat="server" Text="Duplicate Trip" ValidationGroup="DupTrip" /> </td> </tr> </table> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnDupTrip" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="RadMenu2" EventName="ItemClick" /> </Triggers> </asp:UpdatePanel> <asp:Button ID="btnDupCancel" runat="server" Text="Exit" /></asp:Panel> <telerik:RadContextMenu ID="RadMenu2" runat="Server" OnItemClick="RadMenu2_ItemClick"><Items><telerik:RadMenuItem Text="Duplicate This Trip" Value="Duplicate" /></Items></telerik:RadContextMenu>
Code Behind:
Public Sub RadMenu2_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadMenu2.ItemClick Dim radgridrowindex As Integer radgridrowindex = Convert.ToInt32(Request.Form("radgridrowindex")) Dim radGridClickedRow As GridDataItem = CType(RadGrid1.Items(radgridrowindex), GridDataItem) Dim pickupTime, dropoffTime, pickupAt, dropoffAt, clientsName As String ViewState("DupTripID") = radGridClickedRow("TripRequestID").Text mpuDuplicateTrip.Show()End SubI placed a RadColorPicker control on my form and when I switch the rendering mode to HSB or HSV, the field labels for "R:", "G", etc. are wrapping with their associated controls, and the height of the RadColorPicker grows to a very large layout (see the attached screenshot for an example of the problem). There is no problem in the layout when I choose the "Web Palette" or "RGB Sliders" mode. And the problem is happening in IE11 as well as in Chrome and Firefox. The page is being hosted within a Bootstrap v2.2.2 container. The page markup of this control appears as follows:
<div class="row-fluid">
<div class="span12">
<asp:Label id="lblFooterBGColor" runat="server" text="Pick the background color for the site header" meta:resourceKey="lblSiteHeaderBGColorResource1"></asp:Label>
<telerik:RadColorPicker ID="radCPSiteHeader" runat="server" PaletteModes="All" ShowEmptyColor="true" ShowIcon="false" Skin="Office2010Blue" Width="150px" RenderMode="Mobile"></telerik:RadColorPicker>
</div>
</div>
Does anyone know why this is happening and how I can correct the problem? Thanks.
Hi again - I have what I thought should be a simple item but based on my searching - it is not so simple.
I have a datagrid on my page - that is populated on the server side by a query level class. The method returns a DataTable which populates to the data grid just fine. I've set the datagrid to EditMode="Batch" to allow the users to make changes in multiple records then save them all to the database.
My problem is that I want one of the columns to be a drop down list (of any type). It would be fed with a datatable from a database call as well - based off my same query level classes. I've done this all 50 times before except never with EditMode = "Batch". That seems to cause some issues. I can't populate the drop down server side in the ItemDataBound event because the: if (e.Item is GridEditableItem && e.Item.IsInEditMode) never evaluates to true when dealing with batch.
Someone must have solved this before. I can't just do the standard thing and tie the grid and the list to datasources right on the screen - it has to be called using a query level object.
I even tried using XML to populate the list - which worked - but then I still can't get the list to connect to the data because whenever I try to "FIND" the control it never gets found.
HELP?!?
Thanks,
Cory Aston
On the RadDateTimePicker with TabIndex set...only the CalendarPopupButton inherits TabIndex from parent picker while TimePopupButton does not.
So user will tab to the DateTimeTextbox and then tab to Calendar <a> tag...then tab order will skip over the TimeButton.
I have this workaround.
$(function () { setTimeout(function () { var fromToDatePicker = $find("<%=RadDatePickerFromTo.ClientID%>"); var fromToTimeControl = fromToDatePicker.get_timePopupButton(); fromToTimeControl.tabIndex = fromToDatePicker.get_textBox().tabIndex;When I give focus to my TreeView and push the Down-Arrow...the first node is selected but the OnClientKeyPressing event never fired. From then on it fires as expected.
Am I missing something? Really frustrating because I am already in hack-ville trying to create my own OnClientNodeSelected behavior (because that even isn't on the TreeView) and now it doesn't even work for the first selection!?
Thanks,
Sean

I'm trying to style a table on a page like a normal RadGrid to fit with our sites theme, but I'm having trouble with it. I've copied all the styles and matched the layout I saw on the DOM for RadGrids, but the classes seem to have no effect.
Is what I'm trying to do here possible?
Here is the markup ode for the table:
<div tabindex="0" class="RadGrid Radgrid_Default"> <table style="width:20%; margin:0 auto;" class="rgMasterTable"> <colgroup> <col></col> <col></col> <col></col> <col></col> <col></col> <col></col> <col></col> <col></col> </colgroup> <thead> <tr> <th class="rgHeader" scope="col">Category</th> <th class="rgHeader" scope="col"><asp:label ID="_lblExpSun" runat="server" Text="Sunday"></asp:label></th> <th class="rgHeader" scope="col"><asp:label ID="_lblExpMon" runat="server" Text="Monday"></asp:label></th> <th class="rgHeader" scope="col"><asp:label ID="_lblExpTues" runat="server" Text="Tuesday"></asp:label></th> <th class="rgHeader" scope="col"><asp:label ID="_lblExpWed" runat="server" Text="Wednesday"></asp:label></th> <th class="rgHeader" scope="col"><asp:label ID="_lblExpThurs" runat="server" Text="Thursday"></asp:label></th> <th class="rgHeader" scope="col"><asp:label ID="_lblExpFri" runat="server" Text="Friday"></asp:label></th> <th class="rgHeader" scope="col"><asp:label ID="_lblExpSat" runat="server" Text="Saturday"></asp:label></th> </tr> </thead> <tbody> <asp:Repeater ID="_rptExpenses" runat="server" > <ItemTemplate> <tr class="rgRow"> <td> <telerik:RadDropDownList ID="_ddCategory" SelectedValue='<%# Bind("ExpenseID") %>' runat="server" DataSourceID="_srcGetCategories" DataValueField="ExpenseID" DataTextField="CategoryDesc" ExpandDirection="Up" ></telerik:RadDropDownList> <asp:SqlDataSource ID="_srcGetCategories" runat="server" SelectCommand="TimeTracker.sp_getExpenseCategories" SelectCommandType="StoredProcedure" ConnectionString='<%$ ConnectionStrings:FMS_Conn %>'></asp:SqlDataSource> </td> <td> <telerik:RadNumericTextBox ID="_txtExpSun" DbValue='<%# Convert.ToInt32(Eval("Sunday")) %>' runat="server" Width="50" MinValue="0" MaxValue="24" NumberFormat-DecimalDigits="1" Value="0"></telerik:RadNumericTextBox></td> <td> <telerik:RadNumericTextBox ID="_txtExpMon" DbValue='<%# Convert.ToInt32(Eval("Monday")) %>' runat="server" Width="50" MinValue="0" MaxValue="24" NumberFormat-DecimalDigits="1" Value="0"></telerik:RadNumericTextBox></td> <td> <telerik:RadNumericTextBox ID="_txtExpTues" DbValue='<%# Convert.ToInt32(Eval("Tuesday")) %>' runat="server" Width="50" MinValue="0" MaxValue="24" NumberFormat-DecimalDigits="1" Value="0"></telerik:RadNumericTextBox></td> <td> <telerik:RadNumericTextBox ID="_txtExpWed" DbValue='<%# Convert.ToInt32(Eval("Wednesday")) %>' runat="server" Width="50" MinValue="0" MaxValue="24" NumberFormat-DecimalDigits="1" Value="0"></telerik:RadNumericTextBox></td> <td> <telerik:RadNumericTextBox ID="_txtExpThurs" DbValue='<%# Convert.ToInt32(Eval("Thursday")) %>' runat="server" Width="50" MinValue="0" MaxValue="24" NumberFormat-DecimalDigits="1" Value="0"></telerik:RadNumericTextBox></td> <td> <telerik:RadNumericTextBox ID="_txtExpFri" DbValue='<%# Convert.ToInt32(Eval("Friday")) %>' runat="server" Width="50" MinValue="0" MaxValue="24" NumberFormat-DecimalDigits="1" Value="0"></telerik:RadNumericTextBox></td> <td> <telerik:RadNumericTextBox ID="_txtExpSat" DbValue='<%# Convert.ToInt32(Eval("Saturday")) %>' runat="server" Width="50" MinValue="0" MaxValue="24" NumberFormat-DecimalDigits="1" Value="0"></telerik:RadNumericTextBox></td> </tr> </ItemTemplate> </asp:Repeater> <tr class="rgRow"> <td colspan="8" style="text-align:center"> <telerik:RadButton ID="_btnSubmitExpenses" runat="server" Text="Add Expense"></telerik:RadButton> </td> </tr> </tbody> </table> </div>Hi, thanks for looking at my question.
I am wanting to display numeric data that is retrieved to the RadGrid - GridBoundColumn with dashes inserted. Currently the column shows a 15 digit number, what I want to do is break up the number with dashes related to how we use the number in our system.
I have worked with RadMaskedTextBoxes so I am familiar with setting the mask and the display mask for the inclusion of dashes.
From what I understand I can use GridMaskedColumn, but that will only show the dashes in edit mode. As I am doing no editing, I just want it to display the data in the grid column with the dashes inserted.
Thank you for your time, Dale
