This is a migrated thread and some comments may be shown as answers.

Radgrid EditForm

3 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amit
Top achievements
Rank 1
Amit asked on 24 Jan 2013, 06:44 AM
Hello,

I am using radgrid with pop up edit form ,Edit form is opening on double click of row. 
radfrid has "status" column inside it

following are the status
Approved , verified , declined.

so I want to open edit form only if there is decline status so user can resubmit the record
 if  status is approved and verified  I don't want to open edit form on double click.

Please give any suggestion.

Thanks and regards,
Amit

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Jan 2013, 07:04 AM
Hi,

Try the following code to achieve your scenario.
C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
   {
       foreach (GridDataItem item in RadGrid1.Items)
       {
           if (item["status"].Text == "approved")
           {
               RadGrid1.MasterTableView.ClearEditItems();
             }
       }
   }

Thanks,
Shinu
0
Amit
Top achievements
Rank 1
answered on 24 Jan 2013, 07:31 AM
Thank you 

No it is not working,  Only this thing is remained all is done 

Regards,
Amit

0
Shinu
Top achievements
Rank 2
answered on 25 Jan 2013, 06:20 AM
Hi,

Try the following code to achieve your scenario.
C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
        foreach (GridDataItem item in RadGrid1.Items)
        {
            if (item["status"].Text == "approved")
            {
                item.Edit = false;
 
            }
            else if (item["satus"].Text == "declined")
            {
                item.Edit = false;
 
            }
        }
}

Thanks,
Shinu
Tags
Grid
Asked by
Amit
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Amit
Top achievements
Rank 1
Share this question
or