Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
79 views

Hello Telerik Team,

i found  a strange behavior in my RadGrid.
While GridEditMode.InPlace and GridCellSelectionMode.SingleCell both are active, i can not click in editable cells. I reproduced this bahavior in Firefox and IE 8 and higher.

To my Testpage: It is a single RadGrid with following parameters:  

RadGrid1.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.SingleCell
RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace

The datasource is a simple table bound in NeedDataSource event.

Protected Sub getData(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        RadGrid1.DataSource = GetTable()
    End Sub
    Function GetTable() As DataTable
        ' Create new DataTable instance.
        Dim table As New DataTable
        ' Create four typed columns in the DataTable.
        table.Columns.Add("FELD1", GetType(String))
        table.Columns.Add("FELD2", GetType(String))
        table.Columns.Add("FELD3", GetType(String))
        table.Columns.Add("FELD4", GetType(String))
        ' Add five rows with those columns filled in the DataTable.
        table.Rows.Add("11", "12", "13", "14")
        table.Rows.Add("21", "22", "23", "24")
        table.Rows.Add("31", "32", "33", "34")
        table.Rows.Add("41", "42", "43", "44")
        table.Rows.Add("51", "52", "53", "54")
        Return table
    End Function

The last step is the PreRender event.
Private Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender
Dim i As Integer
For i = 0 To RadGrid1.PageSize - 1
RadGrid1.EditIndexes.Add(i)
Next i
RadGrid1.Rebind()
End Sub

It looks good, but the open cells are inaccessable on mouse click... the only thing i can do to access them is to tab in.

Without "RadGrid1.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.SingleCell" everything is working fine. But this setting is needed in the real page to execute js on Clientside in OnCellSelected event.
The InPlace-Editmode is required too.

i hope i provided enough informations so you can help me to find my error.

Kind regards,
Ilja Resch
Ilja
Top achievements
Rank 1
 answered on 08 Aug 2012
3 answers
80 views
HI,

I am using RADgrid.

I have a multi line text box. I need to move the column header on top of the control as shown in the attached images.
By default it comes to the left of the control. I need to change only one column header position. All othe columns are fine. I have implemented it as template column so I can add a header template.

Please suggest.

Prachi
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Aug 2012
7 answers
150 views
I added one extra entry in PageSizeComboBox of Grid paging control on (v2010.1.628.40)

 

 

GridItemCreated(

 

object source, GridItemEventArgs e)

 


{

if

 

 

(e.Item is GridPagerItem)

 

{

 

 

GridPagerItem pagerItem = (GridPagerItem)e.Item;

 

 

 

RadComboBox PageSizeComboBox = (RadComboBox)pagerItem.FindControl("PageSizeComboBox");

 

 

 

// Create a new item for showing All

 

 

 

RadComboBoxItem item = new RadComboBoxItem("All", int.MaxValue.ToString());

 

item.Attributes.Add(

 

"ownerTableViewId", e.Item.OwnerTableView.ClientID);

 

PageSizeComboBox.Items.Add(item);

}


}

and with (becasue I want to always show Page style with PageSizeComboBox even there is only one page, so that user can use PageSizeComboBox)

<

 

 

PagerStyle AlwaysVisible="true" />

 


It is working fine and I can see my "All" option on the page.
But when I select this option, page postbacks, it display me all the rows correctly, but appending one more entry in PageSizeComboBox and the Text of that entry is "2147483647".

This looks like a bug, How can I stop RadGrid to append this extra entry?

Thanks!
Nirnay
Martin
Telerik team
 answered on 08 Aug 2012
0 answers
79 views
Hi guys,

I am trying to get the validation working. The validation is working fine but it does not prevent to stay in the current mode. Is there any way to lock the grid if the validation failed? (lock it to current mode (edit mode). Currently it is display the error message but it does not lock the grid. 

protected void ParticipationGrid_UpdateCommand(object sender, GridCommandEventArgs e)
    {
        RadDatePicker dpEndDate = new RadDatePicker();
        RadDatePicker dpStartDate = new RadDatePicker();
        RadComboBox cbReason = new RadComboBox();


        dpStartDate = (RadDatePicker)e.Item.FindControl("dtParticipationStartDate");
        dpEndDate = (RadDatePicker)e.Item.FindControl("dtParticipationEndDate");
        cbReason = (RadComboBox)e.Item.FindControl("ddlReasonLeaving");


      
        bool canUpdate = true;
       
        


        if (dpStartDate.SelectedDate < dtInstanceStartDate.SelectedDate)
        {
            message = "- Participation start date must be less than current instance start date";
            lblErrorParticipationDate.Text = message;
            lblErrorParticipationDate.Visible = true;
            canUpdate = false;
        }

        
        else
        {
            lblErrorParticipationDate.Visible = false;
            GridEditableItem editItem = (GridEditableItem)e.Item;
            string id = editItem.OwnerTableView.DataKeyValues[editItem.ItemIndex]["ParticipationID"].ToString();
            participationEntity = new ParticipationEntity(int.Parse(id));
            //participationEntity.ParticipationId = int.Parse(id);
            if (dpEndDate.SelectedDate != null && dpEndDate.SelectedDate > DateTime.MinValue)
            {
                participationEntity.ParticipationEnd = dpEndDate.SelectedDate;
                participationEntity.ReasonForLeavingId = int.Parse(cbReason.SelectedValue);
            }
            else if (dpEndDate.SelectedDate == null && cbReason.SelectedValue == "0")
            {
                participationEntity.ParticipationEnd = null;
                participationEntity.ReasonForLeavingId = null;
            }


            TextBox tbNotes = new TextBox();
            tbNotes = (TextBox)e.Item.FindControl("txtNotes");
            participationEntity.ParticipationNotes = tbNotes.Text;
            if (canUpdate)
            {
                SaveParticipation(sender, e);
            }


        }


    }
Mark de Torres
Top achievements
Rank 1
 asked on 08 Aug 2012
1 answer
103 views
Hi,

I have a ajaxified grid with a DetailTable, which is programmatically generated in Page_Load event. Is there a way I can Freeze the first column in the DetailTable when scrolling. And also, is there a way I can programmatically adjust the columns width to match in all the DetailTables without specifying the column width? i.e. to have all the columns to be aligned when two DetailTables are exapned in the grid like Excel vertical lines.

Any help is greatly appreciated!!

Thank you,
Ana
Pavlina
Telerik team
 answered on 08 Aug 2012
2 answers
195 views
I need to implement a particular scenario as given below.

I have a radgrid with one column say,Time has values in all rows,starting from 8 am to 8pm.Other columns in the grid may/may not have values in all rows.Basically I am trying to develop a radgrid to show all the appointments for a particular day.If an appointments exist for a particular time slot,then details of the appointment(name,appointment no,mobile no etc) will be displayed in the rest of columns of that row.
For other time slots with no appointments,rest of the columns will be empty for that time slot.
I thought of doing this with a radgrid instead of radscheduler,as I am not sure is If I can accomplish all these with a Scheduler.Grid is filtered by a calendar and multicolumn combobox value.

Now my issue here is:
I need to double click on a cell,which has no appointment .On double clicking ,need to open a radwindow,in which I will save an appointment,which will be displayed in the radgrid on closing.
I could see only OnColumnDblClick,OnCellSelected,OnRowDblClick as client side events.How to open a rad window with below two conditions
1)On double click of a cell
2)If that particular row has no appointment,(row will surely have value in the time column),radwindow should not open on double click.
3)As I mentioned above grid is being filtered by a multicolumn combobox.Grid has columns Time,duration,name,contact number.
When user double click on a grid celI,I need to pass multicolumn combobox value(which is placed outside grid),Time & duration of that particular row in grid(row corresponds to the clicked cell) as parameter to the radwindow.

