View Complete Post
Hi,
I have a gridview with Enable selection and Enable Paging equals to TRUE.
I also set the PageSize of my gridview to 4 so that I only displays 4 rows per page.
The problem is when I click the pager in the bottom of my gridview, my gridview is disappearing and no records appear.
Here is code behind of my gridview:
If e.Row.RowType = DataControlRowType.DataRow Then e.Row.Attributes("style") = "cursor:pointer" e.Row.Cells(2).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString)) e.Row.Cells(3).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString)) e.Row.Cells(4).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString)) e.Row.Cells(5).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString)) e.Row.Cells(6).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
Hi i have one asp.net textbox control..
and one dropdownlist inside gridview itemtemplate textbox..
what my problem..?
A Textbox36 has values some thing like this A1','A2','A3
i wirte this below query in sqldatasource1 and this sqldarasource1 is binded to gridview ItemTemplate Dropdownlist..
Select ItemName from Table1 where code in (@C)
Here @C im refering to Textbox36..
It show me the record if it has one value if its multiple like A1','A2','A3 it not showing/filtering ItemName data..
Whatz the probel?
i have a dropdownbox and a gridview
what I want is to have a list item which populates all data in a gridview.
I have tried using list item selected value=0 but to no avail.
what is the easiest way to achieve this?
Hi.
I'm creating a page where people can order several items from a list without having to press "edit" and "save" in between like you normally would in a gridview. The user writes down the quantity, and finally presses a "submit" button that saves the order.
I want the user to have a windows form (or excel) like eperience, so once the user puts in the quantity and moves on to the next item, either by TAB or by clicking on the TextBox, i make some calculations without the user beeing bothered with a full refresh or having to press a buton to execute the event, so I place the controls inside an UpdatePanel and use TextBox.TextChanged. The event runs code that calculates the sum for the row (price * quantity) and shows that in a column called "Sum", and updates a label in a fixed position with the new order total ("Total").
Any ideas on how to achieve this?
Right now I use a GridView with a templatefield for the Quantity and set the TextBox.TextChanged event to fire to make the calculations. The problem is that the focus then changes.
By using SmartNavigation or the ScriptManager.SetFocus I manage to retain focus on the TextBox that executed the Postback, but the user might have moved on to a textbox far down the gridview (thus causing the postback by leaving the previo
I've been asked to change an ASP.NET project to MVP Architecture - which may have something to do with what is going wrong.
I make the call through the architecture to the database which returns a dataset which I've verified is correct, (using dataset.writeXML() ) just before databinding to the gridview.
On one page everything works as expected (plus any post backs). Another page the Page_Load works correct and the gridview is populated, but any postbacks do not work- it retains the Page_Load's data. Then on the third page the GridView never shows though databinded. In all these cases I've checked that the Dataset is good data, and made sure to DataBind().
All three use the exact same logic. Any ideas or suggestions are greatly appreicated.
Thank you for your help.
public partial class UI_Admin_manageFirms : System.Web.UI.Page, IManageFirms_Pres { static ManageFirms_Pres presentation; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { presentation = new ManageFirms_Pres(this); presentation.getAllFirms(); } } protected void btnSearch_Click(object sender, EventArgs e) { string firmName = (txtFirmName.Text != string.Empty) ? txtFirmName.Text : null;
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend