캘린더보기 제어 바인딩은 다음 / 이전 월에 SharePoint Server 2010에서 작동하지 않습니다.

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/76672

문제

i VisualWebPart에서 SPCalendarView 컨트롤을 만들었습니다 [i는 시작 및 끝 날짜를 기반으로 캘린더 목록에서 이벤트를 바인딩합니다. 현재 월에 대한 일정 목록에서 이벤트를 가져 와서 현재 월에 대한 SPCalendarView에 바인딩합니다.이 경우 잘 작동합니다.다음 달 또는 이전 월의 이벤트의 경우 쿼리 문자열 paramater ZerseDardate에서 얻은 값을 기반으로 Spcalendar보기에서 다음 버튼을 클릭하면 목록에서 이벤트를 바인딩합니다. [목록이 너무 많은 이벤트가 있으므로 이루어집니다.

SharePoint Foumdation 2010에서는 Works입니다. 그러나 SharePoint Server 2010에서 동일한 코드를 사용할 때 다음과 이전 달의 이벤트를 볼 수 없습니다.이벤트는 현재 달에만 볼 수 있습니다. 서버가 서버 코드에서 발생하지만 UI에서 이벤트를 볼 수 없습니다.

도와주세요. 미리 감사드립니다 :)

도움이 되었습니까?

해결책 2

CU DEC2011 ( http://support.microsoft.com/kb/2596998 ) 해결됨SP2010의 SPCalendarview에 대한 문제점

다른 팁

다음 코드를 사용해보십시오.

BIND 사용자 이름과 암호에 대해 GRIDVIEW를 사용했습니다.텍스트 상자는 캘린더의 시작 및 종료에 사용됩니다.버튼을 클릭하면 사용자 이름이 캘린더에서 이벤트의 텍스트입니다.

         protected void Button1_Click1(object sender, EventArgs e)
           {
           var qry = (from logi in entities.Login
                   where logi.UserName == TextBox3.Text
                   orderby Convert.ToDateTime(logi.Password)
                   ascending
                   select new
                   {
                       UserName = logi.UserName,
                       Password = logi.Password
                   }).ToList();
        GridView1.DataSource = qry;
        GridView1.DataBind();

        foreach (GridViewRow row in GridView1.Rows)
        {
            if (active == 0)
            {
                int i = row.RowIndex;
                Label lbl1 = (Label)GridView1.Rows[0].Cells[0].FindControl("Label2");
                DateTime dt = Convert.ToDateTime(lbl1.Text);

                Label lbl11 = (Label)GridView1.Rows[1].Cells[0].FindControl("Label2");
                DateTime dt1 = Convert.ToDateTime(lbl11.Text);
                using (SPSite site = new SPSite("Sharepointsite"))
                {
                    using (SPWeb web = site.RootWeb)
                    {
                        SPList list = web.Lists["Calendar1"];
                        web.AllowUnsafeUpdates = true;
                        SPListItem Event = list.Items.Add();
                        Event["Title"] = TextBox3.Text;
                        Event["EventDate"] = Convert.ToDateTime(dt);
                        Event["EndDate"] = Convert.ToDateTime(dt1);
                        Event.Update();
                        list.Update();
                    }

                }
            }

            active = 1;
        }
        active = 0;
    }
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top