Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, June 29, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Accessing cell values in datagrid
Andrew Grandin
Posts: 272
 
Accessing cell values in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jul 10 5:18 AM
Hi All,

I have the following code executed on the RowCommand event of my datagrid just to see if i can access each of the values in the cells of the row i select (theyll be needed later):

The problem is i dont want all of the columns in the datagrid visible to the user and when i make one of the BoundField columns visible=false the ChosenValue.Text of the related cell comes out as "" (blank). If i then set it to visible=true i get the actual text value out as normal. WHYYYY?????

int index = Convert.ToInt32(e.CommandArgument);

GridViewRow selectedRow = grdZACCOUNTPERSS.Rows[index];
TableCell chosenValue = selectedRow.Cells[0];
TableCell chosenValue2 = selectedRow.Cells[1];
TableCell chosenValue3 = selectedRow.Cells[2];
TableCell chosenValue4 = selectedRow.Cells[3];
TableCell chosenValue5 = selectedRow.Cells[4];
TableCell chosenValue6 = selectedRow.Cells[5];
TableCell chosenValue7 = selectedRow.Cells[6];
TableCell chosenValue8 = selectedRow.Cells[7];
string value = chosenValue.Text;
string value2 = chosenValue2.Text;
string value3 = chosenValue3.Text;
string value4 = chosenValue4.Text;
string value5 = chosenValue5.Text;
string value6 = chosenValue6.Text;
string value7 = chosenValue7.Text;
string value8 = chosenValue8.Text;
[Reply][Quote]
Andrew Grandin
Posts: 272
 
Re: Accessing cell values in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jul 10 6:41 AM
Im also getting the same issue retrieving the ButtonField cell value i have clicked on regardless of whether its visible or not.
[Reply][Quote]
Andrew Grandin
Posts: 272
 
Re: Accessing cell values in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jul 10 8:23 AM
Hi all, ive gotten past this problem now using the DataKeyNames value (the id). My next step is to populate session variables with the values to use when i open the next form but i get the rror: "The GridView 'grdZACCOUNTPERSS' fired event RowEditing which wasn't handled." Im new to the web development side of things but i thought all elements of the link button field click were done in the rowcommand event?

int index = Convert.ToInt32(e.CommandArgument);

GridViewRow selectedRow = grdZACCOUNTPERSS.Rows[index];

TableCell chosenValue4 = selectedRow.Cells[3];
TableCell chosenValue5 = selectedRow.Cells[4];
TableCell chosenValue6 = selectedRow.Cells[5];
TableCell chosenValue7 = selectedRow.Cells[6];

string value2 = grdZACCOUNTPERSS.DataKeys[0].Value.ToString();
string value4 = chosenValue4.Text;
string value5 = chosenValue5.Text;
string value6 = chosenValue6.Text;
string value7 = chosenValue7.Text;

//put details into session variables for populating edit screen
Session["ACCOUNTPERSID"] = value2;
Session["ZPerson"] = value4;
Session["ZFamily"] = value5;
Session["ZClass"] = value6;
Session["ZStatus"] = value7;

open();
}

protected void open()
{
if (DialogService != null)
{
// DialogActionItem
DialogService.SetSpecs(300, 300, "EditAccountPersonsResponsible", string.Empty);
DialogService.EntityType = typeof(Sage.Entity.Interfaces.IAccount);
DialogService.ShowDialog();
}
}
[Reply][Quote]
Andrew Grandin
Posts: 272
 
Re: Accessing cell values in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jul 10 8:33 AM
Starting to feel a little strange talking to myself here....

Ive stopped the error coming up (called my CommandName "Select" instead of "Edit").

But my .ShowDialog line is not opening the form.......

I know it mjst have something to do with autopostback but im still not 100% on my web development behaviours.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Accessing cell values in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jul 10 9:51 AM
Ensure the DIalogWorkspace item is added to the appropriate page
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/29/2025 6:44:51 PM