Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
204 views

I having the problem for edit / insert. The edit form still showing after click on update/ insert button. But, the data can insert to the database.

 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
 
            <script type="text/javascript">  
                function RowDblClick(sender, eventArgs) {  
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());  
                }  
            </script> 
 
        </telerik:RadCodeBlock> 
 
 <telerik:RadGrid ID="gNew" GridLines="None" runat="server" AllowAutomaticDeletes="True" 
            AllowAutomaticInserts="True" PageSize="10" AllowAutomaticUpdates="True" AllowPaging="True" 
            AutoGenerateColumns="False">  
            <PagerStyle Mode="NextPrevAndNumeric" /> 
               <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="pollAnswerID" HorizontalAlign="NotSet" AutoGenerateColumns="False">  
                <Columns> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">  
                        <ItemStyle CssClass="MyImageButton"/>  
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn DataField="pollAnswer_text" HeaderText="Answer" SortExpression="pollAnswer_text" 
                        UniqueName="pollAnswer_text" ColumnEditorID="GridTextBoxColumnEditor1">  
                    </telerik:GridBoundColumn> 
                   
                    
                    <telerik:GridButtonColumn ConfirmText="Delete this answer?" ConfirmDialogType="RadWindow" 
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" 
                        UniqueName="DeleteColumn">  
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                    </telerik:GridButtonColumn> 
                </Columns> 
 
 
                <EditFormSettings EditFormType="Template">  
                    <FormTemplate> 
                        <table border="0" cellpadding="5" cellspacing="0" style="padding:10px; background-color:#FDEFBB;" width="100%">  
                            <tr> 
                                <td> 
                               <b>Answer </b>   
                                </td> 
                                <td> 
 
                                 <asp:TextBox ID="tAnswer" runat="server" Width="400px" Text='<%# Bind( "pollAnswer_text" ) %>'</asp:TextBox> 
                                                <asp:RequiredFieldValidator ID="RFVtAnswer" Display="Dynamic"  Text="Please enter the answer." runat="server" Font-Bold="true" 
  ControlToValidate="tAnswer"  >Please enter the answer.</asp:RequiredFieldValidator> 
 
 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                </td> 
                                <td> 
                               
 <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update Answer") %>' 
                                        runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'>  
                                    </asp:Button>&nbsp;  
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
CommandName="Cancel"></asp:Button> 
 
 
                                </td> 
                            </tr> 
 
                        </table> 
 
                        
                      
 
                    </FormTemplate> 
                </EditFormSettings> 
 
 
             
            </MasterTableView> 
            <ClientSettings> 
                <ClientEvents OnRowDblClick="RowDblClick" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
 
         <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="400px" /> 
