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

GridClientSelectColumn and CommandItemTemplate issues

14 Answers 289 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Balamurali Venkatesan
Top achievements
Rank 1
Balamurali Venkatesan asked on 22 Oct 2008, 10:21 PM
HI,

Iam creating a Hierarchial Grid.The MasterTableview is defined at design time.But the hierachy detail tables are created programatically.

Below are my issues:

I have the commanditemTemplate set for insert/update/delete opetaions.Also have the GridButtonCoumn and GridClientSelectColumn

First time when i choose the items without expandong the grid and try to click the delete from the commanditemtemplate it works

But when i expand the grid and try to use the CommanditemTemplate for delte it doesn't work ..the Deletecommand is not getting triggreed.

Also when i try to click the select all checkbox of the clientselectcolumn in the child grids it throws a null reference javascriot error

Below is my clientsettings for the grid

<

ClientSettings AllowKeyboardNavigation="True"

 

 

EnableRowHoverStyle="True">

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 


but when i expand the grid the enable hoverstyle is gone..

I remember saying like telerik has issues if the grid ID being named with an Underscore.I have chnaged it..but there some columns with their uniquenmaes starting with an underscore.

Below is the code for the Grid:

ASPX:
-------

<

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="radGridProducts">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="radGridProducts" LoadingPanelID="AjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

</

telerik:RadAjaxManager>

 

<%

--<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="75px"

 

Width="75px" Transparency="10">

<asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/Images/loading3.gif" />

</telerik:RadAjaxLoadingPanel>--

%>

 

<

asp:Label ID="lblMessage" runat="server" EnableViewState="False" Visible="false"></asp:Label><br />

 

<

telerik:RadGrid ID="radGridProducts" runat="server" AutoGenerateColumns="False"

 

 

AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" Skin="Office2007"

 

 

AllowMultiRowSelection="True" AllowMultiRowEdit="True" GridLines="None"

 

 

OnNeedDataSource="RadGridProducts_NeedDataSource" OnDeleteCommand="radGridProducts_DeleteCommand"

 

 

OnInsertCommand="RadGridProducts_InsertCommand" OnUpdateCommand="RadGridProducts_UpdateCommand"

 

 

OnDetailTableDataBind="RadGridProducts_DetailTableDataBind">

 

 

<AlternatingItemStyle BackColor="#EDEFF1" BorderColor="Blue" />

 

 

<PagerStyle AlwaysVisible="True" Position="TopAndBottom" />

 

 

<MasterTableView DataKeyNames="Tag,ParentTag,Id" CommandItemDisplay="Top" EditMode="InPlace">

 

 

<CommandItemTemplate>

 

 

<asp:LinkButton Style="vertical-align: bottom" ID="btnEditSelected" runat="server"

 

 

CommandName="UpdateEdited" Visible='<%# radGridProducts.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/Update.gif" /> Update Products</asp:LinkButton>

 

 

&nbsp;

 

 

<asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" CausesValidation="false" Visible='<%# radGridProducts.EditIndexes.Count > 0 || radGridProducts.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/Cancel.gif" /> Cancel editing</asp:LinkButton>

 

 

&nbsp;

 

 

<asp:LinkButton ID="btnAddProduct" runat="server" CommandName="InitInsert" Visible='<%# !radGridProducts.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/AddRecord.gif" /> Add new Product</asp:LinkButton>

 

 

<asp:LinkButton ID="btnSaveProduct" runat="server" CommandName="PerformInsert" Visible='<%# radGridProducts.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/Insert.gif" /> Add this Product</asp:LinkButton>

 

 

&nbsp;

 

 

<asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="EditSelected" CausesValidation="false" Visible='<%# radGridProducts.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../images/Edit.gif" /> Edit Selected Products</asp:LinkButton>

 

 

<asp:LinkButton ID="btnDeleteSelectedProducts" OnClientClick="javascript:return confirm('Delete all selected Products?')"

 

 

runat="server" CommandName="DeleteSelected" CausesValidation="false"><img style="border:0px;vertical-align:middle;" alt="" src="../images/Delete.gif" /> Delete Selected Products</asp:LinkButton>

 

 

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;

 

 

<asp:LinkButton ID="btnRefresh" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="../images/Refresh.gif" /> Refresh Product list</asp:LinkButton>

 

 

</CommandItemTemplate>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="../images/Update.gif"

 

 

EditImageUrl="../images/Edit.gif" InsertImageUrl="../images/Insert.gif" CancelImageUrl="../images/Cancel.gif"

 

 

