Forms Data Controls :: Two Datagrids Which One Sent Command?

Feb 3, 2010

Using vb.net 2003,asp.net 1.1

I have a usercontrol on a page with 2 dynamic datagrids

on it with dynamic custom buttons, I get a questionID from

the buttons and that is ok.

What I need to know is which one of the grids gave me the questionID

so I can transfer to an approriate page.

For Instance:

If gridone was the sender/commandsource Then
Server.Transfer(pg1.aspx)
Else
Server.Transfer(pg2.aspx)
End If
Hope thats enough info,

View 1 Replies


Similar Messages:

Forms Data Controls :: Exporting DataGrids To Excel?

Jan 27, 2010

I currently have a data grid that exports to Excel on an ASP.NET page (which is used for reporting purposes) which works great until we put it under the stresses of a full scale production environment. With a multitude of users using it it seems to fill up the server memory quite quickly since the data thats being pulled is rather large. The requirements of the page are: The data needs to be queried and exported to excel, so theres no point to getting around that. I've noticed that xls files are rather large in comparison to their xlsx counter parts, using xlsx files would be fine for my application. I've noticed that xlsb (Excel binary) are even smaller(approx 25% the size of the their xls counterpart). Is there anyway to change my code to export to xlsb (first choice) or xlsx rather than xls? I think it has something to do with Mime Types but I'm not positive.

Here is the code that I'm using for exporting:

[Code]....

View 8 Replies

Forms Data Controls :: Adding Columns To Databound Datagrids?

Mar 5, 2010

I have started creating a DAL and have successfully bound my adaptor and the query within the adaptor to a gridview.

In lots of the intranet type apps I code in regular ASP for myself I often have a few columns with little icons in that do various things for that rows identity, such as drill down to more details, overlay a graph, text the person via an ajax call, send em an email via ajax and so on.

I think Ive got the hang of styling elements of each row depending on the data but Im completely at a loss as how to add a column which would have an icon whos url link properties would be dependant on the data.

EG

ROW1 | Name | Email Address | ICONFOR EMAIL(with a querystring id matching the row id) | ICON FOR MORE DETAILS (with a querystring id matching the row id)

I realise I am probably looking at this the wrong way but its difficult when you are almost on autopilot doing these things in classic ASP.

View 1 Replies

Forms Data Controls :: Handling Linkbutton Or Control In Nested Datagrids?

Mar 31, 2011

I have a Datagrid inside a Datagrid and I am trying to perform an action (open an pop-up window with related values in the querystring) when the inner datagrid control is clicked.In this simplified example I have 2 datagrids (datagrid1 and
datagrid2). In the second datagrid (datagrid2) I have a LinkButton (lbViewDetails) that I want to control what it does based on the value in the upper datagrid (datagrid1)'s lblRecordId value.

View 4 Replies

Forms Data Controls :: How To Determine The Exactly Datagrids Row And Column That Exists A Button

Feb 11, 2010

how can we determine the exactly datagrids row and column that exists a button that has been pushed?

Protected
Sub ela(ByVal
sender As
Object,
ByVal e
As
System.Web.UI.WebControls.DataGridCommandEventArgs)
' Dim id As Integer = datagrid1.DataKeys(CInt(e.Item.ItemIndex))
Dim id
As
Integer = e.Item.Cells.GetCellIndex
Response.Write(ID)
End
Sub

but how exactly we determine the row and the column?

View 6 Replies

Forms Data Controls :: Which Controls To Use - Dependent Datagrids Or Other

Mar 21, 2011

1) I should have one table-like column, where data are taken from database. It should contain sorted surname-name.

2) Every surname-name is a link to another table-like control. Content of it depans on surname-name that was clicked. This table will contain relatives of particular person.

Say, I have a column with John Anderson, George Washington etc. I click John Andreson and another table load data (relatives of John Anderson) - Anegline Jolly, Peter Pan etc.Then I click George Washingto and another table load data (relative of George Washington) - Zera Zebra, Aflen Aleks etc. Every relative should have a checkbox nearby. So the second table-like control will look like:

Angeline | Jolly | <some other information from db> | <checkbox>
Peter | Pen | <some other information from db> | <checkbox>
etc.

3) I have a button "A-D", When it is clicked, then first table is populated only with surnames with first letter from A to D. I have a button "E-G". When it is clicked, then table is populated only with surnames starting with letters E to G. I have nevere used DataGrids and other db binding controls. Which of them should I use?

View 3 Replies

Forms Data Controls :: Select Command In App So Could Execute The Command And Retrive The Data Into A String Variable?

Apr 9, 2010

i'm trying to issue a select command in my app soi could execute the command and retrive the data into a string variable.the problem is that this command is overloaded with DataSourceSelectArgument and i can't figure out what it is.i'm using sql server express and when issue a n insert command for example sq.Insert(); i have no problems.this the command that's holding me:

SqlDataSource sq = new SqlDataSource();
sq.ConnectionString = ConfigurationManager.ConnectionStrings["CustomerDatabaseConnectionString1"].ToString();
sq.SelectCommandType = SqlDataSourceCommandType.Text;
sq.SelectCommand = "SELECT * FROM CustomerTable where customerID = 1";
string result = sq.Select(some overload that's stopping me);

View 5 Replies

Forms Data Controls :: Gridview Update / Delete Command Like A Update Command?

Apr 26, 2010

how would i do my Gridview delete command like a update command?

im using a datasource... and my delete command is like my update command... so i can change the status into "INACTIVE"...

DeleteCommand="UPDATE ACCOUNT_MAINTENANCE SET am_status = 'INACTIVE' WHERE (accmain_no = @accmain_no)"

UpdateCommand="UPDATE [ACCOUNT_MAINTENANCE] SET [account_type] = UPPER(@account_type), [min_deposit] = @min_deposit, [min_capital] = @min_capital WHERE [accmain_no] = @accmain_no"

when i press my delete command at gridview... the status changed into "INACTIVE" but when i refresh or press f5... it automatically update the status into "INACTIVE" also...

View 3 Replies

DataSource Controls :: DataAdapter - Issue An INSERT Command Without SELECT Command?

Jan 6, 2010

I want to issue an INSERT command for an SQL Server table using DataAdapter without first issuing a SELECT command. Could anybody send me lines of code to handle this? Also how do i manage INSERT into selective table columns (I have 10 columns but i only want to update 2 of them)?

View 2 Replies

Forms Data Controls :: Gridview Row Command?

Feb 14, 2011

how i can perform Update Row in Gridview using Template Feild's

[Code]....

[Code]....

what will be next step as i know how to write update statement in databasejust want to know how i can catch the template feilds value and update on click of edit

[Code]....

View 15 Replies

Forms Data Controls :: GridView1 And Run The SQL Command

Mar 7, 2011

I started a C# web project in Visual Web Developer. I dropped a grid view in with designer and connected to my remote SQL database with the designer dialog based wizard. All is well there. I have in my program also a textbox where a user enters a zip code and clicks a button 'search'. When the user clicks search I want to run the SQL command "select * from flat_list where zipcode='userszipcode'". In other words the userszipcode is dynamic and different every time. It is my understanding I should use a SQLDataSource object but I do not know how.

View 1 Replies

Forms Data Controls :: How To Read Rows Data In Gridviews Row Command Event

Dec 8, 2010

how can we read all rows data in rowcommand event of gridview?

View 2 Replies

Forms Data Controls :: Display SQL Command Being Sent To Server (incorrect Data In Gridview)

Aug 9, 2010

I'm having a problem with the results of a Gridview. The SQL statement I use works in SQL Management Studio, but in my .NET app, it only display a few of the results. The part of the SQL that seems to be effecting it is in the where statement I use like:

[Code]....

@Consultant comes from the value of a selected dropdown.

View 2 Replies

Forms Data Controls :: Fire The Data List ItemBound Command When Ever Click On Image?

Jul 6, 2010

i have created one context menu when ever i Righ click on image that contex menu will come.my problem is how to track that image id when ever i Right click on that image.if i dont give the context menu the Item command is firing ,if give context menu it is not working.here is my code:

[Code]....

C#code:

[Code]....

View 1 Replies

Forms Data Controls :: How To Edit Command In Datalist

Jun 11, 2010

I have started practicing a little on asp.net c# and I have a very simple problem which i cannot figure out. I have th following datalist code and below the code I have attached a screenshot of how does it look like.

task.aspx code:

[Code]....

task.aspx.cs

[Code]....

[Code]....

View 1 Replies

Forms Data Controls :: Command To Get The Value Of A Particular Cell In The GridView

Jan 28, 2010

I am using this command to get the value of a particular cell in the GridView: Question: Do you know why I do not get a value in strValue ?
There is definitely value in the grid.

protected void grid_RowCommand(object sender, GridViewCommandEventArgs e)
{
//proceed only if the Details button is clicked...
if (e.CommandName.ToLower() == "details")
{
//Get the row index selected...
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow row = grid.Rows[index];
string strValue = grid.Rows[index].Cells[1].Text;
}

View 5 Replies

Forms Data Controls :: Possible To Get Row Index In Row Command Evend

Feb 13, 2010

is it possible to get row index in row command evend?

View 2 Replies

Forms Data Controls :: Cannot Open Db Con On Gridview Row Command?

Mar 8, 2011

inside row command event of gridview i want to call a function which will open db conectn and run a stored proc to fetch value.but this gives error.

View 3 Replies

Forms Data Controls :: Command In A Nested Repeater?

Dec 4, 2010

Users can reply to a comment made in the parent repeater by clicking a link that opens a popup that inserts a row in the replies table. This is then displayed in the repeater as soon as the lists refresh. What I need to do is have a Delete comment link that only the user that inserted the reply can utilize. How do you get the command or onclick from a ImageBUtton that is in the child segment?

[Code]....

The Enabled='<%# isEnabled() %>' disables the button foe users that are not logged in...that seems to work OK

View 1 Replies

Forms Data Controls :: Run A Command (such As Turn Text Red?

May 7, 2010

I need to run a command (such as turn text red) if todays date is 30 days or more from the date in the gridview. How would I accomplish this? I can't really think of a way as I'm not good coding with dates.

View 8 Replies

Forms Data Controls :: Command Name & Argument In Datalist?

Jun 13, 2010

Command name and argument didn't work in datalist ! am I doing something wrong ??

[Code]....

Here is my datalist buttons;

<td><asp:Button ID="buttonytl" CommandName="Purchase" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "YtlArgument")%>' style="font-size: x-small;" runat="server" Text="Book Transfer" /></td>[Code]....

View 2 Replies

Forms Data Controls :: Use An Update Command Within GridView?

Sep 26, 2010

I am trying to use an Update Command within my GridView. I need to find the "FindControl" for the Edit Command textboxes.

Ie. When the user clicks the Edit button, the row is populated with dropdown boxes, textboxes, etc for editting. Then when the user clicks on Update (button) and the GridView1_RowCommand function is activated with 'if (e.CommandName == "Update")' statement with my FindControl. etc. and my sql UPDATE command statements are used. How do I convert my FooterRow info to my Edit FINDCONTROL info?

This is what I have:

[Code]....

View 3 Replies

Forms Data Controls :: Gridview Update Command In C#?

Aug 6, 2010

i am using edit,update,cancel command in gridview, i need to update value in bound field how to retreive that value.

View 7 Replies

Forms Data Controls :: SQL Command Via Button In Gridview?

Mar 30, 2010

I have a simple table, ID,Fruit,StockSo, the rows are its primary key (ID), Fruit type (Orange, Apple etc) and Stock (1 is it is in stock, 0 if it is out of stock).I have a grid view on a page which lists the rows.What I would like is a button that executes a SQL command based on the row.(The command is just an update to change the Stock field from 1 to 0).The query i tried was UPDATE [Table] SET [Stock] = 0 WHERE id = @id

View 6 Replies

Forms Data Controls :: Edit Command Is Not Working?

Nov 9, 2010

I have a gridview. Every time i click on the Edit command, it caused the Delete command fired. This gridview works fine on the test site, but it does not work on the live site.

Do you know what causes this issue?

View 5 Replies







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