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

rebind against stored proc fails

7 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 29 Jul 2008, 03:55 PM
I have a RADGRID set up to display data from a SQLDataSource that calls a stored procedure.   During the coarse of work... the user may want to update data and have it reflected in the grid.  I have my update/refrsh button do a RADGRID1.reBind() but it doesnt seem to make the call to the stored procedure to get the new set of data.

Is there a thread already out there about this that someone could link me to? or perhaps throw some options my way. 

The grid is on a webform that is AJAX enabled.  works fine displaying the resulting data from the stored proc.  Just doesnt refresh with new data when forced to rebind.

thanks

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 29 Jul 2008, 04:01 PM
Hi Kevin,

If you can isolate this to small example where we can reproduce this please open a support ticket and send it to us. We will review your scenario and we will get back to you with more info.

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kevin
Top achievements
Rank 1
answered on 29 Jul 2008, 07:16 PM
Unfortunately I cannot make the example solution you are asking for to do the same thing.  here is what my settings are tho for the grid:



<telerik:radgrid id="RadGrid1" runat="server"
                 allowpaging="True"
                 datasourceid="sdsNames"
                 gridlines="None"
                 OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated"
                 OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated"
                 PageSize="15"
                 Skin="Outlook"
                 Width="771px" OnItemCommand="RadGrid1_ItemCommand" OnItemCreated="RadGrid1_ItemCreated">
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>

    <MasterTableView
         DataSourceID="sdsNames"
         AutoGenerateColumns="False"
         GridLines="Horizontal"
         IsFilterItemExpanded="False"
         GroupLoadMode="Server"
         TableLayout="Fixed"
         Width="100%"
         AllowPaging="False" >
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>

    <ExpandCollapseColumn>
        <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn
                DataField="Description"
                HeaderText="Description"
                SortExpression="Description"
                UniqueName="Description" Groupable="False">
                <ItemStyle HorizontalAlign="Right" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                DataField="PointLimit"
                DataType="System.Int32"
                HeaderText="Point Limit"
                ReadOnly="True"
                SortExpression="PointLimit"
                UniqueName="PointLimit">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                DataField="PointsThisMonth"
                DataType="System.Int32"
                HeaderText="Points This Month"
                ReadOnly="True"
                SortExpression="PointsThisMonth"
                UniqueName="PointsThisMonth">
            </telerik:GridBoundColumn>
        </Columns>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
            <SelectFields>
                    <telerik:GridGroupByField
                         FieldAlias="FullName"
                         FieldName="FullName"
                         HeaderText=" "
                         HeaderValueSeparator="" />
            </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField
                       FieldName="FullName" FieldAlias="FullName"
                        />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <GroupHeaderItemStyle Font-Bold="True" HorizontalAlign="Left" Wrap="False" />
    </MasterTableView>

    <ClientSettings>
         <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
         <Resizing  AllowColumnResize="True"></Resizing>
    </ClientSettings>
    <ExportSettings
          ExportOnlyData="True"
          FileName="ApExport"
          IgnorePaging="True"
          OpenInNewWindow="True">
        <Pdf Author="Terryberry" Creator="Terryberry" />
    </ExportSettings>
    <GroupingSettings GroupByFieldsSeparator=";" GroupContinuedFormatString="" GroupContinuesFormatString="" />
</telerik:radgrid>

not sure if this will help.
0
Richard
Top achievements
Rank 1
answered on 29 Jul 2008, 10:52 PM
Just to check the simple things first...
Is your web form AJAX enabled using RadAjaxManager?  If so, do you have an AjaxSetting in there telling the grid to update itself?  (I am assuming you  are using the grid's built-in refresh button to rebind)
0
Kevin
Top achievements
Rank 1
answered on 30 Jul 2008, 12:05 PM
"If so, do you have an AjaxSetting in there telling the grid to update itself?  (I am assuming you  are using the grid's built-in refresh button to rebind)"

Ok I think I missed something here about the refresh button... what is it and how do i access it?   I thought all I needed to do was put in a rebind on the code behind for the grid.

I use the Telerik Ajax manager and the RadGrid1 component is set to update  RadGrid1 in the settings.
0
Richard
Top achievements
Rank 1
answered on 30 Jul 2008, 01:50 PM
The grid CommandItem has a Refresh button that executes a Rebind() without any code required.  It actually doesn't need the AjaxManager setting either, but I have had issues in the past so I tend to put them in anyway.  If your CommandItem is not visible and you are using your own button to refresh the grid then you need an AjaxManager setting that tells the button to update the grid.
0
Kevin
Top achievements
Rank 1
answered on 31 Jul 2008, 01:24 PM
Vlad,

Could I send you the web page with the grid control for you to look at?  the best I can do on this issue?  if so how do I upload it to you?

thanks
0
Vladimir
Top achievements
Rank 1
answered on 31 Jul 2008, 06:29 PM
Hi Kevin,

Please open a support ticket.

Vlad
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Kevin
Top achievements
Rank 1
Richard
Top achievements
Rank 1
Vladimir
Top achievements
Rank 1
Share this question
or