Radgrid updating
How to update image in radgrid it is columns(ID,Name,Picture) data base is sms
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.
Sreejesh SPPosted Apr 10, 2013, 6:41 AM
please call populate function in any changes from DB side
For example
Protected void pageload(Eventargs e,objectSender e)
{
if(!ispostback)
{
populate();
}
}
protected void save(Eventargs e,objectSender o)
{
//save action completed call populate function
populate();
}
protected void delete(Eventargs e,objectSender o)
{
//Delete function completeed call Populate function
populate();
}
protected void populate()
{
sqlconnection con=new sqlconnection(@"connectionstring")
sqlcommand cmd=new sqlcommand();
sqldataadapter da=new sqldataadapter();
datatable dt=new datatable();
cmd.connection=con;
cmd.commandtext="select * from table";
da.selectcommand=cmd;
da.fill(dt);
radgrid1.datasource=dt;
radgrid1.databind();
}
Thanks
Sreejesh
}