Hi Guys, I have a data bound grid-view with action buttons for updating and deleting items in a users shopping cart. The grid-view uses a 'SelectMethod' in the code behind to generate the data. The problem I'm having is that every time I edit some data in the grid-view, the data is successfully persisted, but then an error is thrown before the page even completes loading. **Here's the exception details:** *System.InvalidOperationException:* *A public method with the name '' was eithernot found or there were multiple methods with the same name on the type 'ASP.posworx_cart_aspx'.* What makes it even more confusing …

Member Avatar
Member Avatar
+0 forum 12

consider the following classes (similar to the ones i am working with): [CODE] namespace Project { public class Person { public Person() { } private string name; public string Name { get { return name; } set { name = value; } } private List<Pet> myPets; public List<Pet> MyPets { get { return myPets; } set { myPets = value; } } } } [/CODE] [CODE] namespace Project { public class Pet { public Pet() { } private int numberOfPaws; public int NumberOfPaws { get { return numberOfPaws; } set { numberOfPaws = value; } } } } [/CODE] Lets …

Member Avatar
Member Avatar
+0 forum 4

Hello , I want to show some images in my app using php and universal-image-loader-1.9.1 Iam an stater and I have collected some code from another apps, My problem is when i use the same code to add the gallery in my app it was showing application stopped. If any one can help me to fisx this problem that will be help ful. Below I have added the php code and I want o us universal-image-loader to show the image in the app. In my app there was an gallery area for showing images in albums and recently added pictures …

Member Avatar
Member Avatar
+0 forum 1

Hai , I used gridview for student list , and export it to pdf. But the 2nd column is not need to export. I make the gridview's 2'nd column visible false. [CODE] GrdStudent.Columns[2].Visible = false; [/CODE] But pdf file contain this column. Can you help me to solve it. Regards, sreevidya

Member Avatar
Member Avatar
+0 forum 6

Hello,I've a gridview control and inside a cell, i've put 3 radiobuttons under a same group. I'm not able to get which radio button is selected through checked property. As checked property is giving false always, when i check it with breakpoint. How can i get a the selected value from a group of radiobuttons. Thank You

Member Avatar
Member Avatar
+0 forum 4

