This is a migrated thread and some comments may be shown as answers.

RadGrid BindQuery

1 Answer 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ghadeer
Top achievements
Rank 1
ghadeer asked on 17 Nov 2008, 11:03 AM

Hi All

I have a select query like:

SELECT

case when EMPHOSPCD=00 then 'NMC'when EMPHOSPCD=01 then 'RCH' when EMPHOSPCD=02 then 'RNH'end as Hospital,

 

EMPNO

,CERTIFICATE,PURPOSE,EXTENSION,DESTINATIONADDRS,ACCOMPANY,TELEPHONE,TRAVEL_DATE,RETURN_DATE

 

 

from APPS.DM_STAFFREQUEST where

 

CRT_HOSPCD

='00' and CRT_EMPNO=600989 order by CRT_DATE desc

 

I want to bind it to radgrid with gridbouncolumns.


CERTIFICATE field have string values seperated by comma,and if one of these values is (travel permit),

 fields(DESTINATIONADDRS,ACCOMPANY,TELEPHONE,TRAVEL_DATE,RETURN_DATE ) have value , otherewise they will be empty

 

my question is, is there any way to write aquery to select these field just if CERTIFICATE field contain (travel permit) value

 

or away to bind columns to radgrid depend on the value of other column
please help me ASAP

ghadeer

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Yavor
Telerik team
answered on 20 Nov 2008, 08:49 AM
Hi ghadeer,

You can limit the selection via a Where clause, to select only non null values, or values equal to a particular number/string.

Best wishes,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
ghadeer
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or