UniqueName="EditCommandColumn">

 

 

<HeaderStyle Width="30px" />

 

 

</telerik:GridEditCommandColumn>

 

 

<telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton"

 

 

ImageUrl="../images/Delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">

 

 

<HeaderStyle Width="20px" />

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridButtonColumn>

 

 

<telerik:GridClientSelectColumn>

 

 

<HeaderStyle Width="40px" />

 

 

</telerik:GridClientSelectColumn>

 

 

<telerik:GridBoundColumn ReadOnly="true" DataField="Tag" HeaderText="Tag" UniqueName="_colProductTag"

 

 

MaxLength="10">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ShortDescription" HeaderText="Short Description"

 

 

UniqueName="_colProductShortDesc" MaxLength="40">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="LongDescription" HeaderText="Long Description"

 

 

UniqueName="_colProductLongDescription" MaxLength="80">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridHyperLinkColumn DataNavigateUrlFields="Id" DataNavigateUrlFormatString="javascript:ShowEditForm('{0}');"

 

 

HeaderText="Characteristics" Text="View" UniqueName="_colChar2">

 

 

</telerik:GridHyperLinkColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings AllowKeyboardNavigation="True"

 

 

EnableRowHoverStyle="True">

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

<FilterMenu EnableTheming="True">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</FilterMenu>

 




ASPX.CS
------------

private

void CreateHierarchyTableTemplates(int noOfLevels)

 

{

 

GridTableView parentTableView = radGridProducts.MasterTableView;

 

parentTableView.DetailTables.Clear();

 

for (int i = 0; i < noOfLevels; i++)

 

{

 

GridTableView newParentTableView = CreateProductChildGrid(parentTableView);

 

parentTableView = newParentTableView;

}

}

 

private GridTableView CreateProductChildGrid(GridTableView parentGridTableView)

 

{

 

GridTableView tableViewChildProduct = new GridTableView(radGridProducts);

 

parentGridTableView.DetailTables.Add(tableViewChildProduct);

tableViewChildProduct.DataSource =

new List<InstrProduct>();

 

AddProductChildGridAttributes(tableViewChildProduct);

tableViewChildProduct.EnableColumnsViewState =

true;

 

 

return tableViewChildProduct;

 

}

 

private void AddProductChildGridAttributes(GridTableView tableViewChildProduct)

 

{

tableViewChildProduct.PageSize = 100;

tableViewChildProduct.Width =

Unit.Percentage(100);

 

tableViewChildProduct.SkinID =

"Office2007";

 

tableViewChildProduct.AutoGenerateColumns =

false;

 

tableViewChildProduct.AllowPaging =

true;

 

tableViewChildProduct.EnableViewState =

true;

 

tableViewChildProduct.HierarchyLoadMode =

GridChildLoadMode.ServerOnDemand;

 

tableViewChildProduct.BorderColor =

Color.Blue;

 

tableViewChildProduct.PagerStyle.AlwaysVisible =

true;

 

tableViewChildProduct.PagerStyle.Position =

GridPagerPosition.TopAndBottom;

 

AddProductChildGridBoundColumns(tableViewChildProduct);

tableViewChildProduct.EnableColumnsViewState =

true;

 

tableViewChildProduct.EditMode =

GridEditMode.InPlace;

 

tableViewChildProduct.CommandItemDisplay =

GridCommandItemDisplay.Top;

 

tableViewChildProduct.CommandItemSettings.AddNewRecordText =

"Add new Product";

 

 

//tableViewChildProduct.CommandItemTemplate = new ProductCommandItemTemplate();

 

 

}

 

private void AddProductChildGridBoundColumns(GridTableView tableViewChildProduct)

 