Protected Sub gNew_NeedDataSource(ByVal source As ObjectByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gNew.NeedDataSource  
 
        Dim mClas As ExodusG2.dbOps = New ExodusG2.dbOps  
        Dim dt As DataTable = New DataTable  
        Dim alin As ArrayList = New ArrayList  
        Dim alout As ArrayList = New ArrayList  
 
        Dim sSql As String 
 
        sSql = "SELECT    Polls.pollID, PollAnswers.pollAnswer_text, PollAnswers.pollAnswer_order, PollAnswers.pollAnswer_status, PollAnswers.pollAnswerID FROM Polls INNER JOIN PollAnswers ON Polls.pollID = PollAnswers.pollID where PollAnswers.pollID ='" & Request.QueryString("ID") & "' and pollAnswer_status=1" 
 
 
        dt = mClas.GetDataTable(sSql)  
 
        gNew.DataSource = dt  
 
    End Sub 
Protected Sub gNew_ItemCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles gNew.ItemCommand  
        Dim mClas As ExodusG2.dbOps = New ExodusG2.dbOps  
        Dim AlIn As ArrayList = New ArrayList  
        Dim ssql As String 
 
        If e.CommandName = RadGrid.InitInsertCommandName Then '"Add new" button clicked  
            Dim editColumn As GridEditCommandColumn = CType(gNew.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)  
            editColumn.Visible = False 
        ElseIf (e.CommandName = RadGrid.RebindGridCommandName AndAlso e.Item.OwnerTableView.IsItemInserted) Then 
            e.Canceled = True 
        Else 
            Dim editColumn As GridEditCommandColumn = CType(gNew.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)  
            If Not editColumn.Visible Then 
                editColumn.Visible = True 
            End If 
        End If 
 
 
        If e.CommandName = "Delete" Then 
            'Get the GridDataItem of the RadGrid  
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)  
            'Get the primary key value using the DataKeyValue.  
            Dim answerID As String = item.OwnerTableView.DataKeyValues(item.ItemIndex)("pollAnswerID").ToString()  
 
            AlIn.Clear()  
            AlIn.Add("2")  
            AlIn.Add(answerID)  
            mClas.execute_query("update PollAnswers set pollAnswer_status=@param1 WHERE pollAnswerID=@param2", AlIn)  
 
 
        End If 
 
 
        If e.CommandName = "Update" Then 
            Dim edititem As GridEditableItem = TryCast(e.Item, GridEditableItem)  
            Dim answerID As String = edititem.OwnerTableView.DataKeyValues(edititem.ItemIndex)("pollAnswerID").ToString()  
 
            AlIn.Clear()  
            AlIn.Add(CType(e.Item.FindControl("tAnswer"), TextBox).Text)  
            AlIn.Add(answerID)  
            mClas.execute_query("update PollAnswers set pollAnswer_text=@param1 WHERE pollAnswerID=@param2", AlIn)  
 
            
        End If 
 
 
        If e.CommandName = "PerformInsert" Then 
 
            Dim insertItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)  
            Dim Guid As String = System.Guid.NewGuid().ToString  
 
            ssql = "Insert into PollAnswers (pollAnswerID,pollID,pollAnswer_text,pollAnswer_order,pollAnswer_status) Values (@param1,@param2,@param3,@param4,@param5)" 
            AlIn.Clear()  
            AlIn.Add(System.Guid.NewGuid().ToString)  
            AlIn.Add(Request.QueryString("ID"))  
            AlIn.Add(CType(e.Item.FindControl("tAnswer"), TextBox).Text)  
            AlIn.Add("1")  
            AlIn.Add("1")  
            mClas.execute_query(ssql, AlIn)  
 
             
        End If 
 
 
    End Sub 

 

 

 

 

 

Shinu
Top achievements
Rank 2
 answered on 27 May 2010
9 answers
254 views
Okay, I have to be missing something very simple here, but I've banged my head enough and need some help.

I have a user control and a simple master/detail grid placed in it.
I have placed custom filter controls in the header.

Problem:
When the user control loads into my page, the grid is populated just fine (approximately 99 rows returned).  I then select an OrderNumber from my custom filter combo box and the grid rebinds perfectly.  I have one row returned, which is exactly what is expected.  However, when I go to the same combo box filter and select "All", I get no rows returned.  However, while debugging, I can clearly see the datasource being reset to the original 99 rows returned.  I have tried this with NeedDataSource event handling and without (meaning I brute force it to rebind).

I can make this work without any problems if I place the grid directly into an aspx page, but for some reason I'm having a hard time when its inside a user control.

Below is the code pertaining to this issue.  Any help would be appreciated.  One other thing, I have tried turning off viewstate (not really an option since I need viewstate), setting datasources to null, rebinding, not forcing rebind.......etc.....etc......etc....

