473,386 Members | 1,873 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,386 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 1731
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...

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.