{

 

GridEditCommandColumn col0 = new GridEditCommandColumn();

 

tableViewChildProduct.Columns.Add(col0);

col0.ButtonType =

GridButtonColumnType.ImageButton;

 

col0.UpdateImageUrl =

"../images/Update.gif";

 

col0.EditImageUrl =

"../images/Edit.gif";

 

col0.InsertImageUrl =

"../images/Insert.gif";

 

col0.CancelImageUrl =

"../images/Cancel.gif";

 

col0.UniqueName =

"EditCommandColumn";

 

 

GridButtonColumn col1 = new GridButtonColumn();

 

tableViewChildProduct.Columns.Add(col1);

col1.Text =

"Delete";

 

col1.ConfirmText =

"Delete this product?";

 

col1.ButtonType =

GridButtonColumnType.ImageButton;

 

col1.ImageUrl =

"../images/Delete.gif";

 

col1.CommandName =

"Delete";

 

col1.UniqueName =

"DeleteColumn";

 

 

 

GridClientSelectColumn col2 = new GridClientSelectColumn();

 

tableViewChildProduct.Columns.Add(col2);

 

GridBoundColumn col3 = new GridBoundColumn();

 

tableViewChildProduct.Columns.Add(col3);

col3.DataField =

"Tag";

 

col3.UniqueName = tableViewChildProduct.Name +

"_colTag";

 

col3.HeaderText =

"Tag";

 

col3.ReadOnly =

true;

 

 

GridBoundColumn col4 = new GridBoundColumn();

 

tableViewChildProduct.Columns.Add(col4);

col4.DataField =

"ShortDescription";

 

col4.UniqueName = tableViewChildProduct.Name +

"_colShortDescription";

 

col4.HeaderText =

"Short Description";

 

col3.MaxLength = 40;

 

GridBoundColumn col5 = new GridBoundColumn();

 

tableViewChildProduct.Columns.Add(col5);

col5.DataField =

"LongDescription";

 

col5.UniqueName = tableViewChildProduct.Name +

"_colLongDescription";

 

col5.HeaderText =

"Long Description";

 

col5.MaxLength = 80;

 

 

GridHyperLinkColumn col6 = new GridHyperLinkColumn();

 

tableViewChildProduct.Columns.Add(col6);

col6.UniqueName = tableViewChildProduct.Name +

"_colCharacteristics2";

 

col6.HeaderText =

"Characteristics";

 

col6.DataNavigateUrlFormatString =

"javascript:ShowEditForm('{0}');";

 

col6.DataNavigateUrlFields =

new string[] { "Id" };

 

col6.Text =

"View";

 

}

protected

void radGridProducts_DeleteCommand(object source, GridCommandEventArgs e)

 

{

 

RadGrid grid = source as RadGrid;

 

 

GridItemCollection itemsCollection = grid.SelectedItems;

 

 

switch(e.CommandName )

 

{

//Delete Selected Products Logic

 

 

 

 

case "DeleteSelected":

 

{

 

if (itemsCollection.Count > 0)

 

{

 

StringBuilder _sProdList = new StringBuilder();

 

 

StringBuilder _sProdDeletedList = new StringBuilder();

 

 

//List<InstrProduct> _productDeleteList = new List<InstrProduct>();

 

 

 

 

 

foreach (GridDataItem item in itemsCollection)

 

{

 

String _productTag = item.GetDataKeyValue("Tag").ToString();

 

 

String _productId = item.GetDataKeyValue("Id").ToString();

 

 

//Check if the productTag has a Child Level

 

 

 

 

List<InstrProduct> _lstProducts = _presenter.GetChildProducts(_productTag);

 

 

if (_lstProducts.Count == 0)

 

{

 

//Allow Delete as there are no child products

 

 

 

 

InstrProduct _productDelete = new InstrProduct();

 

_productDelete.Id =

Convert.ToInt32(item.GetDataKeyValue("Id"));

 

_productDelete.Tag = item.GetDataKeyValue(

"Tag").ToString();

 

 

//_productDeleteList.Add(_productDelete);

 

 

 

 

//Allow Delete as there are no child products

 

 

 

 

//int instrproductDel = _presenter.DeleteProduct(_productDeleteList);

 

 

 

 

int instrproductDel = _presenter.DeleteProduct(_productDelete);

 

e.Item.OwnerTableView.Rebind();

_sProdDeletedList.Append(_productTag);

_sProdDeletedList.Append(

" ");

 

}

 

else if (_lstProducts.Count > 0)

 

{

_sProdList.Append(_productTag);

_sProdList.Append(

" ");

 

}

}

 

//Allow Delete as there are no child products

 

 

 

 

//int instrproductDel = _presenter.DeleteProduct(_productDeleteList);

 

 

 

 

//e.Item.OwnerTableView.Rebind();

 

 

 

 

StringBuilder _sMsgDisplay = new StringBuilder();

 

 

if (_sProdDeletedList.Length > 0)

 

{

 

//_sMsgDisplay.Append("Deleted Product List(s):");

 

 

 

_sMsgDisplay.Append(

"The following product(s) " + _sProdDeletedList + " have been deleted.");

 

}

 

if (_sProdList.Length > 0)

 

{

_sMsgDisplay.Append(

"The following product(s) " + _sProdList + " cannot be deleted.Please delete all the child product(s) of these selected product(s).");

 

}

RadAjaxManager1.WindowAlert(_sMsgDisplay.ToString());

}

 

break;

 

}

 

case "Delete":

 

{

 

//Delete single Product Logic

 

 

 

 

int _productId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Id"]);

 

 

string _productTag =e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Tag"].ToString();

 

 

//List<InstrProduct> _productDeleteList = new List<InstrProduct>();

 

 

 

 

StringBuilder _sMsgDisplay = new StringBuilder();

 

 

//Check if the productTag has a Child Level

 

 

 

 

List<InstrProduct> _lstProducts = _presenter.GetChildProducts(_productTag);

 

 

if (_lstProducts.Count == 0)

 

{

 

//Allow Delete as there are no child products

 

 

 

 

//int instrproductDel = _presenter.DeleteProduct(_productTag, _productId);

 

 

 

 

InstrProduct _productDelete = new InstrProduct();

 

_productDelete.Id = _productId;

_productDelete.Tag = _productTag;

 

//_productDeleteList.Add(_productDelete);

 

 

 

 

//Allow Delete as there are no child products

 

 

 

 

//int instrproductDel = _presenter.DeleteProduct(_productDeleteList);

 

 

 

 

int instrproductDel = _presenter.DeleteProduct(_productDelete);

 

 

//e.Item.OwnerTableView.Rebind();

 

 

 

_sMsgDisplay.Append(

"The following product " + _productTag + " have been deleted.");

 

}

 

else if (_lstProducts.Count > 0)

 

{

_sMsgDisplay.Append(

"The following product " + _productTag + " cannot be deleted.Please delete all the child product(s) of this selected product.");

 

}

e.Item.OwnerTableView.Rebind();

RadAjaxManager1.WindowAlert(_sMsgDisplay.ToString());

}

 

break;

 

 

}

 

}

