Click here to Skip to main content
15,888,210 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Taking print screen of error page in CATCH block Pin
Peace ON20-Jul-10 3:49
Peace ON20-Jul-10 3:49 
QuestionHow to change cell text colour of dynamically populated gridview from database in C# Pin
Mansi Arora20-Jul-10 1:48
Mansi Arora20-Jul-10 1:48 
AnswerRe: How to change cell text colour of dynamically populated gridview from database in C# Pin
Peace ON20-Jul-10 2:07
Peace ON20-Jul-10 2:07 
GeneralRe: How to change cell text colour of dynamically populated gridview from database in C# Pin
Mansi Arora20-Jul-10 2:19
Mansi Arora20-Jul-10 2:19 
GeneralRe: How to change cell text colour of dynamically populated gridview from database in C# Pin
Peace ON20-Jul-10 2:26
Peace ON20-Jul-10 2:26 
GeneralRe: How to change cell text colour of dynamically populated gridview from database in C# Pin
Mansi Arora20-Jul-10 2:30
Mansi Arora20-Jul-10 2:30 
AnswerRe: How to change cell text colour of dynamically populated gridview from database in C# Pin
Peace ON20-Jul-10 2:37
Peace ON20-Jul-10 2:37 
QuestionHow to Update an XML File from a RadSchedular Pin
Vimalsoft(Pty) Ltd20-Jul-10 1:41
professionalVimalsoft(Pty) Ltd20-Jul-10 1:41 
Good Day

i am using a RaSchedular(Telerik) and i have an XML File on my solution and i bind my Schedular like this



private void Bind_Viewer_For(String Module)
   {


           string strExpr = "Code like '%" + Module + "%'";
           XmlDataDocument xmlDatadoc = new XmlDataDocument();
           xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
           RadScheduler1.DataStartField = "STARTDATE";
           RadScheduler1.DataSubjectField = "DESCRIPTION";
           RadScheduler1.DataEndField = "ENDDATE";
           RadScheduler1.DataKeyField = "ID";

           dsfinal = xmlDatadoc.DataSet;

           if (dsfinal.Tables[0].Rows.Count > 0)
           {
               DataView dv = dsfinal.Tables[0].DefaultView;
               dv.RowFilter = strExpr;
               RadScheduler1.DataSource = dv;
               RadScheduler1.DataBind();
               RadScheduler1.SelectedView = SchedulerViewType.MonthView;
               RadScheduler1.SelectedDate = Convert.ToDateTime(dv.Table.Rows[30]["ENDDATE"]);

           }


   }




dsfinal is declared Globally. i am filtering my data as you can see in the expression and bind the control with the Detail view. Now , my problem is when the updates are made. In the Schedular when updates are made , or when an appointment is moved
i need to Update the Dataset with the changes made. The Demo here Explains a simple xml binding, but i am binding the Schedular with a Dataset and when changes i made, i want to save the changes in the dataset.

Now i have a save button that is supposed to take the changes made in the dataset and merge it back to the xml and my code looks like this

protected void btnCommitChanges_Click(object sender, EventArgs e)
    {

            XmlDataDocument xmlDatadoc = new XmlDataDocument();
            xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");

            DataSet dslist = new DataSet();
            dslist = xmlDatadoc.DataSet;

            dsfinal.Merge(dslist);
            dsfinal.WriteXml(@"C:\Pilot Project\App_Data\TimeTable.xml");

    }


as you can see , i am taking the xml that is currently on the file system and i am loading it to a dataset and merge the two dataset. My question here is that is it going to updates the changes or it will override or insert new elements as if i am adding a new record on the xml ?

Again, after refresh the page, i could see the changes were not saved and the xml have not changed from the changes that were made in the dataset.

Thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

QuestionUnable To maintain Page State Pin
mharoonkhan19-Jul-10 23:57
mharoonkhan19-Jul-10 23:57 
AnswerRe: Unable To maintain Page State Pin
Peace ON20-Jul-10 0:04
Peace ON20-Jul-10 0:04 
AnswerRe: Unable To maintain Page State Pin
Prosanta Kundu online20-Jul-10 1:08
Prosanta Kundu online20-Jul-10 1:08 
GeneralRe: Unable To maintain Page State Pin
mharoonkhan20-Jul-10 18:05
mharoonkhan20-Jul-10 18:05 
QuestionDisplay pop up data Pin
SatyaKeerthi1519-Jul-10 22:42
SatyaKeerthi1519-Jul-10 22:42 
AnswerRe: Display pop up data Pin
Peace ON19-Jul-10 22:45
Peace ON19-Jul-10 22:45 
GeneralRe: Display pop up data Pin
SatyaKeerthi1519-Jul-10 23:08
SatyaKeerthi1519-Jul-10 23:08 
QuestionRe: Display pop up data Pin
Peace ON19-Jul-10 23:50
Peace ON19-Jul-10 23:50 
AnswerRe: Display pop up data Pin
SatyaKeerthi1520-Jul-10 0:34
SatyaKeerthi1520-Jul-10 0:34 
AnswerRe: Display pop up data Pin
Peace ON20-Jul-10 1:23
Peace ON20-Jul-10 1:23 
GeneralRe: Display pop up data Pin
SatyaKeerthi1520-Jul-10 1:26
SatyaKeerthi1520-Jul-10 1:26 
AnswerRe: Display pop up data Pin
Peace ON20-Jul-10 1:42
Peace ON20-Jul-10 1:42 
GeneralRe: Display pop up data Pin
SatyaKeerthi1520-Jul-10 2:44
SatyaKeerthi1520-Jul-10 2:44 
AnswerRe: Display pop up data Pin
Peace ON20-Jul-10 3:56
Peace ON20-Jul-10 3:56 
GeneralRe: Display pop up data Pin
SatyaKeerthi1520-Jul-10 18:36
SatyaKeerthi1520-Jul-10 18:36 
QuestionPost Date Alert Issue in Localization Pin
Amit Patel198519-Jul-10 22:34
Amit Patel198519-Jul-10 22:34 
AnswerRe: Post Date Alert Issue in Localization Pin
Peace ON19-Jul-10 22:54
Peace ON19-Jul-10 22:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.