Dear experts
I have gridview and in that i have taken radiobutton
how can i fire checked changed event of radiobutton using ajax.
I have tried using scrip manager, update panel and content template
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mayur GujrathiPosted May 17, 2011, 4:48 AM
bu=y taking image controls also in update panel
Thanks for your reply
Amit ChoudharyPosted May 17, 2011, 4:30 AM
Thanks.
Mayur GujrathiPosted May 17, 2011, 1:47 AM
i am fetching image path on checked changed event of radiobutton and when i kept beak point then it shows me image url is coming but image is not displaying in image control
PageSize="50" Width="600px" >
<%#Eval("id")%>
<%#Eval("req_slip_no")%>
<%#Eval("Boid")%>
<%#Eval("Boname")%>
<%#Eval("sholder")%>
<%#Eval("tholder")%>
<%#Eval("deleted_ind ")%>
<%#Eval("remarks")%>
<%--
and coding for checke changed event
Protected Sub check_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
myds = DirectCast(ViewState("dsdata"), DataSet)
Dim chkbox As CheckBox = CType(sender, CheckBox)
Dim Grow As GridViewRow = CType(chkbox.NamingContainer, GridViewRow)
If (chkbox.Checked = True) Then
Dim check As String = myds.Tables(0).Rows(0)(11).ToString()
If (check = 0) Then
btnauthorise.Enabled = True
btnreject.Enabled = True
End If
strCureentRowIndex = Grow.RowIndex
hdrowno.Value = strCureentRowIndex
reqslipno = myds.Tables(0).Rows(strCureentRowIndex)(1).ToString()
Boid = myds.Tables(0).Rows(strCureentRowIndex)(3).ToString()
Dim path As String = SRV_ViewSignature(Boid)
path = path.Replace("|*~|", "")
path = "." + path
'('|*~|', '').substring(1, ClientSign.replace('|*~|', '').length)
imag.Visible = True
Image2.Visible = True
imag.ImageUrl = myds.Tables(0).Rows(strCureentRowIndex).Item("imagepath")
Image2.ImageUrl = path
End If
End Sub
Posted May 17, 2011, 1:19 AM
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DemoWebsite.Default" %>
// C# code-behind
using System;
using System.Collections.Generic;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DemoWebsite
{
public partial class Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// The data source to test against
List
{
"One", "Two","Three",
"Four","Five","Six",
"Seven","Eight","Nine"
};
gvAnswers.DataSource = source;
gvAnswers.DataBind();
}
}
protected void RbAnswersCheckedChanged(object sender, EventArgs e)
{
// Unchecks previously selected rows
foreach (GridViewRow oldrow in gvAnswers.Rows)
{
((RadioButton)oldrow.FindControl("rbAnswers")).Checked = false;
}
// Checks the new row
RadioButton rb = (RadioButton)sender;
GridViewRow row = (GridViewRow)rb.NamingContainer;
((RadioButton)row.FindControl("rbAnswers")).Checked = true;
}
}
}
For more information, please refer the below link,
http://www.daniweb.com/web-development/aspnet/code/217424