<telerik:RadGrid ID="rgvOrderHistory" runat="server" AllowPaging="True" 
AllowCustomPaging="true" OnSortCommand="rgvOrderHistory_SortCommand" AllowSorting="true" OnItemDataBound="rgvOrderHistory_ItemDataBound"
 
    <MasterTableView DataKeyNames="OrderNumber" AllowPaging="true" PageSize="10" PagerStyle-AlwaysVisible="true"  
        PagerStyle-Mode="NextPrev" AutoGenerateColumns="false" AllowFilteringByColumn="true"
         
        <DetailTables> 
            <telerik:GridTableView DataKeyNames="OrderNumber" Name="OrderDetails" Width="100%" runat="server" AllowSorting="true" 
            AllowPaging="true" PageSize="10" PagerStyle-AlwaysVisible="true" AllowCustomPaging="true" PagerStyle-Mode="NextPrev" AutoGenerateColumns="false">  
             <Columns> 
                    <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton" 
                        DataField="Description"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="QuantityOrdered" HeaderText="Quantity Ordered" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="QuantityOrdered" ItemStyle-HorizontalAlign="Center" > 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="ShortSku" HeaderText="SKU" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="ShortSku" ItemStyle-HorizontalAlign="Center"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="SalesPrice" HeaderText="Sales Price" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="SalesPrice" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Center"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="ExtendedPrice" HeaderText="Ext Price" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="ExtendedPrice" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Center"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="OrderTrackingNumber" HeaderText="Tracking Number" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="OrderTrackingNumber" ItemStyle-HorizontalAlign="Center"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="DetailStatus" HeaderText="Order Status" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="DetailStatus" ItemStyle-HorizontalAlign="Center"
                    </telerik:GridBoundColumn> 
                </Columns>     
            </telerik:GridTableView>         
        </DetailTables> 
                 
            <NoRecordsTemplate> 
                        <strong><asp:Label ID="lblNoRecords" runat="server" Text="No available orders."></asp:Label></strong>                    
            </NoRecordsTemplate> 
            <Columns> 
                    <telerik:GridBoundColumn SortExpression="OrderDate" HeaderText="Order Date" HeaderButtonType="TextButton" 
                        DataField="OrderDate" DataFormatString="{0:d}"
                        <FilterTemplate>     
                        <telerik:RadDatePicker ID="rdpFilterFromDate" runat="server" MaxDate="9999-12-31 11:59:59 PM"   
                             AutoPostBack="true" OnSelectedDateChanged="rdpFilterFromDate_SelectedDateChanged" > 
                        </telerik:RadDatePicker>  
                         to    
                        <telerik:RadDatePicker ID="rdpFilterToDate" runat="server" MaxDate="9999-12-31 11:59:59 PM"  
                             AutoPostBack="true" OnSelectedDateChanged="rdpFilterToDate_SelectedDateChanged" > 
                        </telerik:RadDatePicker>                             
                    </FilterTemplate> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="OrderNumber" HeaderText="Order Number" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="OrderNumber" ItemStyle-HorizontalAlign="Center" UniqueName="OrderNumber"
                        <FilterTemplate>   
                            <telerik:RadComboBox ID="cbxFilterOrderNumber"  
                                                 DataTextField="OrderNumber"  
                                                 DataSource='<%# GetOrderDropDown()%>'  
                                                 OnSelectedIndexChanged="cbxFilterTypes_SelectedIndexChanged"  
                                                 DataValueField="OrderNumber"  
                                                 Height="200px"  
                                                 AppendDataBoundItems="true"  
                                                 SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("OrderNumber").CurrentFilterValue %>'   
                                                 runat="server"  
                                                 AutoPostBack="true"  
                                                 OnClientSelectedIndexChanged="TitleIndexChanged">   
                                <Items>   
                                    <telerik:RadComboBoxItem Value="-1" Text="All" />  
                                </Items>   
                            </telerik:RadComboBox>   
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">   
   
                                <script type="text/javascript">   
                                    function TitleIndexChanged(sender,args) {   
                                        var tableView=$find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");   
                                        tableView.filter("OrderNumber",args.get_item().get_value(),"EqualTo");                      
                                    }   
                                </script>   
                            </telerik:RadScriptBlock>   
                        </FilterTemplate>   
 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="Total" HeaderText="Order Total" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="Total" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Center"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn SortExpression="OrderType" HeaderText="Order Type" HeaderButtonType="TextButton" HeaderStyle-HorizontalAlign="Center" 
                        DataField="OrderType" ItemStyle-HorizontalAlign="Center"
                    </telerik:GridBoundColumn> 
                </Columns> 
    </MasterTableView> 
</telerik:RadGrid> 


Now the relevant code behind (this is the way I last tried...brute force):
protected void Page_Load(object sender, EventArgs e) 
        { 
             
            if (!IsPostBack) 
            { 
                ViewState[GRIDSORTDIRECTION] = "DESC"; 
                ViewState[GRIDSORTORDER] = "OrderDate"; 
                ViewState[FILTERFROMDATE] = null; 
                ViewState[FILTERTODATE] = null; 
                ViewState[FILTERTONUMBER] = null; 
                 
                Guid g = new Guid("A2E02D63-2B56-42F8-95C7-DC98DFCCB146"); 
                _BOUserAccount = new BOUserAccount(g); 
                Session["BOUserAccount"] = _BOUserAccount; 
 
                GetOrderHistoryDataSource(true); 
            } 
        } 
 
