PDA

View Full Version : How to use Scope attribute in ext js



abdul.hafiz2010
12 Sep 2010, 11:37 PM
Using the scope attribute to associate header cells and data cells in data tables

Condor
12 Sep 2010, 11:39 PM
You'll have to explain better...

abdul.hafiz2010
13 Sep 2010, 12:12 AM
I can use scope attribute in html like the below example.
<table border="1"> <tr> <td scope="col">Name</td> </tr> <tr> <td scope="row">Joel Garner</td> </tr></table>
I want to use scope attribute in EXT JS grid. Do you have any idea about this. Thanks

Animal
13 Sep 2010, 12:24 AM
That's meaningless.

abdul.hafiz2010
13 Sep 2010, 12:32 AM
Yes Animal, I know its meaningless but I have to implement in our application. Its a client requirment. So any how i have to do this.

abdul.hafiz2010
13 Sep 2010, 12:41 AM
Can anyone help me out on this? I need association between header and data cell through scope attribute.

Condor
13 Sep 2010, 12:42 AM
A <td> doesn't have a scope attribute. Why do you need to add it (you'd be creating invalid HTML)?

OK, that was not true.

But the question remains: Why do you want to set the scope attribute (because as Animal already mentioned, a GridPanel isn't a <table>).

abdul.hafiz2010
13 Sep 2010, 12:46 AM
I think <td> has scope attribute. I have created sample example for this. Please check the URL.
http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H63.html

Animal
13 Sep 2010, 12:53 AM
OK, that's for HTML tables. But a GridPanel is not a table.

abdul.hafiz2010
13 Sep 2010, 1:01 AM
So is there any similer kind of property in GridPanel by which I could associate header and data cell?

Condor
13 Sep 2010, 1:11 AM
I think you should start by explaining what you need this for.

ravigupta84
14 Sep 2010, 4:55 AM
If Grid Panel is not a table then internally what it is in terms of HTML?

Becase if we are not able to do this, we have to clarify why it is not possible in term of HTML/WEB 2.0?

Condor
14 Sep 2010, 6:07 AM
Have a look at the dom of a rendered grid. You'll notice that it doesn't use one big table, but a separate table for every row.

(If you don't like this you could use the TableGridView user extension instead that does use one table)