Forms Data Controls :: Get Two Values Of A Gridview For Separate Operations?

Jan 13, 2010

i am displaying a gridview from db(SQL2005), which display leave table where employee apply leave and submit to admin. Viewing the leave table in gridview the admin sanction or rejected their leave request, by clicking the check box displays on each gridview rows and click on sanction or rejected button.

here i am sending SMS to the employee number displaying in the gridview (taking the employee phone number and send SMS).. this i have done using bulk SMS services, i have taken the number using the following
if check conditions...

but now what the problem is i have to delete the gridview rows.. i am using the same employee phonenumber to delete the corresponding gridview, but if suppose the single employee applied for two or more leave, the gridview display all leave for the single employee, the admin have sanction only one leave for that employee.. so if he checks the check box and click on OK button.. it have to delete the corresponding row as well as send SMS to the phonenumber of the employee.. Other leaves of the same employee display in the gridview.. i used the following coding

Protected Sub bttnsanction_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles bttnsanction.Click
Dim row As GridViewRow
Dim selection As New ArrayList()
For i As Integer = 0 To GridView1.Rows.Count - 1.........

I am using the Sno as primary key in leave table.. where i want to delete the corresponding row which sends SMS to employee number also the delete the row of corresponding Sno.. i have to get the corresponding gridview row sno in the delete store procedure..

View 2 Replies


Similar Messages:

Forms Data Controls :: GridView - Check Box Perform 2 Operations Simultaneously?

Apr 9, 2010

I have placed Chekc box in Gridview when i select the check box can perform 2 operations simultaniously one is entire recordset is populated into form fileds and second one is can delete the selected record permanently from database table.following code for this fuctionality.

GridviewCode
<asp:GridView ID="GVData" runat="server" Height="75px" Width="76px" CaptionAlign="Top"
Font-Size="Medium" EnableModelValidation="True" [code]....

View 3 Replies

Data Controls :: CRUD Operations In GridView Without Using Database

Sep 20, 2015

I only need one textbox inside gridview and other operational buttons like add , edit , delete in gridview. I just need that these buttons can save the data in datatable like we do :

DataTable dt = new Datatable();

I don't want to save it in database at this stage. CRUD Operations using datatable inside gridview is my aim.

View 1 Replies

Data Controls :: CRUD Operations On GridView Using JQuery AJAX

Dec 2, 2013

I have seen a sample from the Author of this BlogĀ URL....this works fine but how to apply CRUDE operations & Is it possible to set CommandName/ Command Argument using JQuery in asp.net using C#?

View 1 Replies

Data Controls :: Separate Out And Search Comma Separated Values In Database Columns In SQL Server

Dec 27, 2012

I have one table in sql server called student_info

In this table keys kills column contain value like below

'c,c++c#'
'c++,c,c#'
'c,c++,c#,asp.net'

etc...

I want to search the student information based on keyskills like naukri

1.Any keyskills from textbox1
2.All keyskills from textbox2
3.Except keyskills from textbox3

When I enter c,c++ or c++,c in textbox1 then it will dispaly all the student whose have c,c++ keyskill

How to achieve this.

View 1 Replies

Forms Data Controls :: Create A Gridview In A Separate Class?

Feb 9, 2011

Does anyone know if it is possible to create a gridview from a class on a seperate webpage?

So I have webpage 1, that calls Class 1, in Class one there will be a Select Query that will call some info from a database and then return it to a gridview. The gridview wont work obviously as it is in the class and not on webpage 1.

Is there anyway to reference the fact I would like the gridview created on webpage1?

View 1 Replies

Forms Data Controls :: Populating GridView On Separate Page?

Dec 10, 2010

I'm generating a number of calculated arrays in the code behind a ButtonClick event on a particular page. Stuff like:

Dim Delta(,) As Double = New Double(nPer - 1, 0) {}
For i = 0 To nPer - 1
Delta(i, 0) = Delta_Buckets(i, 0) + fwds(i, 0)
Next

What I want to do is convert this to a datatable and use this as a datasource for a gridview in a different page.

View 2 Replies

Forms Data Controls :: Combine Gridview Columns Under One Column And In Separate Rows

Nov 29, 2010

I have a couple of things that are not working with my Gridview:

1) I've managed to display 3 columns in one column (see code above) but the data is separated by commas, how can I display each data item in separate rows.

2) How can I make the data unique, as I have added the distinct command which I configured in my SQL data source

3) I need the rows to not display nulls, but at the moment it isn't displaying the row if one of the columns is null?

[Code]....

View 3 Replies

Data Controls :: Print Each GridView Row On Separate Page