protected void GetOrderHistoryDataSource(bool bindIt) 
        { 
            DateTime? fromDate = nulltoDate = null
            int? orderNumber = null
            if (ViewState[FILTERFROMDATE] != null) 
            { 
                fromDate = Convert.ToDateTime(ViewState[FILTERFROMDATE]); 
            } 
            if (ViewState[FILTERTODATE] != null) 
            { 
                toDate = Convert.ToDateTime(ViewState[FILTERTODATE]); 
            } 
            if (ViewState[FILTERTONUMBER] != null) 
            { 
                orderNumber = Convert.ToInt32(ViewState[FILTERTONUMBER]); 
            } 
            BOUserAccount boUserAccount2 = (BOUserAccount)Session["BOUserAccount"]; 
            int orderCount; 
            rgvOrderHistory.DataSource = boUserAccount2.GetOrderHistory(boUserAccount2.UserID, false, ViewState[GRIDSORTORDER].ToString(), 
                                                                        ViewState[GRIDSORTDIRECTION].ToString(), rgvOrderHistory.PageSize, rgvOrderHistory.CurrentPageIndex 
                                                                        , out orderCount, fromDate, toDate, orderNumber); 
            rgvOrderHistory.VirtualItemCount = orderCount
 
            if (bindIt) 
            { 
                rgvOrderHistory.Rebind(); 
            } 
        } 
 
protected List<OrderHeaderHistory> GetOrderDropDown() 
        { 
            BOUserAccount boUserAccount2 = (BOUserAccount)Session["BOUserAccount"]; 
            int orderCount; 
            return boUserAccount2.GetOrderHistory(boUserAccount2.UserID, true, "OrderNumber","ASC", null, null, out orderCount, null, null, null); 
        } 
 
protected void cbxFilterTypes_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            ViewState[FILTERTONUMBER] = e.Value == "-1" ? null : e.Value; 
            oFilterValue = e.Value; 
 
            string filterExpression = "([OrderNumber] = '" + e.Value + "')"; 
 
            rgvOrderHistory.MasterTableView.FilterExpression = filterExpression
            GetOrderHistoryDataSource(true); 
            //rgvOrderHistory.MasterTableView.DataSource = null
            //rgvOrderHistory.MasterTableView.Rebind(); 
            //rgvOrderHistory.Rebind(); 
        } 

Aimee Rasmussen
Top achievements
Rank 1
 answered on 27 May 2010
2 answers
119 views
I've been working on building the filter expression programmatically with success.  What I can't seem to figure out is how to build multiple groups and apply them to the RadFilter.

