This is a migrated thread and some comments may be shown as answers.

Get Radcombo box's client Id

4 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saravanan
Top achievements
Rank 1
Saravanan asked on 27 Mar 2010, 01:20 PM

Dear All,

I've a few queries for clarification.

    1. How to get the client Id of the radcombo box that is placed in a user control from an aspx page.
    2. How to get the edited row's id in a radgrid
    3. After the row is inserted in a radgrid, the grid is not rebinding though I've given radGrid1.EditIndexes.Clear()

 

    4. On select of a row in the radgrid in user control, the other radgrid on the aspx page loads. Initially when no record is added and I try to click on the Edit button instead of add button, error is thrown. How to make edit button disabled till atleast one record is added.

Thanks in advance.

 

 

4 Answers, 1 is accepted

Sort by
0
Saravanan
Top achievements
Rank 1
answered on 29 Mar 2010, 07:48 AM
Dear All,

The below issues are show stoppers for us to proceed further.

I need your able guidance to proceed further.

Kindly help.
0
Mira
Telerik team
answered on 01 Apr 2010, 08:15 AM
Hello Raghuraman,

Straight to your questions:
1., 2. I recommend that you use the following code in the ItemDataBound event handler of the grid to get the ClientID of the combo and the ID of the edited data item:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
    {
        GridEditFormItem item = (GridEditFormItem)e.Item;
        UserControl usercontrol = item.FindControl("EditFormControl") as UserControl;
        RadComboBox combo = usercontrol.FindControl("RadComboBox1") as RadComboBox;
        string clientID = combo.ClientID;
           string editedDataItemID = item.ParentItem.ID;
    }
}
3.  Please make sure that automatic operations (AllowAutomaticInserts,  AllowAutomaticUpdates, AllowAutomaticDeletes) are not allowed if you are updating the data source manually.
4. You can try the following code to implement the desired functionality:
if (RadGrid1.MasterTableView.Items.Count == 0)
    EditButton.Enabled = false;

I hope this helps.

Sincerely yours,
Mira
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Saravanan
Top achievements
Rank 1
answered on 20 Apr 2010, 07:21 PM
Any updates on this please?
0
Mira
Telerik team
answered on 21 Apr 2010, 04:26 PM
Hello Raghuraman,

Please confirm that you have tried the suggestions from my previous message and provide more detailed information on the issues you are facing.

Regards,
Mira
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Saravanan
Top achievements
Rank 1
Answers by
Saravanan
Top achievements
Rank 1
Mira
Telerik team
Share this question
or