473,379 Members | 1,235 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hl.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hl)

hDelete.Text = "Delete"
hDelete.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hDelete.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hDelete)
grdlst.Columns.
************************************************** *********************

The code on the target page Page Load event is;
************************************************** ***
Dim coll As System.Collections.Specialized.NameValueCollection
coll=Request.QueryString

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.Keys(0).ToString).ToString
DatabaseFetchDataForEditPage()
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 1730
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.Keys(0).ToString).ToString

str_LLClientID = coll.Get(coll.Keys(1).ToString).ToString

Thank you !!!!!!

Greg Hazzard

"Bill Borg" <an*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
How about another parameter in each querystring, e.g.

"wfrmClientData_theme.aspx?Type=Edit&LLCLientID={0 }"
"wfrmClientData_theme.aspx?Type=Delete&LLCLientID= {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.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hl.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hl)

hDelete.Text = "Delete"
hDelete.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hDelete.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hDelete)
grdlst.Columns.
************************************************** *********************
The code on the target page Page Load event is;
************************************************** ***
Dim coll As System.Collections.Specialized.NameValueCollection
coll=Request.QueryString

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.Keys(0).ToString).ToString
DatabaseFetchDataForEditPage()
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
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"...
3
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,...
4
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. ...
3
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...
1
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...
2
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...
2
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...
12
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...
5
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.