473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid to generate additional querystring collection item to pull off on the target page for input into a condition statement test variable...??

I am trying to figure out how to add an additional value to a querystring
collection so that when I click on a datagrid cell, there will be a key to
distinguish it from another column's functionality. I have Edit and Delete
columns that each contain the ColumnID for the record I want to either edit,
or delete. When I pull the item of the collection on the target page's
page_load event, I will be able to either invoke a delete or an edit method
based on the info passed into the page.

The databinding code on the source page containing the grid is;
*************** *************** *************** *************** ***********
hl.Text = "Edit"
hl.DataNavigate UrlFormatString =
"wfrmClientData _theme.aspx?LLC LientID={0}"
hl.DataNavigate UrlField = "intUniqueClien tNum"
grdlst.Columns. Add(hl)

hDelete.Text = "Delete"
hDelete.DataNav igateUrlFormatS tring =
"wfrmClientData _theme.aspx?LLC LientID={0}"
hDelete.DataNav igateUrlField = "intUniqueClien tNum"
grdlst.Columns. Add(hDelete)
grdlst.Columns.
*************** *************** *************** *************** ***********

The code on the target page Page Load event is;
*************** *************** *************** ********
Dim coll As System.Collecti ons.Specialized .NameValueColle ction
coll=Request.Qu eryString

if coll.Count > 0 and Not Ispostback then 'Is a value passed in from
datagrid and not a post back?
str_LLCLientID = coll.Get(coll.K eys(0).ToString ).ToString
DatabaseFetchDa taForEditPage()
b_EditPage = True
*************** *************** *************** *************** **

I would like to be able to pull off of the collection an additional value
that is generated from the grid which will allow me to distinguish between
Edit and Delete functionality. I would like not to have to use a Session
Variable.

Thank you,
-Hazz (or does not hazz) the software solution
Nov 18 '05 #1
1 1749
Oh so simple it even hurts Bill. But it feels so good to have a solution
!!!!

And on the receiving end, there is;
str_querytype = coll.Get(coll.K eys(0).ToString ).ToString

str_LLClientID = coll.Get(coll.K eys(1).ToString ).ToString

Thank you !!!!!!

Greg Hazzard

"Bill Borg" <an*******@disc ussions.microso ft.com> wrote in message
news:14******** *************** ***********@mic rosoft.com...
How about another parameter in each querystring, e.g.

"wfrmClientData _theme.aspx?Typ e=Edit&LLCLient ID={0}"
"wfrmClientData _theme.aspx?Typ e=Delete&LLCLie ntID={0}"

...then parse out the type in your target page.

Bill

----- Hazzard wrote: -----

I am trying to figure out how to add an additional value to a querystring collection so that when I click on a datagrid cell, there will be a key to distinguish it from another column's functionality. I have Edit and Delete columns that each contain the ColumnID for the record I want to either edit, or delete. When I pull the item of the collection on the target page's page_load event, I will be able to either invoke a delete or an edit method based on the info passed into the page.

The databinding code on the source page containing the grid is;
*************** *************** *************** *************** *********** hl.Text = "Edit"
hl.DataNavigate UrlFormatString =
"wfrmClientData _theme.aspx?LLC LientID={0}"
hl.DataNavigate UrlField = "intUniqueClien tNum"
grdlst.Columns. Add(hl)

hDelete.Text = "Delete"
hDelete.DataNav igateUrlFormatS tring =
"wfrmClientData _theme.aspx?LLC LientID={0}"
hDelete.DataNav igateUrlField = "intUniqueClien tNum"
grdlst.Columns. Add(hDelete)
grdlst.Columns.
*************** *************** *************** *************** ***********
The code on the target page Page Load event is;
*************** *************** *************** ********
Dim coll As System.Collecti ons.Specialized .NameValueColle ction
coll=Request.Qu eryString

if coll.Count > 0 and Not Ispostback then 'Is a value passed in from datagrid and not a post back?
str_LLCLientID = coll.Get(coll.K eys(0).ToString ).ToString
DatabaseFetchDa taForEditPage()
b_EditPage = True
*************** *************** *************** *************** **

I would like to be able to pull off of the collection an additional value that is generated from the grid which will allow me to distinguish between Edit and Delete functionality. I would like not to have to use a Session Variable.

Thank you,
-Hazz (or does not hazz) the software solution

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2322
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="top"> <ItemTemplate><%# CType(Container.DataItem("DateStatut"),DateTime).ToString("yyyy-MM-dd")...
3
4404
by: MikeR | last post by:
Hello - I pass an item to an asp page as a query string. The value has a space in it. On the receiving page, the value displays fine just as a variable, but if I use it to pre-fill an input box, only the first word displays. Ex: The URL- http://myserver.com/test.asp?Item=Blue%20Vase The page <http> <body>
4
5343
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. Currently everything is working. I can find the updated rows/columns by parsing the posted data collection against the DataGrid DataSource. However,...
3
4863
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
1
4295
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls (watch the layout, some have child controls):
2
315
by: Hazzard | last post by:
I am trying to figure out how to add an additional value to a querystring collection so that when I click on a datagrid cell, there will be a key to distinguish it from another column's functionality. I have Edit and Delete columns that each contain the ColumnID for the record I want to either edit, or delete. When I pull the item of the...
2
3173
by: Daniel Walzenbach | last post by:
Hi, I created an ASP.NET Datagrid where a single row can be selected by clicking anywhere on the row (according to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchTopQuestionsAboutASPNETDataGridServerControl.asp, Selecting Rows by Clicking Anywhere). Private Sub DataGrid1_ItemDataBound(ByVal...
12
1989
by: Daniel Walzenbach | last post by:
Hi, I want to display a Label in a DataGrid according to some condition. I therefore check whether the condition is true in the ItemDateBound EventHandler of the DataGrid. Unfortunately the conversion is extremely costly in performance. Does anybody know how I could set the label (of the whole content of the TableCell) to .Visible = False...
5
2018
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated one row, all of them were updated so i immediatelly figured out that i have to include the id of every entry in the update statement. This is where...
0
5101
by: Richard Gregory | last post by:
Hi, I have the wsdl below, for an Axis web service, and when I select Add Web Refernce in Visual Studio the proxy is missing a class representing the returnedElementsType (see reference.cs below the wsdl). This complex type is a collection of another complex type(elementType), and the Reference.cs has an array of these rather than the...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.