Hi. My English is not good, but I will try to explain
problem #1
I'm working with website. URL doesn't changes during nagivating (url is storing inside the session at server side as inner url; inner url changes using special postbacks). ViewState is disabled. Ajax is in use widely
I have a lookup (drop down list) with button 'Edit' near it. On pressing 'Edit' button system shows (using AJAX) Telerik Grid with Lookup's values to edit. Grid is inside of UpdatePanel
Firstly I tryied to use edit column:
Problems occurs when I try to do actions while I'm in edit mode - press Update or Cancel buttons. System fires no Grid's events. Looks like databiding 'loosing' edit state data (without databind system will not show Grid at all)
problem #2
I tryied to move to edit mode manually
Problem is in getting edited values. I trying to get updated values in 'OnItemCommand' event.
However all values are " ". Without databinding no values at all
I checked Forms data, edited values are there
this.Page.Request.Form["ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl01"] - 'Name' column
this.Page.Request.Form["ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl02"] - 'Description' column
this.Page.Request.Form["ctl03_ctl03_ctl01_ctl00_ctl03_ctl1~0_rgEditGrid_ClientState"] - is empty
However Unique ID's are differs:
dataItem["Name"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl04" string
dataItem["Description"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl05" string
dataItem["ID"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl03" string
So I have only 2 ways for now (I will try to do them in nearest time).
1) Create EditTemplate for Name and Description, with named controls. And try to search them directrly for values (I not sure they are exists there...)
2) Manually get data from Page.Request.Form data... Yes, thats not good
Do you have some comments/recomedations about these problems?
Telerik Grid is extremely powerful control, but it still unripe is some 'special' situations
problem #1
I'm working with website. URL doesn't changes during nagivating (url is storing inside the session at server side as inner url; inner url changes using special postbacks). ViewState is disabled. Ajax is in use widely
I have a lookup (drop down list) with button 'Edit' near it. On pressing 'Edit' button system shows (using AJAX) Telerik Grid with Lookup's values to edit. Grid is inside of UpdatePanel
Firstly I tryied to use edit column:
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn"/>
System goes to Edit mode well - I getting required events at server side (OnEdit, OnItemCommand).Problems occurs when I try to do actions while I'm in edit mode - press Update or Cancel buttons. System fires no Grid's events. Looks like databiding 'loosing' edit state data (without databind system will not show Grid at all)
problem #2
I tryied to move to edit mode manually
<
telerik:GridTemplateColumn UniqueName="EditColumn">
<ItemTemplate>
<asp:LinkButton ID="lbEdit" CommandName="ComEdit" runat="server" Text="Edit" />
<asp:LinkButton ID="lbUpdate" CommandName="ComUpdate" runat="server" Text="Update" Visible="false"/>
<asp:LinkButton ID="lbCancel" CommandName="ComCancel" runat="server" Text="Cancel" Visible="false"/>
</ItemTemplate>
</telerik:GridTemplateColumn>
Problem is in getting edited values. I trying to get updated values in 'OnItemCommand' event.
Telerik.Web.UI.
GridDataItem dataItem = e.Item as Telerik.Web.UI.GridDataItem;
However all values are " ". Without databinding no values at all
I checked Forms data, edited values are there
this.Page.Request.Form["ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl01"] - 'Name' column
this.Page.Request.Form["ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl02"] - 'Description' column
this.Page.Request.Form["ctl03_ctl03_ctl01_ctl00_ctl03_ctl1~0_rgEditGrid_ClientState"] - is empty
However Unique ID's are differs:
dataItem["Name"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl04" string
dataItem["Description"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl05" string
dataItem["ID"].UniqueID "ctl03$ctl03$ctl01$ctl00$ctl03$ctl1~0$rgEditGrid$ctl00$ctl04$ctl03" string
So I have only 2 ways for now (I will try to do them in nearest time).
1) Create EditTemplate for Name and Description, with named controls. And try to search them directrly for values (I not sure they are exists there...)
2) Manually get data from Page.Request.Form data... Yes, thats not good
Do you have some comments/recomedations about these problems?
Telerik Grid is extremely powerful control, but it still unripe is some 'special' situations