<telerik:RadGrid ID="rgRequests" runat="server" Skin="Metro" OnItemCreated="rgRequests_ItemCreated" OnUpdateCommand="rgRequests_UpdateCommand" OnNeedDataSource="rgRequests_NeedDataSource" AllowMultiRowEdit="true" MasterTableView-EditMode="Batch" MasterTableView-ClientDataKeyNames="DPO,DLINE,DQTY,DRQTY" AutoGenerateColumns="false"> <MasterTableView CommandItemDisplay="TopAndBottom" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="true" CommandItemSettings-ShowSaveChangesButton="true" CommandItemSettings-ShowCancelChangesButton="true"> <Columns> <telerik:GridBoundColumn HeaderText="PO#" DataField="DPO" ReadOnly="true" /> <telerik:GridBoundColumn HeaderText="LINE" DataField="DLINE" ReadOnly="true" /> <telerik:GridBoundColumn HeaderText="Item" DataField="DITEM" ReadOnly="true" /> <telerik:GridBoundColumn HeaderText="Ordered" DataField="DQTY" ReadOnly="true"/> <telerik:GridBoundColumn HeaderText="Received" DataField="DRQTY" ReadOnly="true" /> <telerik:GridNumericColumn HeaderText="Received Today" DataField="CDRQTY" ColumnEditorID="CDRQTY" DataType="System.Int32" /> </Columns> </MasterTableView></telerik:RadGrid>
hi
I need use session in ResourceStyleMapping Scheduler
I use below code but don't work correctly :
<ResourceStyles> <telerik:ResourceStyleMapping Type="User" Key= '<%= Session["user_Id"] %>' BackColor="Aqua"></telerik:ResourceStyleMapping> <telerik:ResourceStyleMapping Type="User" Key="1" BackColor="Aqua"></telerik:ResourceStyleMapping></ResourceStyles>
please help me.


