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

Update RadGrid with Update SQL command

1 Answer 181 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
CliffE asked on 13 Nov 2012, 12:13 AM
Trying to update RadGrid with the following SQL update command along with this sql select statement.  The table I am updating to has 1 column named "Contactnum" which contains contact #'s and a column "Priority" which lists the Priority as 1,2, or 3.  In my update statement, I need to know how to add the Contactnum2 & Contactnum3 and the Priority 2 and 3 to the update statement.
SET @ContactNum = '555-5555 Office'
DECLARE @Priority int
SET @Priority = 1
UPDATE Physician_Contacts
SET ContactNum = @ContactNum
From Physician_Contacts
WHERE Priority = @Priority
SELECT A.Phys_Name, E.Specialty, A.Clinic, A.Office_No, A.Residence_No, A.Fax_no, A.Beeper_note,
                    b.ContactNum, c.ContactNum as Contactnum2,  d.ContactNum as Contactnum3
                    FROM PhysicianMainList as A
                    left join Physician_Contacts as B on A.Phys_Staff_ID = B.Phys_Staff_ID and b.priority = 1
                    left join Physician_Contacts as C on A.Phys_Staff_ID = C.Phys_Staff_ID and c.priority = 2
                    left join Physician_Contacts as D on A.Phys_Staff_ID = D.Phys_Staff_ID and d.priority = 3
                    left join WTH_Specialties as E on E.abbr = A.Specialty                   
                    ORDER BY A.Phys_Name

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 15 Nov 2012, 01:38 PM
Hello Cliff,

Please check out the following example demonstrating how to manually update RadGrid items binded to a SQL datasource:

I hope this will prove helpful.

All the best,
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question