:: Forum >>
Search functionallity
Hi,
I want to use ActiveWidgets to create a grid, with unlimited number of rows. So far, no problem. But I also need to add a search text box - and I successfuly added a text box, which finds the correct row. My problem is - how to 'select' the row, to hightlight it somehow, and to bring it to focus, if the list is too long and scrolling down is needed. Does ActiveWidgets supports such thing? Otherwise, the product is great and suitable for my needs, that's the only thing that I miss and that's the only reason I'm not sure whether to use it or not for my site.
Thanks in advance for you reply,
Yuval.
Yuval
Thursday, March 29, 2007
You browse your data and find position of row.
then
obj.setSelectedRows([position]);
obj.setScrollTop(position*18);
obj.setCurrentRow(position);
Friday, March 30, 2007
Hi again,
Thanks for your reply!
It does scroll to the correct line, but it doesn't highlight it in any way. There is no way for the user to know that this line is selected or anything like that... Any suggestions?
Thanks,
Yuval.
Yuval
Friday, March 30, 2007
you are wrong
with
obj.setSelectedRows([position]);
The row is selected.
Thierry
Saturday, March 31, 2007
Maybe it is selected, but there's no way for the user to knowing this - the color stays the same. maybe I should define a css class or something in order for the color to change?
Thanks!
Yuval
Saturday, March 31, 2007
with standard css the selected row is highlighted with color and background colors.
When you click on a row is the row highligted?
Otherwise you can change background and color of selected row
#Mygrid .aw-rows-selected {BACKGROUND: #316ac5;}
Thierry
Sunday, April 1, 2007
<html>
<head>
<script src="runtime/lib/aw.js"></script>
<link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
</head>
<body>
<script>
var position=60;
var offset=position*18;
var obj = new AW.UI.Grid;
obj.setCellData(function(col, row){return col + "." + row});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(100);
obj.setSelectionMode("single-row");
obj.setSelectedRows([position]);
obj.setScrollTop(offset);
obj.setCurrentRow(position);
document.write(obj);
</script>
</body>
</html>
Thierry
Sunday, April 1, 2007
This topic is archived.
Back to support forum
Forum search