<telerik:RadGrid ID="grd" runat="server" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"
oninsertcommand="grd_InsertCommand">
<MasterTableView DataKeyNames="GUI" AutoGenerateColumns="False"
CommandItemDisplay="TopAndBottom" HorizontalAlign="NotSet"
InsertItemDisplay="Top"
InsertItemPageIndexAction="ShowItemOnFirstPage" >
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridDropDownColumn UniqueName="Global_App" ListTextField="comment" ListValueField="value"
DataSourceID="XmlDataSource_Global_App" HeaderText="Global_App" DataField="Global_App"
DropDownControlType="RadComboBox" AllowSorting="true">
</telerik:GridDropDownColumn>
</Columns>
<CommandItemSettings AddNewRecordText="Add new record" AddNewRecordImageUrl="img/AddRecord.gif"
RefreshText="Refresh" RefreshImageUrl="img/Refresh.gif" />
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<FilterMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
protected void grd_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
GridEditableItem item = (GridEditableItem)e.Item;
string strGlobal_App = (item.EditManager.GetColumnEditor("Global_App") as GridDropDownColumnEditor).SelectedValue;
~do insert into sql table~
}
SPSite oSPSite = new SPSite(strSiteUrl);
SPWeb oSPWeb = oSPSite.OpenWeb();
SPList oSPList = oSPWeb.Lists[strPERListName];
SPView oSPView = oSPList.Views["All Issues"];
SPListItemCollection oSPListItemCollection = oSPList.GetItems(oSPView);
RadGrid1.DataSource = oSPListItemCollection.GetDataTable();
RadGrid1.DataBind();
==================================================
Now i have a dependent dropdown where i.e User
Selects = Country
and it shows States in another dropwdown. So when use chages the value in Contry dropdown it revert back to original values, becuase the above code is in page load.
i also tried using NeerDataSource evene to get this achived but no success.
===============================================
| public class FullProductWithDescription | |
| { | |
| public int ID { get; set; } | |
| public int MainProductID { get; set; } | |
| public string MainProductDescription { get; set; } | |
| public int SubProductID { get; set; } | |
| public string SubProductDescription { get; set; } | |
| public bool Kit { get; set; } | |
| } |
The RadGrid is built programmatically in the page's Init event handler. I want to add two template columns (1 check box, and 1 text box). So when the end user clicks the check box the text box becomes enabled. If more items are added to my list<T> can I have the new records show in the grid while preserving the states of the check box and text box? Obviously when I call DataBind on the grid I get the new rows but the check box and text box data disappear. Any ideas?
Thanks,
private
void LoadRootNodes(string currentUserContext)
{
DataTable data = new DataTable();
data =
BO.GetOwners(currentUserContext,);
RadTreeView tvOwner = (RadTreeView)RadComboBox1.FindControl("tvOwner");
tvOwner.DataTextField = "Name";
tvOwner.DataFieldID = "EmpId";
tvOwner.DataFieldParentID = "ParentId";
tvOwner.DataSource = data;
tvOwner.DataBind();
}
and below is my combo declaration:
<
telerik:RadComboBox ID="RadComboBox1" runat="server" Height="140px" Width="215px" ShowToggleImage="True" Skin="WebBlue" Style="vertical-align: middle;">
<ItemTemplate>
<div id="div1">
<telerik:RadTreeView runat="server" ID="tvOwner" OnNodeExpand="tvOwner_NodeExpand" Skin="WebBlue">
</telerik:RadTreeView>
</div>
</ItemTemplate>
<Items>
<telerik:RadComboBoxItem Text="" />
</Items>
</telerik:RadComboBox>
when i do RadComboBox1.FindControl("tvOwner") my treeview comes as null.
Please suggest.
| <asp:CustomValidator runat="server" ErrorMessage="Indtast en pris" |
| Display="Dynamic" onservervalidate="Unnamed1_ServerValidate"></asp:CustomValidator> |
| protected void Unnamed1_ServerValidate(object source, ServerValidateEventArgs args) |