I have a GripTemplateColumn which I dynamically (onItemDatabound) creating Checkbox, ComboBox, TextBox depending on the type of the data. I want to do update by having an update link/button next to the control column and do update. Can someone give me suggestion to implement it?
Here is the .aspx code I am using
<telerik:GridTemplateColumn HeaderText="Value" HeaderStyle-Width="40%">
<ItemTemplate>
<telerik:RadTextBox ID="txtBoxValue" runat="server" Visible="false"></telerik:RadTextBox>
<telerik:RadNumericTextBox ID="numericTxtBoxValue" runat="server" Visible="false"></telerik:RadNumericTextBox>
<telerik:RadComboBox ID="dropDownValue" runat="server" Visible="false">
<Items> <telerik:RadComboBoxItem id="Item1" runat="server"></telerik:RadComboBoxItem>
</Items>
</telerik:RadComboBox>
<asp:CheckBox ID="chkBox" runat="server" Visible="false"></asp:CheckBox>
</ItemTemplate>
Here is the code how I populate the checkbox and other controls in the Grid ItemDataBound
CheckBox chkBoxValue = e.Item.FindControl("chkBox") as CheckBox;
chkBoxValue.ID = "chkValue";
if (value == "1" || value == "True")
chkBoxValue.Checked = true;
else
chkBoxValue.Checked = false;
chkBoxValue.Visible = true;
Here is the code for Update Link columm :
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Update" Text="Update"
UniqueName="UpdateColumn">
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
</telerik:GridButtonColumn>
But I could not get the updated value of the controls inside the UpdateCommand method of the code behind.
I checked the onle demo and help but all of them are using the inline edit or some sort of built in edit mode to edit all the columns of the row. In my case I just need to update only one column and it is already displayed in a editable form i.e in textbox, combobox etc. I just need to click the Update button for each row and save the edited value.
Any suggestion is appreciated!
Hi expert,
I am using telerik:RadPanelBar. the RadPanelItem is binding at runtime. It is working fine in IE.
But when I am browsing in 'Mozilla Firefox' or in 'Google Chrome' getting following error "Assertion Failed: Length of elements and json must be the same! "
Could you please help out how to solve this problem.
Thanks & regards,
Pravat Sharma