Please help m on this.
Thanks,
Soumya
Soumya
Top achievements
Rank 1
 answered on 08 Aug 2012
1 answer
130 views
Hi All,

I have a Rad Grid and its having 3 columns (ItemID, ItemCode, ItemName) i wish to get the all row values of ItemID and the value need set to an array in a private function....
how can i achieve this .. please help..

Regards,

Prassin
Shinu
Top achievements
Rank 2
 answered on 08 Aug 2012
0 answers
53 views
Nevermind. Seems you already fixed the problem with the SP1 release.
Constantin
Top achievements
Rank 1
 asked on 08 Aug 2012
1 answer
74 views
Have a couple of grids and buttons to add and remove values from the grids. Both use 'NeedDataSource' and Custom Paging to get data. All of these controls are in an asp:Panel with I have ajaxified with RadAjaxManager. When I select items in the one grid and click on the button to add them to the other grid, the NeedDataSource is being called before the Click event. I think this is causing different records to populate that grid because using ExtractValues on a SelectedItem is returning values that are different from what was selected. And, those values are appearing the the grid on PostBack. Is this standard behavior? How can I get the selected values and move the data before the data is repopulated with NeedDataSource?
Tsvetoslav
Telerik team
 answered on 08 Aug 2012
3 answers
594 views
Hello

As  I stated I am getting Sys.WebForms.PageRequestManagerServerErrorException:    and the status code is 500.

I undesrstand that some thing is wrong  but not sure what it is

I get this error  only when there are more rows  ( For example I don't get this error if there are 100 rows, but if there are 240 rows I do get this error)
I  have Radgrid in RadAjaxPanel  and on clicking edit button from Command row I am placing complete grid in Editmode thru server code

I  edit 2 columns ( I have about  10 columns  in total and I have 2 levels of grouping)

I attached a script to edit fields and save the indexes of rows changed
When user clicks the save button, I am issuing a  Ajaxrequest with array of indexes to update

I am getting the error when i click the Save button.

While starting if there are less number of rows it works fine, but if I change the search and retrieve more number of rows and place them in edit mode and save , I get the errror  and now if I  change search  I get some object null  page.

I am not sure what is the reason for the error .  Does placing more number of rows in editmode creating this error

Thanks
Radoslav
Telerik team
 answered on 08 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?