supersonic11
New Member
Actually I am having a requirement like :I need to get the ID's of checked records by using Javascript and store the id's in a cookie and access that cookie in controller and delete the records based on that id'sMy Javascript is :\[code\]<script type="text/javascript"> //<![CDATA[ function SelectionChanged(s, e) { s.GetSelectedFieldValues("ID", GetSelectedFieldValuesCallback); } function GetSelectedFieldValuesCallback(values) { SelectedRows.BeginUpdate(); try { SelectedRows.ClearItems(); var s = ''; for (var i = 0; i < values.length; i++) { //SelectedRows.AddItem(values); s=s+values+','; } } finally { document.cookie = s; } $("#count").html(gvRowSelection.GetSelectedRowCount()); } // ]]>\[/code\]