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

[Solved] RadGrid

3 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Senthil S
Top achievements
Rank 1
Senthil S asked on 03 Mar 2010, 10:17 AM
I am Using RadGrid Control
after i insert AddnewRecord that display should be close and also i want to close the addnewrecord display when i click the edit link 
please help me 
Thanks Advance

Senthil S

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Mar 2010, 11:28 AM
Hello Senthil,

I guess you want to hide the editform when clicking AddNew Record button and also want to hide the insert form when grid in editmode. If so you can try the following code for that.

C#:
 
    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
    {  
        if (e.CommandName == RadGrid.EditCommandName)  
        {  
            RadGrid1.MasterTableView.IsItemInserted = false;  
        }  
        if (e.CommandName == RadGrid.InitInsertCommandName)  
        {  
            RadGrid1.MasterTableView.ClearEditItems();  
        }  
    }  

Regards,
Shinu.
0
Senthil S
Top achievements
Rank 1
answered on 04 Mar 2010, 12:16 PM
Hi Shinu,
              Thanks Much Shinu . Its Working Fine. If I Click The AddNewRecord it  Automatically Go to the last Page of the RadGrid.
After i Click Cancel Button Also it wont come to First Page.Please Tell me some solution For that 
I use the Following Code to Navigate to The First Page .Any other Solution
                                         RadGrid1.CurrentPageIndex = 0;
And Also If i delete all the Columns in Second Page Even though record is there in first page it will show"No Records to Display"
How to go the previous page record.Please Help me .
                                              


Thanks Much
Senthil S

              

0
Yavor
Telerik team
answered on 08 Mar 2010, 03:32 PM
Hi Senthil S,

Basically, if the control is properly configured, this behavior should not be exhibited - when deleting a record, other items should appear in its place, thus maintaining the pagesize of the control. This is demonstrated in the following example:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultvb.aspx

Deleting a record will not cause the pagesize to reduce.

Regards,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Senthil S
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Senthil S
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or