Jan 15, 2014

in my webform --

when user input the valid data then there will be generate a areport and that report displays in a gridview itemtemplate. when i print the report, only first page data printed properly on a predesigned designed paper. and others are not. then how to print each rowdata of gridview on per page.

View 1 Replies

Forms Data Controls :: How To Extract Gridview Old Values And New Values

Aug 4, 2010

i take data from Sqlserver database , and my prblem is that i want to get old and new values from gridview and base on that i want to change there background colors .. i try gridview rowupdating , editing ,updated Events but when i debug no break point hit and there was no value in ViewSate that i declare ,

View 2 Replies

Data Controls :: How To Save GridView Deleted Rows To Separate Table

Nov 11, 2013

I have made a call logging application in which i have authorised a normal user to edit update and delete from the gridview.But i want to give the admin person rights to see all the complaints deleted updated edited..i have thought a lot but all in vain havent found.

View 1 Replies

DataSource Controls :: Separating Two Values From Stored Procedure Resultset And Assigning Them To Two Separate Label?

May 6, 2010

Stored procedure:

[Code]....

This code returns MdaID and StateID, I want to assign them in this manner:

MdaIDLabel.Text = MdaID and StateIDLabel.Text = StateID, but I am not sure how to separate the two values and then to assign them as I have indicated above. Since my function has a "void" return -

MdaIDLabel.Text = GetMdaState({0}, 64114);

StateIDLabel.Text = GetMdaState({1}, 64114); - will not satisfy the requirement.

I am working with VS 2008 VWD, .NET 3.5 SP1, C#, SQL Server 2008 Express

View 3 Replies

Web Forms :: Insert Array Values Into Separate Rows?

Mar 10, 2011

[Code]....

I am trying to insert My_Array_Values into database on seperate rows, ie;

1 ASP_NET
6 Java
8 Perl

View 2 Replies

Data Controls :: Check For NULL Values Sum And Display Values In GridView Cells

Apr 3, 2013

i am using a gridview in my web page,i used to bind the database records to the gridview..my columns are name,empid,company name,pl leave,sl leave,total leave taken here total leave taken is not a database fields,in the page i want to fill the records once loaded pl leave and sl leave is added and display in the total leave taken column..it working properly when all pl ans sl columns fill with numbers,if some pl and sl leave having blank values.it showing an error like input sting was not in correct format..this is my code

<Columns>

<asp:BoundField DataField="slno" HeaderText="SerialNo"
SortExpression="slno" />
<asp:BoundField DataField="ecode" HeaderText="Employee Code"
SortExpression="empcode" />
<asp:BoundField DataField="ename" HeaderText="Employee Name"

[code]....

View 1 Replies

DataSource Controls :: Display Results From Two Separate Tables In Two Separate Databases?

Jan 14, 2010

I have access to two seperate databases (mySQL) located on two servers. I need to get the data, link the tables on a key field and display the results in a datagrid. My challenge is that if the search criteria changes for the display it affects rows returned from on table and should thus automatically affect the linked table and resulting data returned.

what the best approach would be to achieving this? So far I have set up a dataset with a dataadapter and table for each connection and then linked the tables in the dataset. The problem that I'm having is getting the linked resultsets to work.

On my form I have the datagrid with two Objectdatasources one for each dataadapter and i believe that's where I'm going wrong...

View 1 Replies

Data Controls :: How To Log All Operations Performed In SQL Server Database

Oct 17, 2012

Today my client has asked me to do Data Base Log,that is if any change done like,Insert or Edit or delete that has to be viewable in Log Report,if somebody did even a Small change that also has to be keep track and has to display in Log Report,like the recent activity is so and so and so and so person has done this.

View 1 Replies

Forms Data Controls :: Click On The Child Gridview And Get The Values Of The Parent Gridview?

Oct 25, 2010

I'm lost. I have a sub gridview in a gridview. In subGridbiview I have a button. How do I can clicking the button and get values outside the gridview? The subgridview not present the events ...

------------------------Gridview 1------------------------------------------

| cell(0) | cell(1) | Cell(2)| Cell(3 - ITEM TEMPLATE) | -
| | | | # # # SubGridview1 ######### -
! x1 | Y1 | Z1 | # Cell(0) ! Button #-
! | | | ######################-
------------------------------------------------------------------------------
| | | | # # # SubGridview1 ######### -
! x2 | Y2 | Z2 | # Cell(0) ! Button #-
! | | | ######################-
------------------------------------------------------------------------------

how do I click on the child gridview and get the values of the parent gridview? no events in the child gridview no number indexrow on the parent gridview I'm lost.

