aspxgridview

How to show a message box from edit/add new button click of a devexpress gridview

房东的猫 提交于 2019-12-12 05:43:09
问题 I have a devexpress nested gridview. Both the master and detail gridviews have link buttons for edit and add new activities. After either inserting new row or updating an existing row, I have to show a message box saying "Your update has been saved successfully". This could be a simple javascript alert box or a message displayed on the page itself. Both the gridviews use objectdatasource. I tried the following codes in the RowUpdated event of both the gridview and the objectdatasource: System

How can I get the previous row in gridview rowdatabound?

只谈情不闲聊 提交于 2019-12-12 04:53:26
问题 I would like to check the previous row data if it is equal to -- , if it is not equal to -- then I would enable button in the next row protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (DataBinder.Eval(e.Row.DataItem, "time_start").ToString() == "--") { Button btn = ((Button)e.Row.FindControl("Edit_Button")); btn.Enabled = false; } } } 回答1: You can also do it like this using GridView1.Rows[e.Row.RowIndex - 1] .

Checking if a aspxgridview Master-Detail has any row checked in Client Side

a 夏天 提交于 2019-12-12 04:31:55
问题 I need to check if there is any row checked in a Master-Detail AspxGridView. With the master I can use grid.GetSelectedRowCount()>0 But how can I check it with the detail rows using JS? Thanks in advance 回答1: to accomplish this you need to assign a unique ClientInstanceName to each detail grid and then access that particular detail grid on client side using the assigned ClientInstanceName, which in turn should include the master's grid row ID part, ie detailGrid_1 for the first row,

Total of GroupSummary to TotalSummary in DevExpress

社会主义新天地 提交于 2019-12-12 04:15:47
问题 In my ASPxGridView , I getting total simply IPOTEK column in footer with this code; <TotalSummary> <dx:ASPxSummaryItem FieldName="IPOTEK" SummaryType="SUM" ShowInGroupFooterColumn="IPOTEK" DisplayFormat="n0" /> </TotalSummary> And i getting average value of IPOTEK column when i grouping in Group's footer. <GroupSummary> <dx:ASPxSummaryItem FieldName="IPOTEK" SummaryType="AVERAGE" ShowInGroupFooterColumn="IPOTEK" DisplayFormat="n0" /> </GroupSummary> Everything is OK. For example when i

How to add a static row to a gridview

旧城冷巷雨未停 提交于 2019-12-11 11:42:44
问题 ok so my goal is to add only 1 static row under the gridview headr EXAMPLE: |coloumnHeader1|coloumnHeader2|coloumnHeader3|coloumnHeader4| |----------------------static Row---------------------------| |DataBoundField|DataBoundField|DataBoundField|DataBoundField| |DataBoundField|DataBoundField|DataBoundField|DataBoundField| |DataBoundField|DataBoundField|DataBoundField|DataBoundField| |DataBoundField|DataBoundField|DataBoundField|DataBoundField| |DataBoundField|DataBoundField|DataBoundField

ASP.NET - Get gridview edit row to span across columns

喜欢而已 提交于 2019-12-11 09:43:59
问题 I've got a grid control with 6 columns. I use the EditItemTemplate fields to display edit data and I'd like to customize this if possible. Right now, the EditItemTemplate will show any control that I put in there but it only displays it in the column in which the template is in. How can I get it to span across all 6 columns? For instance, the 6 columns are: First Name | Last Name | Address | City | State | Zip and when the user clicks the Edit button (in each row), I'd like to show those 6

TextBox in GridView not holding its value on postback

六月ゝ 毕业季﹏ 提交于 2019-12-11 07:45:27
问题 I have a gridview on a .NET forms application, and on postback, I am not seeing the values entered in the textbox within a gridview. ASPX: <asp:GridView ID="gvItems" runat="server" AutoGenerateColumns="false" ShowHeader="false" DataKeyNames="ItemId" EnableViewState="true"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="txtItem" runat="server" Text="0" EnableViewState="true" /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="ItemId" /> </Columns> </asp:GridView>

Aggregating one side of a many-to-many and bind to gridview in Entity Framework

被刻印的时光 ゝ 提交于 2019-12-11 06:45:31
问题 I have a many-to-many structure in place in my database / Entity Framework model. CompanyNotice (M-M) CompanyNoticesLocations (M-M) Locations I am trying to aggregate the Locations for one CompanyNotice and return a comma-separated LocationName for the Locations. I have tried using the following code to aggregate the LocationName: if (!IsPostBack) { using (var context = new ALEntities()) { var query = from c in context.CompanyNotices.Include("Locations") select new { c.CompanyNoticeHeading, c

devexpress row deleting event

江枫思渺然 提交于 2019-12-11 03:37:46
问题 Deletebutton doesn't raise OnRowDeleting event i created devexpress gridview on runtime it s working good until click the delete button ,when i click it ,it doesn't work .on debug it doesnt fire "rowdeleting". What can i do? dovizgrd.Width = Unit.Percentage(50); dovizgrd.EnableCallBacks = false; dovizgrd.Settings.ShowFooter = false; dovizgrd.Settings.ShowColumnHeaders = false; dovizgrd.Settings.ShowFilterBar = GridViewStatusBarMode.Hidden; dovizgrd.SettingsPager.Visible = true; dovizgrd

Calculate GroupSummary Value programmatically in DevExpress

谁都会走 提交于 2019-12-10 22:24:08
问题 In my code; I calculate 3 GroupSummary value with ASPxGridview ; <dx:ASPxSummaryItem FieldName="RISK_EUR" SummaryType="SUM" ShowInGroupFooterColumn="RISK_EUR" DisplayFormat="n0" /> <dx:ASPxSummaryItem FieldName="IPOTEK" SummaryType="AVERAGE" ShowInGroupFooterColumn="IPOTEK" DisplayFormat="n0" /> <dx:ASPxSummaryItem FieldName="MV_BERND" SummaryType="SUM" ShowInGroupFooterColumn="MV_BERND" DisplayFormat="n0" /> When i grouping , I want calculate another column's GroupSummary value like;