Welcome Guest Search | Active Topics | Sign In | Register

Edit cell or row values based on conditions. Options
Alvin Sinha
Posted: Thursday, February 26, 2009 1:46:35 AM
Rank: Member
Groups: Member

Joined: 2/24/2009
Posts: 16
Hi

I want to update row and cell value based on some condition. Following are my doubts on this.

1)I am getting one column from databse as IsEditable, if it contains value "1" then entire row should be in editable and if value is "0 then entire row should be grayed out (not editable).

2)In one column i am displaying "Download Documnets" link. Right now it displaying into all rows. I want to show this cell option if and only if rows have file associated or available. If no file available then cell value should be blank with no not link available for that row. I am getting Document ID column from database. If Document_Id have value it means row have file assocaited and link should be display as "Downlaod Documents".If Documen_Id value is null it means no docunment is available for this row and no link should be available.

As these are high priority task so any help will be appreciated!!


Code which showing Download Document links:--


Code: Visual Basic.NET
<eo:CustomColumn MinWidth="200" Width="200" AllowSort="True" DataField="DownloadDocuments" ClientSideGetText=""
                        ClientSideBeginEdit="OpenPopup" HeaderText="Download Documents" DataFormat="&lt;a href=&quot;downloaddocuments.aspx?cID={0}&quot; target=&quot;_blank&quot;&gt;Download Documents&lt;/a&gt;">
                    </eo:CustomColumn>


Thanks,
Alvin
eo_support
Posted: Thursday, February 26, 2009 9:11:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

As to your questions:

1. You will need to have a new build (please see your private message for download location). That build supports ClientSideBeginEdit on all columns. You can handle that event on the client side to enable/disable edit based on whatever logic you have;

2. You need to read the documentation first. We have pointed out in our previous post that you do not need to use CustomColumn. The code you posted still use CustomColumn. Please read the documentation and make sure you understand all columns types. We will not be able to help you futhter if you do not wish to spend the time to understand the fundamentals;

As to display/hide the link, the easiest way is to do the formating in your SQL SELECT statement or on your DataSet object. You would basically formating your result set as such so that if it has documentID, you have a full link element. Otherwise null. The Grid does not give you the ability to conditionally format data. However every step before the Grid gives you plenty of opportunities to do so.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.