Hey, I wanted to generate a report (GenReport.aspx) containing the list of GridView items filtered from the entered data from report.aspx. When I was debugging, I selected the data I wanted to filter, but it shows me all the data on the table instead of the data filtered on the table. GenReport.aspx.cs protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn() { ColumnName = "AppTypeName", DataType = typeof(string) }); dt.Columns.Add(new DataColumn() { ColumnName = "name", DataType = typeof(string) }); dt.Columns.Add(new DataColumn() { ColumnName = "designation", DataType = typeof(string) }); dt.Columns.Add(new DataColumn() { …

Member Avatar
Member Avatar
+0 forum 6

I have problems for loading data from draft in my project. On the homepage (Default.aspx) under the tab "Drafted", when I want to edit the drafted data on another page (DraftRegister.aspx), it didn't show up the drafted data, just only empty and default values. ![help_3.png](/attachments/large/4/4c1db3ae92ce5a11c6dd89399934131a.png "align-center") Can help me check what's wrong with the source code and code behind of DraftRegister.aspx? Source code: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <br /> <div class="form-group"> <table> <tr> <td style="width: 70px"> <asp:Label ID="StatusLabel" runat="server" Text="Status:" Font-Bold="True"></asp:Label> </td> <td style="width: 317px"> <asp:RadioButtonList ID="AppTypeList" runat="server" RepeatDirection="Horizontal" Width="300px"> <asp:ListItem>New</asp:ListItem> <asp:ListItem>Transfer</asp:ListItem> <asp:ListItem>Existing</asp:ListItem> </asp:RadioButtonList> </td> <td> <asp:RequiredFieldValidator ID="AppTypeValidator" runat="server" Display="Dynamic" …

Member Avatar
Member Avatar
+0 forum 2

Hi Guys I have a GridView inside a tabcontainer with some bound data fields , i have set Autogeneratecolumns=false; ShowHeaderwnenempty=true; But i can't see header or grid anymore when run but it is visible on design mode, but if i manualy bind it gridview.datasource=dataset; gridview.databind(); it is showing header and data, Has any body come a cross similer strange situation ? thanks regards sumith

Member Avatar
+0 forum 0

hello good people, i have created atab control and added a gridview in it. When i run it this is how it shows: ![42e98ae1ab28208a1d5964503f00cecd](/attachments/large/4/42e98ae1ab28208a1d5964503f00cecd.png "42e98ae1ab28208a1d5964503f00cecd") i have tried adjusting the heights and widths of both but tono avail. here is my code: <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="421px" style="z-index: 1; left: 212px; top: 271px; position: absolute" Width="933px"> <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Neurology"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="Neuro" style="z-index: 1; left: 242px; top: 367px; position: absolute; height: 309px; width: 870px"> <Columns> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Designation" HeaderText="Designation" SortExpression="Designation" /> <asp:BoundField DataField="Qualification" HeaderText="Qualification" SortExpression="Qualification" /> <asp:BoundField DataField="Shift" HeaderText="Shift" SortExpression="Shift" /> …

Member Avatar
Member Avatar
+0 forum 2

Hi! I have problem with my payroll program, I'm beginner in c#. how can I connect or how to Automatic update the datagridview in form1 after I insert a new info from form2? I cant add the `updategrid();` in the form2 because there is no datagridview, only the textboxs. like when I click the button with ADD command from the form2, the newly inserted info doesn't appear in the form1's datagridview. I have to click the Refresh button in form1 to appear the new inserted values. Thanks in advance! here my codes: "you will see I have commented out the …

Member Avatar
Member Avatar
+0 forum 1

Dear All Statement 1 doesn't get its new value it retrives the existing value only i want it to get new value i am entering on RowUpdating event TextBox mytext = ((TextBox)DgridComminv.Rows[DgridComminv.EditIndex].Cells[7].Controls[0]); string a = mytext.Text;

Member Avatar
Member Avatar
+0 forum 1

i have a xml file.that doesnot have attributes in the tags.for that i created the xslt file and then used xml datasource and put in a grid view.now i need to search for text in the grid view and need to put the results in grid view again.it is possible.suggest some code explainations i am new to asp.net???

Member Avatar
Member Avatar
+0 forum 2

Hi All, How can I export data from gridview to excel sheet in ASP.net?

Member Avatar
Member Avatar
+0 forum 10

hi there im a total newb at this programming language is there a way 3 databases can be in one datagridview? I can only insert 1 database in a datagrid

Member Avatar
Member Avatar
+0 forum 1

When selecting from DataGridView as program line below: Diameter = DesignationsDataGridView.Rows(e.RowIndex).Cells(0).Value I get following exception message box:- System.ArgumentOutOfRangeException was unhandled Message="Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" If I select 'continue' from message box then I return to datagridview for further attempt. Please can anyone tell me how to deal with this exception? (other than not to click on header, of course)

Member Avatar
Member Avatar
+0 forum 2

whenever i delete, insert or update my datasource, gridview does not refresh. However, when i manually refresh my page, then it does. How to make it such a way that it refreshes by it's own whenever I insert,delete or update anything from my datasource. [B]P.s[/B]: DataBind() method is not working

Member Avatar
Member Avatar
+0 forum 9

Hi Guys, Hope you can help. (Bit of a N00b still).. I've written an Functioning Program (Good start!) However, I was wondering if there is a way for the data that is being shown currently in the Grid view to be shown with 'Decimal Places? The Data is Being pulled in via ODBC from a Access DB. The Table Column has been setup as 'DataType' = Currency with Decimal Places Defaulted to '1'. When looking at the data in the DB the Decimal Places are in the correct place but when pulling the data via ODBC into the GridView it …

Member Avatar
Member Avatar
+0 forum 5

I have a Rad gridview that databinds and popluates date according to a seacrh. There is a linkbutton that i want to be able to change on column from saying false to true or vice-versa. Please help protected void rgUsers_ItemCreated(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem dataItem = (GridDataItem)e.Item; LinkButton btn1 = (LinkButton)dataItem["btnChange"].Controls[0]; btn1.Click += new EventHandler(btn1_Click); } } protected void rgUsers_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem dataItem = (GridDataItem)e.Item; LinkButton btn1 = (LinkButton)dataItem["btnChange"].Controls[0]; btn1.CommandArgument = string.Format("return Click(' {0}';", (e.Item as GridDataItem) ["CustomID"].Text); } } void btn1_Click(object sender, EventArgs e) { …

Member Avatar
Member Avatar
+0 forum 1

Hey Experts >>>>> Please help me out .... i want this type of grid to be generated horizontally ... but unfortunately in asp.net gridview is not showing horizontal options ..... another interesting fact is that all the products shown in this page is UNIQUE ... and Pagination is also included ... how ??? please help me ... here is the link www.mxonline.com.pk check its center product grid on the main page .... i want to use SQL database in this project . someone told me to use datalist ... but "if for e.g there are 20 unique products showing on …

Member Avatar
Member Avatar
+0 forum 1

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { DataContext db = new DataContext(); using (var SI = new DataContext()) { var search = (from l in SI.**** orderby l.*** descending where l.**** == l.**** select l).First(); Session["ID"] = search.***; Response.Redirect("http://localhost:63558/****.aspx"); } } So here I have it so when I hit "Edit" on the gridview it takes me to a new page. I want to be able to grab an ID from that row and save as session. Say the person has an ID of 3 I click edit on him and then it shows 3 as the ID. But right …

Member Avatar
Member Avatar
+0 forum 1

I've never worked with the Select, Delete, Update functions in a GridView before. I only want to use the Delete function, which I currently only have setup. I have the following information being show in my gridview: degree, institution, graduation date, dissertation, id(hidden).

Member Avatar
Member Avatar
+0 forum 2

i'm trying to hide EDIT button in a column when i click it but it doesn't. Actually, i manually created EDIT button in gridview, it worked :) but now after clicking edit button i want it to disable so i can put UPDATE button while editing. i tried but it doesn't. Code: .aspx <asp:GridView ID="gvTest" runat= "server" OnRowDataBound="gvTest_RowDataBound" OnRowEditing="gvTest_Edit" DataKeyNames="stid"> <Columns> <asp:TemplateField HeaderText="Delete" > <ItemTemplate> <asp:Button ID="btnDelete" runat="server" Text="Delete" onCommand="gvTest_Delete" CommandName="deleterow" CommandArgument='<%# Container.DataItemIndex %>' /> <asp:Button ID= "btnEdit" runat="server" Text="Edit" CommandName="edit" OnCommand="gvTest_ButtonChange" CommandArgument='<%# Container.DataItemIndex %>'/> . . . . . . . . using System; using System.Collections.Generic; using System.Linq; using …