14 Answers, 1 is accepted

Sort by
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 24 Oct 2008, 03:47 PM
HI,

ANy help on this would be greatly appreciated.

Thanks
Bala
0
Iana Tsolova
Telerik team
answered on 27 Oct 2008, 02:02 PM
Hello Balamurali,

Can you try removing the underscore sign from the columns UniqueName and check if it makes any difference?

I also suggest that you review the following help topics on programmatic creation of RadGrid (on Page_Load and Page_Init) and how to change RadGrid structure at runtime:
http://www.telerik.com/help/aspnet-ajax/grdprogrammaticcreation.html
http://www.telerik.com/help/aspnet-ajax/grdchanginggridstructuredynamically.html

Check if you have followed the steps described there and let me know if any issues arise.  

Regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 27 Oct 2008, 08:11 PM
HI,

I have totally created the grid programattically and again we have the same issue.

When i first click the command item template lables its working..when i just select Cancel or  tryu to expand the grid ,then none of the commanditems are firting the comman event.

Also now there are no underscore names in any place.


Any help on this would be greatly appreciated.

Thanks
Bala
0
Iana Tsolova
Telerik team
answered on 28 Oct 2008, 02:17 PM
Hello Balamurali,

Unfortunately I am not able to replicate the described behavior. I suggest that you open a formal support ticket and send a runnable project of yours where I could reproduce the issue. Thus I can debug it locally in order to find a resolution for you.

Regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 28 Oct 2008, 08:56 PM
Hi,

Thanks for your reply. Actually the issue seems to be with the Ajax Settings..
Bcoz when i remove the ajax setting all the functionality is working fine.

How do we set the Ajax setting.

My Hierarchy grid is dynamic..Just have a asp Panel control and the radAjaxmanager in the aspx page
on the page load Iam just setting the following ..doing so throws a null refrence error

This is actually a user control which holds the RadAjax Manger and the panel control. and the radgrid is created dynamically

RadGrid gridProducts = PlaceHolder1.FindControl("radGridProducts") as RadGrid;

 

RadAjaxManager1.AjaxSettings.AddAjaxSetting(gridProducts, gridProducts);

If i use the RadAjaxpanel its working..But for certain cases i might need to use Asp panel ..

Thanks
Bala


 


0
Iana Tsolova
Telerik team
answered on 29 Oct 2008, 01:25 PM
Hello Balamurali,

Try placing the code for ajaxifying the grid in the Page_PreRender event handler and check it if makes any difference. You can also try setting the HierarchyLoadMode property of the grid table views to ServerBind.

