Hi
I got row edit and cancel .But I Am click Add new record that radgrid is clear in first time than again am select combo box value the new records display.why first it,s clear how to solve that this. my code id below when ever am click add new record the radgrid is clears how to solve that .
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlConnection con = new SqlConnection("Data Source=SAMA\\SQLEXPRESS;Initial Catalog=pinfo;Integrated Security=True");
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from sch_view_class_lookup",con);
DataSet ds = new DataSet();
da.Fill(ds);
RadComboBox1.DataSource = ds;
RadComboBox1.DataTextField = "class";
RadComboBox1.DataValueField="class_id";
RadComboBox1.DataBind();
}
}
protected void RadGrid1_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
{
getdata();
}
protected void RadGrid1_SortCommand(object source, Telerik.Web.UI.GridSortCommandEventArgs e)
{
}
protected void RadComboBox1_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
getdata();
}
public void getdata()
{
SqlConnection con = new SqlConnection("Data Source=SAMA\\SQLEXPRESS;Initial Catalog=pinfo;Integrated Security=True");
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from sch_view_sch_student_remark_list where class_id='" + RadComboBox1.SelectedValue + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
RadGrid1.DataSource = ds;
RadGrid1.DataBind();
}
protected void RadGrid1_EditCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
getdata();
}
protected void RadGrid1_CancelCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
getdata();
}
thanks and regards
shanker.B