Member Avatar
Member Avatar
+0 forum 6

like i am setting a button i gridview which when i click then shoulf turn row into editable mode, i could use Automatic EDIT button of Gridview but i didn't on purpose, it went good when i developed a delete button, +1, but stuck with this edit , it throws error: ***The GridView 'gvTest' fired event RowEditing which wasn't handled.*** code: .cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; public partial class Default2 : System.Web.UI.Page { public String constrng = "Data Source=PALERIDER-PC;Initial Catalog=Login;Integrated Security=True"; protected void Page_Load(object sender, EventArgs e) { …

Member Avatar
Member Avatar
+0 forum 4

Im creating an application where some data should be populated in a gridview and then user should be able to update it and then same should be replicate to the database. So i have put a gridview and configure it to connect to my database which is base on access 2007. On grid view configuration i have enable the option INSERT, UPDATE and DELET statement based on my select statement. I have also put my access file in the "App_Data" folder in the application. When run the application the gridview work perfectly fine, it display all the information which is …

Member Avatar
Member Avatar
+0 forum 4

Hello Experts, First of all I don't know if i am on the right track.If I am not please suggest your best,easy options :) What I am trying to do is the following. I have a web page which is included with textboxes I have also a database inside there is the following informations Devices Feature1 Feature2 Device1 10 15000 Device2 15 12000 Ok Feature1 input will be the TextBox1.Text Feature2 input will be the TextBox2.Text input For Example user will write 12 to the textbox1 and will click to "calculate" button Output will be transforming the label into Result …

Member Avatar
Member Avatar
+0 forum 3

public void kraGridView_RowDataBound(object sender, GridViewRowEventArgs e) int totalPercent = 0; if (e.Row.RowType == DataControlRowType.DataRow) { Label lblWeigh = (Label)e.Row.FindControl("lblWeigh"); // totalPercent += Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "lblWeigh")); int total = int.Parse(lblWeigh.Text); totalPercent += total; } else if (e.Row.RowType == DataControlRowType.Footer) { Label lblTotalPercentage = (Label)e.Row.FindControl("lblTotalPercentage"); // e.Row.Cells[5].Text = totalPercent.ToString(); lblTotalPercentage.Text = totalPercent.ToString(); } }

Member Avatar
Member Avatar
+0 forum 6

screenshot for edit gridview : http://img829.imageshack.us/img829/2304/06v6.png screenshot for update gridview : http://img801.imageshack.us/img801/3417/j4p1.png this is my code inside tag <body> : <form id="form1" runat="server"> <asp:GridView ID="GridView1" runat="server" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowUpdating="GridView1_RowUpdating" OnRowEditing="GridView1_RowEditing" OnRowDeleting="GridView1_RowDeleting" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" onselectedindexchanged="GridView1_SelectedIndexChanged"> <RowStyle BackColor="#FFFBD6" ForeColor="#333333" /> <Columns> <asp:CommandField ShowEditButton="True" ShowDeleteButton="True" /> <asp:BoundField DataField="p_user_name_id" Visible="false" HeaderText="p_user_name_id" /> <asp:TemplateField Visible=true HeaderText="Username"> <EditItemTemplate> <asp:TextBox ID="textBox1" Width="100%" Height="100%" runat="server" Text='<%# Bind("username") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("username") %>' Font-Size="Medium"></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField Visible=true HeaderText="Birth Place"> <EditItemTemplate> <asp:TextBox ID="textBox2" Width="100%" Height="100%" runat="server" Text='<%# Bind("birth_place") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("birth_place") %>' Font-Size="Medium"></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="username" …

Member Avatar
+0 forum 0

Public Class Adminpage Dim result As MsgBoxResult Public Sub shw() End Sub Private Sub Adminpage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load clr() End Sub Public Sub clr() patientno.Text = "" lasttxt.Text = "" Firsttxt.Text = "" Middletxt.Text = "" ComboBox1.Text = "" gencbad.Text = "Select..." MaskedTextBox1.Text = "Select..." baltxt.Text = "" End Sub Public Sub edit_record() setCmd("SELECT * FROM admin WHERE No = '" & temp1 & "'") setOrs() patientno.Text = Ors.Fields("No").Value lasttxt.Text = Ors.Fields("Last").Value Firsttxt.Text = Ors.Fields("First").Value Middletxt.Text = Ors.Fields("Middle").Value ComboBox1.Text = Ors.Fields("Gender").Value gencbad.Text = Ors.Fields("Age").Value MaskedTextBox1.Text = Ors.Fields("Visit").Value baltxt.Text = Ors.Fields("Payment").Value End Sub Public Sub …

Member Avatar
Member Avatar
+0 forum 1

How to get the imgbtnView image button in gridview to display the row of data? i try to use modelpopupextender but the targetid is invalid because the image button is in the gridview. when click on imgbtnView, solistPanel will be display now i cant display the solistPanel. please help <table cellpadding="5" cellspacing="5"> <tr> <td> <asp:GridView ID="outstandingList" runat="server" CellPadding="2" AutoGenerateColumns="False" DataKeyNames="Cust_No" DataSourceID="outstandingList_SqlDataSource" AllowPaging="True" EmptyDataText="No Outstanding Found" PageSize="20"> <Columns> <asp:BoundField DataField="Cust_No" HeaderText="Customer No" SortExpression="Cust_No" /> <asp:BoundField DataField="Cust_Name" HeaderText="Customer Name" SortExpression="Cust_Name" /> <asp:BoundField DataField="Cust_CreditLimit" HeaderText="Credit Limit" SortExpression="Cust_CreditLimit" /> <asp:BoundField DataField="Total Cost" HeaderText="Total Cost" SortExpression="Total Cost" /> <asp:BoundField DataField="Outstanding" HeaderText="Outstanding" SortExpression="Ouststanding" /> <asp:TemplateField> <ItemTemplate> …

Member Avatar
Member Avatar
+0 forum 2

So I have a Datatable that is supposed to show information. I have it working in Windows Forms but tranfering it over to asp.net so a little diffrent. I do not understand GridViews that much. So any help would be appreciative. I will not give everything away. I did a break and noticed that all the information was getting recieved but the gridview was not showing up. All of this is on page load. dr = dt.NewRow(); try { dt.Rows.Clear(); dt.Rows.Clear(); dt.Rows.Clear(); dt = new DataTable("MyTable"); dt.Columns.Add("Scale"); dt.Columns.Add("Cases"); dt.Columns.Add("Cases2", Type.GetType("System.String")); dt.Columns.Add("Cases3", Type.GetType("System.String")); dt.Columns.Add("Cases4", Type.GetType("System.String")); dt.Columns.Add("Cases5", Type.GetType("System.String")); dt.Columns.Add("Cases6", Type.GetType("System.String")); dt.Columns.Add("Cases7", Type.GetType("System.String")); …

Member Avatar
Member Avatar
+0 forum 1

The End.