|
-
May 14th, 2008, 01:23 PM
#5
Re: Need logic on gridview column
99 ways to skin a cat.
But you're right, this can be done in your layers. Slap on the wrist for us. 
You'll need to create a method in your codebehind, which takes two values - the cog and the dsc. This method should check cog for null and if it's null, return a string 'INDEX' else return the dsc value.
You then call this codebehind method from your inline code in the gridview.
It will look something like
<%# MethodName(Container.DataItem("cog"), Container.DataItem("dsc")) %>
Not sure about the exact syntax, but it's a matter of calling a method, passing the values and having the MethodName() return a string.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|