Let me know how it goes.

Greetings,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 29 Oct 2008, 07:36 PM
HI,

I tried placing the AJax setting on the PreRender event and it didn't work.

Its throwing a null reference error when i try to use the below code either in page load or prerender.

RadGrid gridProducts = PlaceHolder1.FindControl("radGridProducts") as RadGrid;

RadAjaxManager1.AjaxSettings.AddAjaxSetting(gridProducts, gridProducts);

Also Iam using ServerOnDemand HIerarchy mode setting as the DetailTables are bind using DetailTableBind.

PLz find below my User Control code

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="InstrProductControl.ascx.cs"
    Inherits="GSBAU.Instr.Views.InstrProductControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadWindowManager ID="_radWindowManager" runat="server"
    KeepInScreenBounds="True" Modal="True" DestroyOnClose="True"
    Height="400px" Title="Product Characteristics" Width="600px" ReloadOnShow="True"
    VisibleStatusbar="False">
    <Windows>
        <telerik:RadWindow ID="ProductCharacteristicsDialog" runat="server"
            Title="Product Characteristics" Height="400px" Width="600px" Left="150px"
            Behaviors="Close, Move, Resize" ReloadOnShow="True" />
    </Windows>
</telerik:RadWindowManager>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
 
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="75px"
    Width="75px" Transparency="25">
    <asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/Images/loading3.gif" />
</telerik:RadAjaxLoadingPanel>
<asp:Label ID="lblMessage" runat="server" Visible="false"></asp:Label><br />
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>



0
Iana Tsolova
Telerik team
answered on 30 Oct 2008, 09:33 AM
Hello Balamurali,

Have you tried setting the ajax settings declaratively? Please remove the code for ajaxifying the grid from code behind and modify your ajax manager declaration as follows:

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="Panel1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="Panel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 

Let me know if this helps.

Kind regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 03 Nov 2008, 08:36 PM
HI Iana,

Stilll it doesn't work,even ater setting the AJAX declaratively.

Also the filter options doesn't work when we use the Radajax manager.

Fisrt time when i choose the filter and it works again when i click the filter button it just throw a NULL error on the viewstate

Thanks
Bala
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 03 Nov 2008, 08:53 PM
But when we use RadAjaxPanle everything is working/..Don't know whats the issue in setting in RadAjaxManager
0
Iana Tsolova
Telerik team
answered on 04 Nov 2008, 02:09 PM
Hello Balamurali,

Is the user control loaded dynamically?
I suggest that you open a formal support ticket and send me a runnable sample illustrating the unexpected behavior or at least send the user control and the problematic page where it is loaded. This I could investigate the issue in depth and find a resolution for you.

All the best,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jason Maronge
Top achievements
Rank 1
answered on 16 Dec 2008, 03:27 AM
I am seeing somewhat of the same thing.  I have multiple grids being creating at runtime, along with tabs and pagviews with the grid inserted into the pageview.  The Insert, Refresh and Edit commands work fine.  They fire the ItemCommand event, but when in edit mode neither the Update or Cancel commands fire the ItemCommand nor the individual UpdateCommand/CancelCommand events.  I have tried to even set the CommandName for the ImageButtons in the ItemDatabound method and set the ajax settings there to no avail.

The weird thing is that I can go down the grid and hit the edit icon on all the rows and it fires the ItemCommand event.  This tells me everything should be setup correctly.

I have had to create my grids on the Page_Load method since I need to get the ID's for the objects that I am supposed to use from the viewstate and it is not available on the Page_Init method.  Don't think this should affect anything since I know I have done something like this in the past. 

I have also tried using a RadAjaxPanel and it does not work with that either. 

Anyone have any ideas on what I can try next? 

Thanks...Jason
0
Iana Tsolova
Telerik team
answered on 16 Dec 2008, 12:50 PM
Hi Jason,

Could you please paste here the code you are using to create the grid? Sending the code for creating the tabs and the pageviews might also be of help. I will have a look at it and try providing a resolution for you.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jason Maronge
Top achievements
Rank 1
answered on 16 Dec 2008, 03:30 PM
Iana,

I will open a support ticket with the code.  It will just be the code and not a working program.

Jason
Tags
Grid
Asked by
Balamurali Venkatesan
Top achievements
Rank 1
Answers by
Balamurali Venkatesan
Top achievements
Rank 1
Iana Tsolova
Telerik team
Jason Maronge
Top achievements
Rank 1
Share this question
or