I have a datatable with rows.  For each row, I'd like to create a group.  Here's what I have so far but it is now working.

                foreach (DataRow dr in dtFreqUsed.Rows)  
                {  
                    RadFilterGroupExpression grExpression = new RadFilterGroupExpression();  
                    grExpression.GroupOperation = RadFilterGroupOperation.And;  
                    CreateFilterExpression(grExpression, dr);  
                    RadFilter1.RootGroup.Expressions.Add(grExpression);  
                }  
 
 
        protected void CreateFilterExpression(RadFilterGroupExpression grExpression, DataRow dr)  
        {  
            if (!(dr["SEGMENT1"is DBNull) || dr["SEGMENT1"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT1");  
                expr.Value = dr["SEGMENT1"].ToString();  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT2"is DBNull) || dr["SEGMENT2"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT2");  
                expr.Value = dr["SEGMENT2"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT3"is DBNull) || dr["SEGMENT3"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT3");  
                expr.Value = dr["SEGMENT3"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT4"is DBNull) || dr["SEGMENT4"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT4");  
                expr.Value = dr["SEGMENT4"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT5"is DBNull) || dr["SEGMENT5"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT5");  
                expr.Value = dr["SEGMENT5"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT6"is DBNull) || dr["SEGMENT6"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT6");  
                expr.Value = dr["SEGMENT6"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT7"is DBNull) || dr["SEGMENT7"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT7");  
                expr.Value = dr["SEGMENT7"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT8"is DBNull) || dr["SEGMENT8"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT8");  
                expr.Value = dr["SEGMENT8"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
            if (!(dr["SEGMENT9"is DBNull) || dr["SEGMENT9"].ToString() != string.Empty)  
            {  
                RadFilterEqualToFilterExpression<string> expr = new RadFilterEqualToFilterExpression<string>("SEGMENT9");  
                expr.Value = dr["SEGMENT9"].ToString();  
                RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.And;  
                grExpression.AddExpression(expr);  
            }  
        }  
 
Nikolay Rusev
Telerik team
 answered on 27 May 2010
3 answers
161 views
I am having a problem which occurs when a user enters text (not valid file path) into the file path text box.  If the user enters plain text (example: test), and then tries to click the 'Close' button on the page - the Close button click event is never fired. 

This also happens on other pages in the project with all the Upload controls.  It seems that anytime a user enters non-file path text into the file path text box, all other buttons on the page are rendered useless until the 'Clear' button for the upload control is called.  We are trying to avoid forcing the user to use the 'Browse' button solely because of keyboard navigation requirements. 

The following is the code used for the Upload control and the button. 

<

 

telerik:RadUpload ID="rulUpload" runat="server" ControlObjectsVisibility="ClearButtons"

 

 

InputSize="50" MaxFileInputsCount="1" ReadOnlyFileInputs="False" Height="25px"

 

 

Width="498px" Localization-Select="Browse" select="Browse" AllowedFileExtensions=".pdf"

 

 

AllowedMimeTypes="application/pdf" MaxFileSize="5242880" EnableFileInputSkinning="False"

 

 

EnableEmbeddedSkins="True">

 

 

</telerik:RadUpload>

 


<

 

asp:Button ID="btnUpload" runat="server" Text="Upload" CausesValidation="true" ValidationGroup="Save"

 

 

OnClientClick="return btnSaveChecks();" />

 

 

&nbsp;<asp:Button ID="btnClose" runat="server" Text="Close" />

 



Has anyone else encountered this problem and is there a way to fix it? 
Genady Sergeev
Telerik team
 answered on 27 May 2010
1 answer
65 views
Hi ,

      How to  Check Existing Data !  just Like  ( check user avaialability ) in Client side .I am using Automatic Update , Automatic Delete 

and Automatic Insert Mode. How things possible I need Your Help.


Thanks For Your Advance Help .
Iana Tsolova
Telerik team
 answered on 27 May 2010
1 answer
565 views
Good Morning,

I am currently working with the RadListView to display 4 columns from a datasource. This all works fantastic and is quite fast. I had originally been using the grid but found it to be a little overkill as all I need to do is display the columbs, allow selecting of a row and loading some data when that row is selected.

I have also worked with the repeater and datalist control from the standard asp.net toolkit but found they were a bit more difficult to get access to controls within the ItemTemplate definitions.

The problem I am runing into is as follows. I need to be able to do the following (all in javascript)

1. When a user clicks a row I need to be able to set teh background color of the row and turn off any other rows. I realize the RadListView allows for a postback but it only seems available if you include a button in one of the columns to generate a ItemCommand. What I ended up doing was placing an onclick event in each <tr> definition that allows me to call a javascript routine. The problem I have is that I can pass a referene to the row and change the background color, but I cannot find a way to access any of the other rows in the listview. Is there a way to get this collection of rows so I can handle the selection piece myself by setting the background color?

2. In the javascript function when I pass the row reference, how do I get to the controls? I know I can do a get_dataKeyValues I believe it's called and I can access the databound columns. This works great, but what if I have a simple checkbox control that I want to set it's value in the javascript function? How do I get access to this row collection?

3. I will be forcing a postback once a row is selected and I need to load the assocaited data, will this postback allow me to update the ListView control through the radajaxmanager?

The biggest problem is being able to turn off and on the background color for selection. The itemSelect command in RadListView would have been nice but it generates a postback which I do not want to happen since many of my editors are on the client side until the user is ready to submit the final data.

Any help would be appreciated.

Raymundo Lopez
Rosen
Telerik team
 answered on 27 May 2010
1 answer
85 views
The scheduler control currently from what I can understand works that per user I can block slots so that these are not scheduled for that user, can I do instead of blocking creating available times? Meaning that at the beginning all times are block and when choosing a slot this becomes available?

Thank you.
Peter
Telerik team
 answered on 27 May 2010
1 answer
73 views
Hello;

I have a user requirement to view 12 or 52 weeks in MonthView format.  Can I specify a starting date and number of weeks?  How would I do this, or is it even possible?

Thanks,

Al
Genady Sergeev
Telerik team
 answered on 27 May 2010
1 answer
108 views
How To maintained Filter value

I have face a problem .
I have a RadGrid with Filter Textbox.(Column in Radgrid like UserName,Email)
I Filter it with Email column and then click on any Filtered row,
then we open a new Radwindow(For Edit).
when i click on Update button on this window then parent page refresh and it lost his Filter value.

How i maintained  it's filter value. 

Radoslav
Telerik team
 answered on 27 May 2010
0 answers
63 views
Hello,

when looking for info on Telerik controls, I recommend trying this:
http://www.google.com/search?q=site%3Atelerik.com
Nicolaï
Top achievements
Rank 2
 asked on 27 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?