Posts

Showing posts from November, 2011

Client side Validation for DropDownList value in GridView

Client side Validation for DropDownList value in GridView to check if any value is selected or not. Add following code on 'OnClientClick' event of the asp.net button OnClientClick="javascript:return validateGridComboBox(); Javascript Function: function validateGridComboBox()      {             var flag = false;             var dropdowns = new Array(); //Create array to hold all the dropdown lists.             var gridview = document.getElementById('<%=GridView1.ClientID %>'); //GridView1 is the id of ur gridview.                          dropdowns = gridview.getElementsByTagName('select'); //Get all dropdown lists contained in GridView1.                         for (var i = 0; i < dropdowns.length; i++) {                 if (dropdowns.item(i).value != '0') //If dropdown has no selected value                 {                                        flag = true;                     break; //break the loop as there is

Add alternating row color to SSRS Reports

Go to the table row's BackgroundColor property and choose "Expression..." Use this expression: = IIf ( RowNumber ( Nothing ) Mod 2 = 0 , "Silver" , "Transparent" )