I have a working ajaxified grid to which I'm adding new PDF/Excel export capability. In the ItemCommand event I'm setting boolean isPdfExport or isExcelExport. It loops through ItemCreated and ItemDataBound for all expected items. It goes through PreRender for the Page and PreRender for the grid.
But then the web page with the grid re-renders.
There is no export. and the re-rendered page no longer includes the command buttons.
This is a nested page a user control containing a tab/multipage, and one of the pageviews containing a usercontrol that has this grid.
Now this might be silly but in the event handlers I specifically just tell it to return once I know we're exporting. Do I need to manually set the columns? For example:
if (isExcelExport) { if (e.Item is GridHeaderItem) { } if (e.Item is GridDataItem) { } if (e.Item is GridFooterItem) { } return; }The exact same behavior is seen for IE9 and FF12.
Using the very latest build of the controls.
Thanks!
Please can someone provide some guidance on why the following is not working.
<telerik:RadNumericTextBox ID="lnVoltage" runat="server" Label="Voltage (V): " Width="160" ToolTip="Three phase voltage" MinValue="0" MaxValue="1000" Value="400" NumberFormat-DecimalDigits="0" DataType="Double" ShowSpinButtons="true" ><ClientEvents OnValueChanged="singlePhVoltage" OnLoad="singlePhVoltage" /></telerik:RadNumericTextBox> <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"> <script type="text/javascript"> <!-- function singlePhVoltage(sender, eventArgs) { alert("in function"); } --> </script> </telerik:RadCodeBlock>
When I change the textBox value the function is not being called. Have tried several things.
protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e) { GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; string paramID = dataItem.GetDataKeyValue("Param_Id").ToString(); string sConnectionString = "My Connection String"; SQLDataSource1.SelectParameters["ModelIdParam"].DefaultValue = paramID ; SQLDataSource1.ConnectionString = sConnectionString; e.DetailTableView.DataBind(); } 
Folks,
Using VS2010 with RadControls for Ajax Q1 2012.
I need some help with following issues:
1) For Example, while using Command Item Template, I can hide the the EditSelected Command Button based on RadGrid1.EditIndexes.Count of Master Table, How can I accomplish the same result with Child Table (i.e. hide EditSelected Command Button based on RadGrid1.EditIndexes.Count of Child Table)? Basically I do not want to show Child Table EditSelected Command if there are no Child rows.
To get Child Table Edit Indexes count I tried to below line of code but is not working.
Visible='<%# RadGrid1.MasterTableView.DetailTables[0].EditIndexes.Count > 0 %>'>
Below is my Master/Detail Command Items Template.
<Mastertableview width="100%" commanditemdisplay="Top" datasourceid="SqlDataSource1" name = "Master" datakeynames="CustomerID"> <CommandItemTemplate> <div style="padding: 5px 5px;"> Custom command item template for Master table <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# RadGrid1.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Edit.gif" />Edit selected Master Row</asp:LinkButton> <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Update.gif" />Update Selected Master Row</asp:LinkButton> ''' ''' </div> </CommandItemTemplate> <DetailTables> <telerik:GridTableView DataKeyNames="OrderID,ProductID" DataSourceID="SqlDataSource3" Width="100%" runat="server" CommandItemDisplay="Top" Name="Details"> <CommandItemTemplate> <div style="padding: 5px 5px;"> Custom command item template for Child Table <asp:LinkButton ID="btnEditSelectedChildRow" runat="server" CommandName="EditSelected" Visible='<%# RadGrid1.MasterTableView.DetailTables[0].EditIndexes.Count > 0 %>'> <img style="border:0px;vertical-align:middle;" alt="" src="Images/Edit.gif" />Edit selected Child Row</asp:LinkButton> <asp:LinkButton ID="btnUpdateSelectedChildRow" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.MasterTableView.DetailTables[0].EditIndexes.Count > 0 %>'> <img style="border:0px;vertical-align:middle;" alt="" src="Images/Update.gif" />Update Selected Child Row</asp:LinkButton> ''' ''' </CommandItemTemplate> </telerik:GridTableView> </DetailTables> </Mastertableview>
2) Below link from Telerik Documentation shows Making a Grid Row Selected at All Times (similar to WinForms grids). How can I accomplish the same result with Child Table (I have multiple Child Tables)?
http://www.telerik.com/help/aspnet-ajax/grid-selected-row-at-all-times.html
3) Below Thread solution by Princy demonstrated Select Inserted/Updated row after performing command in Master Table. How can I accomplish the same result with Child Table (I have multiple Child Tables)?
http://www.telerik.com/community/forums/aspnet-ajax/grid/select-inserted-updated-row-after-performing-command.aspx
Thank you very much for any help.
Sincerely
gc_0620