select last row on griddataboundgrid by clicking button
hi all...
i have a griddataboundgrid which contain list of customer...
and i have a create new customer button..
when i clicked the button.. i want to select the last row on griddataboundgrid...
for now.. it's just select the last one which i've selected...
is there a way for me to do that things?
or is it possible for me to add new row on the first row?
so everytime i click the button..i'll add new row to that grid but on the first row... for now it's always come to the last one
thanks in advance
i have a griddataboundgrid which contain list of customer...
and i have a create new customer button..
when i clicked the button.. i want to select the last row on griddataboundgrid...
for now.. it's just select the last one which i've selected...
is there a way for me to do that things?
or is it possible for me to add new row on the first row?
so everytime i click the button..i'll add new row to that grid but on the first row... for now it's always come to the last one
thanks in advance
SIGN IN To post a reply.
4 Replies
JJ
Jisha Joy
Syncfusion Team
July 10, 2008 10:18 AM UTC
Hi Sherly,
Thank you for posting query to us.
select the last row on griddataboundgrid.
Please try the following code snippets and let me know if this helps.
is it possible for me to add new row on the first row?
By default, there is only support to have the AddNew row at the bottom of the GridDataBoundGrid. There is no property settings for this. You should use the GridGroupingControl if you want the AddNew at the top. You can hide the grouping support and make that grid look like the GriddataBoundGrid if you want.
With the GridGroupingControl, you can use the below code to have the AddNew row at the top
FYI, we recommend our customers to use GridGroupingControl instead of GridDataBoundGrid for good performance and many additional features that we provide. The GridDataBoundGrid will be obsolete much sooner and no performance enhancement or no feature's updation will be done in our future releases.
Regards,
Jisha
Thank you for posting query to us.
select the last row on griddataboundgrid.
Please try the following code snippets and let me know if this helps.
this.gridDataBoundGrid1.Model.Selections.Clear(); this.gridDataBoundGrid1.Model.Selections.Add(GridRangeInfo.Row(this.gridDataBoundGrid1.Model.RowCount));
is it possible for me to add new row on the first row?
By default, there is only support to have the AddNew row at the bottom of the GridDataBoundGrid. There is no property settings for this. You should use the GridGroupingControl if you want the AddNew at the top. You can hide the grouping support and make that grid look like the GriddataBoundGrid if you want.
With the GridGroupingControl, you can use the below code to have the AddNew row at the top
// AddNew at top
this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = true;
// AddNew row at bottom
this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = true;
FYI, we recommend our customers to use GridGroupingControl instead of GridDataBoundGrid for good performance and many additional features that we provide. The GridDataBoundGrid will be obsolete much sooner and no performance enhancement or no feature's updation will be done in our future releases.
Regards,
Jisha
SN
Sherly Numawaty
July 11, 2008 05:01 AM UTC
hi...
does GridGroupingControl cover all the possibility on griddataboundgrid...
actually i have'nt used GridGroupingControl yet,cause all grid that i was used are griddataboundgrid...
should i change it all to GridGroupingControl ?
thanks
sherly
does GridGroupingControl cover all the possibility on griddataboundgrid...
actually i have'nt used GridGroupingControl yet,cause all grid that i was used are griddataboundgrid...
should i change it all to GridGroupingControl ?
thanks
sherly
SN
Sherly Numawaty
July 11, 2008 06:13 AM UTC
hi jisha
this.gridDataBoundGrid1.Model.Selections.Clear(); this.gridDataBoundGrid1.Model.Selections.Add(GridRangeInfo.Row(this.gridDataBoundGrid1.Model.RowCount));
is there any event which catch the changed of selection?
cause i've tried ur code.
but the things that i want to do is get the value of the last row and selected that row
thanks in advance
sherly
this.gridDataBoundGrid1.Model.Selections.Clear(); this.gridDataBoundGrid1.Model.Selections.Add(GridRangeInfo.Row(this.gridDataBoundGrid1.Model.RowCount));
is there any event which catch the changed of selection?
cause i've tried ur code.
but the things that i want to do is get the value of the last row and selected that row
thanks in advance
sherly
JJ
Jisha Joy
Syncfusion Team
July 15, 2008 06:47 AM UTC
Hi Sherly,
Does GridGroupingControl cover all the possibility on griddataboundgrid.
Yes. In addition to this, it Supports grouping with summaries, filters and expression columns. Please refer the following page in our website.
http://www.syncfusion.com/products/grid/windows/features/Grid_Grouping_Support/Grouping_Support.aspx
Is there any event which catch the changed of selection?
Please refer the code:
this.gridDataBoundGrid1.Model.SelectionChanged += new Syncfusion.Windows.Forms.Grid.GridSelectionChangedEventHandler(Model_SelectionChanged);
}
void Model_SelectionChanged(object sender, Syncfusion.Windows.Forms.Grid.GridSelectionChangedEventArgs e)
{
}
Please try this and let me know if this helps.
Regards,
Jisha
Does GridGroupingControl cover all the possibility on griddataboundgrid.
Yes. In addition to this, it Supports grouping with summaries, filters and expression columns. Please refer the following page in our website.
http://www.syncfusion.com/products/grid/windows/features/Grid_Grouping_Support/Grouping_Support.aspx
Is there any event which catch the changed of selection?
Please refer the code:
this.gridDataBoundGrid1.Model.SelectionChanged += new Syncfusion.Windows.Forms.Grid.GridSelectionChangedEventHandler(Model_SelectionChanged);
}
void Model_SelectionChanged(object sender, Syncfusion.Windows.Forms.Grid.GridSelectionChangedEventArgs e)
{
}
Please try this and let me know if this helps.
Regards,
Jisha
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
SN Sherly Numawaty
- Jul 10, 2008 06:56 AM UTC
- Jul 15, 2008 06:47 AM UTC