View 6 Replies

Forms Data Controls :: Decrypt One Gridview Column Values Before Displaying It In The Gridview?

Mar 8, 2011

I have one filed that is encrypted using Rajindal algorithm and stored in MSSQL db.When I retrieve that column in gridview it's displayed in encrypted. I have the code that decrypts it but the problem is:How can I all loop throw this column values in the gridview and decrypt them all and display it in the gridview decrypted.See my code below:

[Code]....

View 9 Replies

Forms Data Controls :: How To Get The Textbox Values To Gridview And Gridview To Database

Jul 19, 2010

how to get the values text box values to gridview..

if i enter any text in text box those values should display in gridview.

after entering of 2 or 3 records, i will click on save then all the values of grid should insert in to DAta Base.

i dont want to get the values form Database to Gridview.

how to retrive the values form Database to Gridview.

i just want to display the values which are there in Textbox...

View 3 Replies

Forms Data Controls :: Loop Gridview To Update Values In Gridview To Stored Procedure?

Jan 14, 2010

I would like to ask a question on the visual basic codes to loop the gridview to retrieve the values and based on the values, it will be provided as parameters to update to the database table using stored procedure.

Firstly, I have a gridview named grvProduct. The page (ui) will be loaded with data from the database with the use of stored procedures. And only certain values can be edited through the use of template in gridview. So based on those edited values, I'm supposed to pass these values as parameters to the stored procedure which will then update a database table.

Let say, I have 3 records retrieved from the database and displayed in the gridview. And I would like to edit a values in the 3 records, how do I do batch update and pass those parameters to the stored procedure? I went to debug and step through the visual basic codes and realised there were too many arguments specified because I actually loop the gridview.

Below is my visual basic codes:

[Code]....

Below is my Stored Procedure code:
[Code]....

I believe it is the error in the looping of the gridview which results that I could not batch update the data/values.

View 3 Replies

Forms Data Controls :: Getting Values Of Row In A Gridview?

Aug 23, 2010

I have a problem that can't find a way to do it, I have a gridview with this columns:

ID | AreaName | CostCenter

with the "Enable Editing" option check and what I want to do is to get the values of areaname and costcenter and assign them to a label control so I can use the values for something else, for example:

ID AreaName CostCenter

1 Multiconector 1025

2 One Conector 2065

3 Plug & Play 1445

4 Splitter 1598

5 FNI 4298

and if I hit the edit button of the row with ID 4, assign the values to the labels lblAreaName = Splitter and lblCostCenter = 1598

Before I edit them, and so on with the rows I want to edit.

View 9 Replies

Forms Data Controls :: Want To Have A Separate Column?

Oct 27, 2010

This code works:

[Code]....

However, how this extra column merge code. I do not want to have a separate column.
Something like:

[Code]....

I want to combine two columns into one column and displayed as ButtonType = "link".

View 2 Replies

Forms Data Controls :: Getting Values From The Columns In A Gridview?

Feb 9, 2010

I want to get the values from a cell in a gridview so can I do that without selecting a row. Its something like this I have a drop downmenu and based on the value selected in the dropdown menu I have to change the presentation of gridview without going to the database.

View 3 Replies

Forms Data Controls :: Gridview Rowupdating Contains Old Values

Jul 13, 2010

Here is the code with the issue:

[Code]....

The value of txtName, for example, contains the value prior to editing and clicking update. Here is the grid code:

[Code]....

View 17 Replies

Forms Data Controls :: Read The Values From GridView?

Nov 15, 2010

Snap shot of asp code

<Columns>
<asp:BoundField DataField="DeptarmentID" HeaderText="DeptarmentID" ReadOnly="true" />
<asp:BoundField DataField="DepartmentCode" HeaderText="DepartmentCode" />
<asp:BoundField DataField="DepartmentName" HeaderText="DepartmentName" />
<asp:BoundField DataField="Active" HeaderText="Active" />
</Columns>

snap shot of page behind

protected void GridViewDept_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = GridViewDept.Rows[GridViewDept.EditIndex];

string code = ((TextBox)(row.Cells[2].Controls[0])).Text;
string name = ((TextBox)(row.Cells[3].Controls[0])).Text;
bool active =((TextBox)(row.Cells[4].Controls[0])).Text=="True"?true:false;
//bool active = ((CheckBox)(row.Cells[4].Controls[0])).Checked;
int id = System.Convert.ToInt32(row.Cells[1].Controls[0]);
}

I get error on the last line stating out of index error, how do get the value which is not set editable in the gridview

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved