udir
asked on
DataGrid n CheckBoxList
Hi,
I built a dataGrid (auto generate) and add a column - TemplateColumn, and in it a CheckBoxList.
1) How can i make the Header of that column be like a linkLable/LinkButton (i did Allow Sorting=True, but nothing)
2) I need to click that LinkLable/LinkButton and turn all the CheckBoxes turn to "selected" and if click again, turn off.
Thanks
I built a dataGrid (auto generate) and add a column - TemplateColumn, and in it a CheckBoxList.
1) How can i make the Header of that column be like a linkLable/LinkButton (i did Allow Sorting=True, but nothing)
2) I need to click that LinkLable/LinkButton and turn all the CheckBoxes turn to "selected" and if click again, turn off.
Thanks
ASKER
Hi,
pls, can u give an example... i wrote :
<Columns>
<asp:TemplateColumn HeaderText="Ñ×è">
<ItemTemplate>
<asp:CheckBoxList runat="server"
RepeatDirection="Horizonta l" ID="Selection">
<asp:ListItem Selected="False"></asp:Lis tItem>
</asp:CheckBoxList>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
where and what i need to add?
(and what about que 2?)
Thanks
pls, can u give an example... i wrote :
<Columns>
<asp:TemplateColumn HeaderText="Ñ×è">
<ItemTemplate>
<asp:CheckBoxList runat="server"
RepeatDirection="Horizonta
<asp:ListItem Selected="False"></asp:Lis
</asp:CheckBoxList>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
where and what i need to add?
(and what about que 2?)
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and
function CheckAll()
{
var data = document.getElementById("D ataGrid1") .all;
for(var i=0;i<data.length;i++)
{
if(data[i].id.indexOf("Che ckBox1")>= 0)
{
data[i].checked = true;
}
}
return false;
}
to do check All
function CheckAll()
{
var data = document.getElementById("D
for(var i=0;i<data.length;i++)
{
if(data[i].id.indexOf("Che
{
data[i].checked = true;
}
}
return false;
}
to do check All
ASKER
Hi gauthampj,
Is there some option to add a LinkLable/LinkButton and not a button?
Is there some option to add a LinkLable/LinkButton and not a button?
Regards
Renju