I am using ASP .Net 2.0 with VB. I have a page with 4 radio buttons, a grid and a repeater and a gridview inside the repeater. Right now the gridview inside the repeater uses a field from the first grid to pass into the data source.
<asp:GridView ID="gvWaterLevels" AutoGenerateColumns='false' runat="Server"
DataSource='<%# GetWaterLevels(CType(Eval("strSiteId"), string)) %>'>
What I need to do is evaluate the Radio buttons in a javascript and pass the return of the JavaScript to the method GetWaterLevels(); or Somehow figure out which radio button is selected and pass it to the GetWaterlevels() method
Here is the Javascript.
function TimePeriod()
{
var rbPeriod = document.getElementById("rbPeriod");
var rbfive= document.getElementById("rbfive");
var rbTen = document.getElementById("rbTen");
var rbFifteen = document.getElementById("rbFifteen");
var rbTwenty = document.getElementById("rbTwenty");
if (rbPeriod.Checked)
{
Return 0;
}
if (rbfive.Checked)
{
Return 5;
}
if (rbTen.Checked)
{
Return 10;
}
if (rbFifteen.Checked)
{
Return 15;
}
if (rbTwenty.Checked)
{
Return 20;
}
}
Please Let me know my other options. Is there a CodeBehind way to Set Repeater Datasource from the first grid?