Hi,
i am using infragistics "NetAdvantage for .NET 2009 Vol 1" license version.
Requirment:
i am working on UltraWebGrid and the grid have multiple column. the first column of UltraWebGrid is CheckBox.
i want a CheckBox on first UltraWebGrid column header so that i can Check / UnCheck all the row at a single Click.
please tell me that this feature is available in "NetAdvantage for .NET 2009 Vol 1" or not. if it is available then how will achieve this functionality.
Thanks & Regard's
Sachin Kumar
<
script type="text/javascript">
function CheckHeaderCheckBoxItem(HeaderChkObj, ItemCheckBoxKey) {
var hdnTCGridID = document.getElementById("hdnuwgItem").value;
GridName = hdnTCGridID;
CheckAllCheckBoxInCell(HeaderChkObj.checked, GridName, ItemCheckBoxKey);
}
//this function will check all the check box in the row. of that column
CheckAllCheckBoxInCell(_CheckStatus, _GridName, _KeyValue) {
_InstanceValue = 0;
//get the object of the grid
_grid = igtbl_getGridById(_GridName);
//getting the grid bands
oBands = _grid.Bands;
oBand = oBands[0];
//getting the index of the columns in the row by passing the key
_colIndex = oBand.getColumnFromKey(_KeyValue).Index;
//iteratin tru the row and getting the cell with the key
(_Index = 0; _Index < _grid.Rows.length; _Index++) {
//getting the cell object
_CellObj = GetCellByKey(_GridName, _grid.Rows.getRow(_Index).Id, _KeyValue);
//getting the checkbox with the object or tag name.
)[0];
//changing the status
_CheckBoxElement.checked = _CheckStatus;
</
script>
<igtbl:UltraWebGrid ID="uwgItem" runat="server" Height="200px" Width="100%" StyleSetName="QUltraWebGridForSearchPage" >
<Bands>
<igtbl:UltraGridBand>
<Columns>
<igtbl:TemplatedColumn Width="5%" Key="KeyItemCheckBox">
<HeaderTemplate>
<asp:CheckBox ID="chkItemHeader" runat="server" onclick="CheckHeaderCheckBoxItem(this,'KeyItemCheckBox')" />
</HeaderTemplate>
<CellTemplate>
<asp:CheckBox ID="chkItemSelect" runat="server" />
</CellTemplate>
</igtbl:TemplatedColumn>
<igtbl:UltraGridColumn BaseColumnName="ItemCode" IsBound="True" Key="KeyItemCode"
AllowUpdate="No" Width="20%">
<Header Caption="<%$ Resources:CommonWebResources,Ugc_Hdrcpn_ItemCode%>">
<RowLayoutColumnInfo OriginX="2" />
</Header>
<Footer>
</Footer>
</igtbl:UltraGridColumn>
------------
--------
igtbl:UltraWebGrid>
Govind Kumar
QS