When I run the page without the Rebind() method call in my PreRender() method I get the desired filtering behavior, for the most part. We want the ComboBoxes to have a cascading data feature. When I set AppendDataBoundItems=”false” this does the trick but the user can no longer set the ComboBox to “ALL”. I put in a button to clear all the filters and that isn’t too bad. The problem I am running into now is when I have the ComboBoxes set and type in a first or last name that is invalid the page does nothing but says there is an error. I went to http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultvb.aspx and when you set the country to Argentina then set the filter for Is Promoted to yes the page loads http://demos.telerik.com/ErrorPageResources/error.aspx?aspxerrorpath=/aspnet-ajax/grid/examples/programming/filtertemplate/defaultvb.aspx this error. I thought that it was just a random connection but apparently your filters have the same issue that I am trying to overcome. I am guessing that you guys are aware of this issue, are there any suggestions on something that could be done? Or am I limited to trying to make the possibility of this happening as small as possible?
I also would like to have the ComboBoxes show all values that are on the same level as the current selection. For an example if it was States and Cities, and I had selected California for the state and Los Angeles for the City, I would like to click on the city combobox and have it display all cities in the state of California. Where would be a place to start looking for that possibility?
I thought maybe it would help to include a little more information from a prior question that this issue pertains to:
======================================================================================================
Posted on Nov 23, 2010 (permalink)
Posted on Nov 23, 2010 (permalink)
<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="USER_ID" AllowMultiColumnSorting="true" Width="100%"><telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" GridLines="None" Skin="Outlook" PageSize="100" EnableLinqExpressions="False" ShowGroupPanel="True" ShowStatusBar="True" AutoGenerateColumns="false"> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"> <Selecting AllowRowSelect="True" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings> Protected Sub RadGrid1_PreRender(ByVal o As Object, ByVal e As EventArgs) Handles RadGrid1.PreRender If Not RadGrid1.MasterTableView.FilterExpression Is String.Empty Then FilterSetter() End If End Sub Private Sub FilterSetter() sqlLocationFilter.SelectCommand = "SELECT DISTINCT [DBOL] FROM [DBO]" & " WHERE " & RadGrid1.MasterTableView.FilterExpression.ToString() & " ORDER BY [Location]" sqlDepartmentFilter.SelectCommand = "SELECT DISTINCT [DOBD] FROM [DBO]" & " WHERE " & RadGrid1.MasterTableView.FilterExpression.ToString() & " ORDER BY [DBOD]" sqlOfficeFilter.SelectCommand = "SELECT DISTINCT [DBOO] FROM [DBO]" & " WHERE " & RadGrid1.MasterTableView.FilterExpression.ToString() & " ORDER BY [DBOO]" RadGrid1.MasterTableView.Rebind() End Sub Protected Sub ResetFiltersButton_OnClick(ByVal o As Object, ByVal e As EventArgs) RadGrid1.MasterTableView.FilterExpression = String.Empty For Each column As GridColumn In RadGrid1.MasterTableView.RenderColumns If TypeOf column Is GridBoundColumn Then Dim boundColumn As GridBoundColumn = TryCast(column, GridBoundColumn) boundColumn.CurrentFilterValue = String.Empty End If Next RadGrid1.Rebind() End Sub Protected Sub RadGrid1_ItemCommand(ByVal o As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand If e.CommandName = Telerik.Web.UI.RadGrid.ExpandCollapseCommandName Then Dim item As GridItem For Each item In e.Item.OwnerTableView.Items TestExpandEvent.Visible = True If item.Expanded And item IsNot e.Item Then item.Expanded = False End If Next End If End SubEnd ClassPosted on Nov 24, 2010 (permalink)
Protected Sub RadGrid1_PreRender(ByVal o As Object, ByVal e As EventArgs) Handles RadGrid1.PreRender If Not RadGrid1.MasterTableView.FilterExpression Is String.Empty Then FilterSetter() End IfEnd SubPrivate Sub FilterSetter() SqlLocationFilter.SelectCommand = "SELECT DISTINCT [Location] FROM [View_PhoneList_Debra] " & "WHERE " & RadGrid1.MasterTableView.FilterExpression.ToString() & " ORDER BY [Location]" SqlDepartmentFilter.SelectCommand = "SELECT DISTINCT [Department] FROM [View_PhoneList_Debra] " & "WHERE " & RadGrid1.MasterTableView.FilterExpression.ToString() & " ORDER BY [Department]" RadGrid1.MasterTableView.Rebind() End SubProtected Sub RadGrid1_ItemCommand(ByVal o As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand If e.CommandName = Telerik.Web.UI.RadGrid.ExpandCollapseCommandName Then Dim item As GridItem For Each item In e.Item.OwnerTableView.Items If item.Expanded And item IsNot e.Item Then item.Expanded = False End If Next End IfEnd SubPosted on Nov 26, 2010 (permalink)
FilterSetter(). At this point, your expanded item is gone, because the grid items are recreated.Posted 1 day ago (permalink)
When I run the page without the Rebind() method call in my PreRender() method I get the desired filtering behavior, for the most part. We want the ComboBoxes to have a cascading data feature. When I set AppendDataBoundItems=”false” this does the trick but the user can no longer set the ComboBox to “ALL”. I put in a button to clear all the filters and that isn’t too bad. The problem I am running into now is when I have the ComboBoxes set and type in a first or last name that is invalid the page does nothing but says there is an error. I went to http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultvb.aspx and when you set the country to Argentina then set the filter for Is Promoted to yes the page loads http://demos.telerik.com/ErrorPageResources/error.aspx?aspxerrorpath=/aspnet-ajax/grid/examples/programming/filtertemplate/defaultvb.aspx this error. I thought that it was just a random connection but apparently your filters have the same issue that I am trying to overcome. I am guessing that you guys are aware of this issue, are there any suggestions on something that could be done? Or am I limited to trying to make the possibility of this happening as small as possible?
I also would like to have the ComboBoxes show all values that are on the same level as the current selection. For an example if it was States and Cities, and I had selected California for the state and Los Angeles for the City, I would like to click on the city combobox and have it display all cities in the state of California. Where would be a place to start looking for that possibility?
