Dear Support,
I am getting above error when radmenu is getting its datasource dynamically. please check the below code.
Dataset Table Structure
Radmenu Binding.
Please help me urgent.
Thanks
Rizwan
I am getting above error when radmenu is getting its datasource dynamically. please check the below code.
Create
PROCEDURE
[dbo].[HGetSubMenu]
(
@categoryid
int
)
AS
begin
DECLARE
@
level
int
/* Creating
temporary
table
for
tree storage*/
CREATE
TABLE
#temp_tree
(
level
int
,
id
int
NOT
NULL
PRIMARY
KEY
,
ptr
int
,
f1
char
(20)
)
INSERT
#temp_tree (
level
, id, ptr, f1)
SELECT
0, categoryid, parentid, categoryname
FROM
HCategroyNew
WHERE
categoryid = @categoryid
SELECT
@
level
= 0
WHILE 1 = 1
BEGIN
INSERT
#temp_tree (
level
, id, ptr, f1)
SELECT
@
level
+ 1, HCategroyNew.categoryid, HCategroyNew.parentid, HCategroyNew.categoryname
FROM
HCategroyNew, #temp_tree tt
WHERE
HCategroyNew.parentid = tt.id
AND
tt.
level
= @
level
IF @@rowcount = 0 BREAK
SELECT
@
level
= @
level
+ 1
END
SELECT
id, ptr, f1,
level
FROM
#temp_tree
DROP
TABLE
#temp_Tree
end
Dataset Table Structure
id ptr f1 level
3 1 Bedrooms 0
13 3 Classical 1
14 3 Modern 1
15 3 Contemporary 1
16 3 Transitional 1
17 3 Arte Deco 1
Radmenu Binding.
RadMenu1.DataSource = ds.Tables[0];
RadMenu1.Flow = ItemFlow.Horizontal;
RadMenu1.DataTextField =
"f1"
;
RadMenu1.DataFieldID =
"ptr"
;
RadMenu1.DataValueField =
"id"
;
RadMenu1.DataFieldParentID =
"level"
;
RadMenu1.DataBind();
Please help me urgent.
Thanks
Rizwan