Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
F

Flavia A

@Flavia A
About
Posts
20
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to traverse a datarow in as datatable and modify that datarow
    F Flavia A

    i managed it . i took a non editable column of the grid view in the sesion and used it as unique key for modification. traversed the datatable foreach (DataRow datar in dtvalues.Rows) { if (datar[0].ToString() == Dl_NO_Hold) { datar[1] = txtFname.Text; datar[2] = txtLName.Text; } } and replaced it

    ASP.NET tutorial question

  • how to traverse a datarow in as datatable and modify that datarow
    F Flavia A

    I have a gridview to whom i have provided a datatable as a datasource i hve some modifications to be made in one of the rows that i select from the gridview the same modifications should be made in the datatable how do i go abt with it.

    ASP.NET tutorial question

  • page containing datatable has to be built and rebuilt again and again
    F Flavia A

    hello, I have a gridview in a webpage where i use a datatable to populate the gridview,but only if the website is built and rebuilt the webpage works properly without exceptions,as the datatable does not retain any data that has been asign to it on the button click. Following is the code,

    static DataTable dtvalues = new DataTable();
    public static IICDServices icdObj;
    protected void Page_Load(object sender, EventArgs e)
    {
    if (!IsPostBack)
    {

        }
    
    }
    
    private void Createdatatable()
    {
        dtvalues.Columns.Add("DL\_No");
        dtvalues.Columns.Add("F\_Name");
        dtvalues.Columns.Add("M\_Name");
        dtvalues.Columns.Add("L\_Name");
        dtvalues.Columns.Add("Unit");
        dtvalues.Columns.Add("Birth\_Date");
        dtvalues.Columns.Add("Mobile\_No");
        
    }
    

    //on the add button click i want all data from the textboxes to be assigned to the datatable.
    for which i have written the following code

    {

                        DataRow drvalues = dtvalues.NewRow();
                        drvalues\["DL\_No"\] = TxtDLNO.Text.ToUpper();
                        drvalues\["F\_Name"\] = txtFname.Text;
                        drvalues\["M\_Name"\] = txtMName.Text;
                        drvalues\["L\_Name"\] = txtLName.Text;
                        drvalues\["Unit"\] = ddlUnit.SelectedItem.Text;
                        drvalues\["Birth\_Date"\] = Gmdatepicker3.Date;
                        drvalues\["Mobile\_No"\] = TxtMobileNo.Text;
                        dtvalues.Rows.Add(drvalues);
                        GridView1.DataSource = dtvalues;
                        GridView1.DataBind();
                        TxtDLNO.Text = "";
                        txtFname.Text = "";
                        txtMName.Text = "";
                        txtLName.Text = "";
                        TxtMobileNo.Text = "";
                    }
    

    on the submit button click i want to redirect this page back to itself but it throws an exception as the page has npt been rebuilt.
    please help me out with this.
    thanks.

    ASP.NET help

  • how to display data in grid without sending the data in the database
    F Flavia A

    am sorry for the trouble am new to asp.net ,but as the data in the grid is not from the database but from the textboxes in the form.as the data is not actually in the database i cannot delete the row by using a query.That row has to be out of the grid as soon as i pess the delete button,add on the click of a button that is outside the gridview,i want all the data to go into the database.ie am using the gridview so that the user can modify any entry that he made in the textboxes and delete the rows that he wants and send it to the database later..

    ASP.NET css database debugging tutorial question

  • how to display data in grid without sending the data in the database
    F Flavia A

    thanks i will try it and tell you.

    ASP.NET css database debugging tutorial question

  • how to display data in grid without sending the data in the database
    F Flavia A

    thanks for the reply.. if i used 2 link button and both have the same command name select on the selected index changed of the gridview i am not able to trace which button has been clicked if the delete or the modify.more over if i use the command name update for the delete button and call the GridView1_RowUpdating event i cannot retain the the gridview1.selectedrow.cells[1].text. for deleting where i update the delete status to be Yes. As it is a web application on the button click outside the grid cannot retain the gridview1.SelectedRow.cells[0].text cannot be retreived and it throws an enception. what should i do is there anything optional to a gridview. Please reply soon

    ASP.NET css database debugging tutorial question

  • how to display data in grid without sending the data in the database
    F Flavia A

    In a web based application i have some textboxes and on the button click the data from the textboxes should be displayed in a gridview or some other conrol where the data can be displayed, modified such that the data be sent back to the textboxes for modifying and back into the gridview .Another button for deleting the data and finally on the click of a button that is outside the gridview the data from it should go into the database. I was able get the data into the gridview from the textboxes to the grid and back using the select "textbox1.text" as data1,"textbox2.text"as data2 etc.and was able to modify the data.but for deleting the row i was not able to trace which row is getting deleted and am not able to sent the data to the database on the button click outside the gridview.What should I do? is there some way i can use the gridview itself for the same or i should use some other conrol ?

    ASP.NET css database debugging tutorial question

  • Index was out of range. Must be non-negative and less than the size of the collection.
    F Flavia A

    Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index the exception was generated when i was trying to assign a textbox value to a gridview. How to resolve this problem.

    ASP.NET css database help tutorial

  • can we directly assign a value to row in the gridview
    F Flavia A

    can we directly assign a value to a particular cell of row in the gridview. using the select statement select 'flavia' as name, 'A'as surname i bound the data to the gridview.. but on the selected Index changed of the grid view i want the data to be displayed in the text boxes ..which i managed using the gridview1.SelectedRow.cells[1].text= txtName.text; but after modifying the textbox txtName for (i = 0; i < GridView3.Rows.Count; i++) { string b if (GridView3.Rows[i].Cells[1].Text.ToString()== s) { GridView1.Rows[i].Cells[1].Text = txtName.Text; } } but it is giving an exception {System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection}

    ASP.NET css database

  • is there some way i can give the RowIndex as the data key in a gridview
    F Flavia A

    i actually want to use to link buttons in one gridview .both the buttons perform different actions on click. earlier i had done this by using the protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) event for one button and for the other button i used protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { Session["sr_no"] = Convert.ToString(GridView1.DataKeys[e.RowIndex].Value); } here i had set a serial no from the data base as the data key and it worked fine but my current table does not have any serial no or a counter so am not able to set the datakey.

    ASP.NET question

  • is there some way i can give the RowIndex as the data key in a gridview
    F Flavia A

    is there some way i can give the RowIndex as the data key in a gridview?

    ASP.NET question

  • is the some way we can have 2 link button in a grdview?
    F Flavia A

    Can i have 2 link buttons one for update command and the other for select command on the selected index change of a gridview.that is if an update link has been pressed for that particular row the update query will fire and on the select command another command will fire..

    ASP.NET database question announcement

  • 2 select command in one gridview
    F Flavia A

    Thanks it worked

    ASP.NET database announcement

  • 2 select command in one gridview
    F Flavia A

    hi all, In my gridview i have to select as well as update for which am using two link btns,am using a sr_no as the datakeyname and when i write string s = GridView1.SelectedValue.ToString(); for getting the sr_no it works fine in the selected index changed but i cannot get the sr_no when am using it for updation in the gridview1_rowupdating() event ... is there any way i can get the selected value of the gridview as it is important that i have 2 buttons in the gridview .

    ASP.NET database announcement

  • bind data from textboxes to griview
    F Flavia A

    i guess the data can be retreived from the database in a gridview then the data can be edited and sent back to the database.But what i want is in one form if there are 2 textboxes and 3 dropdown lists the data selected in the dropdown and text boxes should be available in the gridview or something similar for editing before going into the database and later it can go into the database.ie a temprory storage which later gets finalized and then sent to the database. This is possible in the window application using datagrid.

    ASP.NET database

  • bind data from textboxes to griview
    F Flavia A

    hi, Is there some way in which i can bind the data of the textboxes,dropdownlists in a gridview,make it available for editing and then finally send it to the database. the user should be able to see all the data that he has entered in the textboxes (temporarily)

    ASP.NET database

  • Can we have a masked textbox in asp.net website
    F Flavia A

    Is there any way in which i can have a masked textbox in asp.net website? i want 4 alphabetical characters to be entered in the begining of the textbox and the remaining to be numeric . or can i have a javascript code to validate the textbox.

    ASP.NET csharp javascript asp-net question

  • customized reports with calendars and dropdown list
    F Flavia A

    Hello all, I need to customize my reports where in I can make a selection of a from date and a to date from 2 calendars and select the appropriate process from a dropdown list in the webform and the pass it to the report using report viewer for the same .Can You please give me a detailed procedure or if possible the code for this??

    ASP.NET question

  • Error
    F Flavia A

    So what should i do for it.because My others projects run successfully and nver give this error.How will i get the required file.

    ASP.NET help announcement

  • Error
    F Flavia A

    I encountered this error in the web .config please help me out. Could not load file or assembly 'Microsoft.Data.SqlXml, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. Am encountering this problem in the web .config thanks in anticipation.

    ASP.NET help announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups