or
<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" DataSourceID="sqlDataFeedGrid" GridLines="Both" AllowPaging="True" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True" OnInsertCommand="RadGrid1_InsertCommand" OnEditCommand="RadGrid1_EditCommand" OnPreRender="RadGrid1_PreRender" OnUpdateCommand="RadGrid1_UpdateCommand"> <PagerStyle Mode="NextPrevAndNumeric" /> <MasterTableView DataSourceID="sqlDataFeedGrid" AutoGenerateColumns="False" DataKeyNames="Id" CommandItemDisplay="Top"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" /> <telerik:GridBoundColumn DataField="Id" HeaderText="Datafeed ID" SortExpression="Id" UniqueName="Id" Visible="False" MaxLength="10" /> <telerik:GridBoundColumn DataField="IPAddress" DataType="System.String" HeaderText="IP Address" SortExpression="IPAddress" UniqueName="IPAddress" /> <telerik:GridBoundColumn DataField="Name" DataType="System.String" HeaderText="Name" SortExpression="Name" UniqueName="Name" /> <telerik:GridBoundColumn DataField="Status" DataType="System.String" HeaderText="Status" SortExpression="Status" UniqueName="Status" /> <telerik:GridBoundColumn DataField="Configs" DataType="System.Guid" HeaderText="Configs" SortExpression="Configs" UniqueName="Configs" /> <telerik:GridBoundColumn DataField="Logs" DataType="System.String" HeaderText="Logs" SortExpression="Logs" UniqueName="Logs" /> <telerik:GridBoundColumn DataField="setupInstruction" DataType="System.Guid" HeaderText="Install Instruction" SortExpression="setupInstruction" UniqueName="setupInstruction" /> <telerik:GridBoundColumn DataField="execInstruction" DataType="System.Guid" HeaderText="Execute Instruction" SortExpression="execInstruction" UniqueName="execInstruction" /> <telerik:GridBoundColumn DataField="Description" DataType="System.String" HeaderText="Description" SortExpression="Description" UniqueName="Description" /> <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton" /> </Columns> <EditFormSettings EditFormType="Template"> <EditColumn UniqueName="EditColumn"></EditColumn> <FormTemplate> <table cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse;"> <tr class="EditFormHeader"> <td colspan="2" style="font-size: small"> <b>Datafeed Details</b> </td> </tr> <tr> <td></td> <td></td> </tr> <tr> <td>ID</td> <td> <asp:TextBox ID="txtId" runat="server" ValidationGroup="Datafeed" ReadOnly="true" Text='<%# Bind("Id") %>' /> </td> </tr> <tr> <td>IP Address </td> <td> <asp:DropDownList ID="ddlMachineId" EnableViewState="true" AutoPostBack="true" runat="server" DataSourceID="sqlMachineId" DataTextField="IPAddress" DataValueField="ID" OnSelectedIndexChanged="ddlMachineId_IndexChange" /> <asp:Label ID="lblHostingName" runat="server"></asp:Label> </td> </tr> <tr> <td>Data Agent</td> <td> <asp:DropDownList ID="ddlDataAgentID" runat="server" DataSourceID="sqlDataAgentId" DataTextField="Name" DataValueField="ID"> </asp:DropDownList><asp:Button ID="addAgent" runat="server" Text="Add" Width="55px" OnClick="addAgent_Click" /> <asp:ListBox ID="agentsList" runat="server" Height="91px" Width="194px"></asp:ListBox> </td> </tr> <tr> <td>Datafeed Name</td> <td> <asp:TextBox ID="txtName" runat="server" ValidationGroup="Datafeed" Text='<%# Bind("Name") %>' /> </td> </tr> <tr> <td>Status</td> <td> <asp:TextBox ID="txtStatus" runat="server" ValidationGroup="Datafeed" Text='<%# Bind("Status") %>'></asp:TextBox> </td> </tr> <tr> <td>Config File</td> <td> <asp:FileUpload runat="server" ID="configFile" Width="229px" /> <asp:HyperLink runat="server" ID="confResult" Target="_blank" /> </td> </tr> <tr> <td>Logs Path</td> <td> <asp:TextBox ID="txtLogs" runat="server" ValidationGroup="Datafeed" Text='<%# Bind("Logs") %>'></asp:TextBox> </td> </tr> <tr> <td>Install Instruction</td> <td> <asp:FileUpload runat="server" ID="setupFile" Width="229px" /> <asp:HyperLink runat="server" ID="setupResult" Target="_blank" /> </td> </tr> <tr> <td>Execute Instruction</td> <td> <asp:FileUpload runat="server" ID="execFile" Width="229px" /> <asp:HyperLink runat="server" ID="execResult" Target="_blank" /> </td> </tr> <tr> <td>Description</td> <td> <asp:TextBox ID="txtDescription" runat="server" ValidationGroup="Datafeed" TextMode="MultiLine" Height="58px" Width="303px" Text='<%# Bind("Description") %>'></asp:TextBox> </td> </tr> </table> <asp:Button runat="server" ID="btnUpdate" Text='<%#(Container is GridEditFormInsertItem) ? "Insert":"Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert":"Update" %>' /> <asp:Button runat="server" ID="btnCancel" Text="Cancel" CausesValidation="False" CommandName="Cancel" /> </FormTemplate> </EditFormSettings> </MasterTableView> <ClientSettings> <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents> </ClientSettings></telerik:RadGrid>protected void RadGrid1_EditCommand(object sender, GridCommandEventArgs e) { if (e.CommandName != RadGrid.EditCommandName) return; GridDataItem gridDataItem = e.Item as GridDataItem; var ddlMachineId = gridDataItem.FindControl("ddlMachineId") as DropDownList; var ddlDataAgentID = gridDataItem.FindControl("ddlDataAgentID") as DropDownList; var agentsList = gridDataItem.FindControl("agentsList") as ListBox; var confResult = gridDataItem.FindControl("confResult") as HyperLink; var execResult = gridDataItem.FindControl("execResult") as HyperLink; var setupResult = gridDataItem.FindControl("setupResult") as HyperLink;}

Is possible open two different Popup Edit Form (EditMode="PopUp") in one RadGrid?
For each row adding TWO button like:
<telerik:GridEditCommandColumn ItemStyle-Width="1%" UniqueName="EditCommandColumn1" ButtonType="ImageButton" EditImageUrl="../../file/edit.gif" CancelText="Cancel" EditText="Edit" />
open two (but also three or four) different WebUserControl (file .ascx) that on "OK" button return values in the standard
"Private Sub RadGrid1_UpdateCommand" function, easily like the normal edit popup-mode
??
Is possible? Any example?
}
protected void btnExcelExport_Click(object sender, EventArgs e) { HttpContext.Current.Response.Buffer = true; HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default; HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=Overview" + System.DateTime.Now.ToString("MMMddyyyy") + ".xls"); HttpContext.Current.Response.Charset = string.Empty; this.Page.EnableViewState = false; StringWriter _writer = new StringWriter(); HtmlTextWriter _textwriter = new HtmlTextWriter(_writer); btnExcelExport.Visible = false; Label1.BackColor = Color.White; Label1.ForeColor = Color.Black; Label2.BackColor = Color.White; Label2.ForeColor = Color.Black; Label3.BackColor = Color.White; Label3.ForeColor = Color.Black; Master.HeaderbackColor = Color.White; Master.HeaderForeColor = Color.Black; Master.LinkVisiblity = false; Master.NavigationVisibility = false; this.Page.RenderControl(_textwriter); HttpContext.Current.Response.Write(_writer.ToString()); HttpContext.Current.Response.Flush(); HttpContext.Current.Response.Close(); }
